The simplest possible production rules system that uses a set of EAV tuples as its knowledge base.
The simplest possible production rules system that uses a set of EAV tuples as its knowledge base.
(apply-production production facts context)
(cycle qf kb)
Feeds the results of states into a function qf that is responsible for detecting when production firings have stopped and returns an augmented fact set.
Feeds the results of states into a function qf that is responsible for detecting when production firings have stopped and returns an augmented fact set.
(naive-qf states)
Takes the last environment in a long sequence of states in the hope that the sequence was long enough that all of the productions fired in creating it.
Takes the last environment in a long sequence of states in the hope that the sequence was long enough that all of the productions fired in creating it.
(select-production selection-strategy {:keys [productions facts]})
Builds a sequence of bindings paired with each production and then uses a selection function to execute one of the productions that matched.
Builds a sequence of bindings paired with each production and then uses a selection function to execute one of the productions that matched.
(states kb)
Will apply the result of one production firing to the fact base and feed the result forward into the next firing.
Will apply the result of one production firing to the fact base and feed the result forward into the next firing.
(step kb)
(step choice-fn kb)
Takes a set of productions and facts and returns a new fact base based on the application of single production.
Takes a set of productions and facts and returns a new fact base based on the application of single production.
(unifications [clause & more :as clauses] facts context)
Walks through all of the clauses in an implied antecedent and matches each against every fact provided. Returns a seq of contexts representing all of the bindings established by the antecedent unifications across all facts provided.
Walks through all of the clauses in an implied antecedent and matches each against every fact provided. Returns a seq of contexts representing all of the bindings established by the antecedent unifications across all facts provided.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close