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-rule rule facts context)
(cycle qf kb)
Feeds the results of states into a function qf that is responsible for detecting when rule firings have stopped and returns an augmented fact set.
Feeds the results of states into a function qf that is responsible for detecting when rule 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 rules 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 rules fired in creating it.
(select-rule selection-strategy {:keys [rules facts]})
Builds a sequence of bindings paired with each rule and then uses a selection function to execute one of the rules that matched.
Builds a sequence of bindings paired with each rule and then uses a selection function to execute one of the rules that matched.
(states kb)
Will apply the result of one rule firing to the fact base and feed the result forward into the next firing.
Will apply the result of one rule firing to the fact base and feed the result forward into the next firing.
(step kb)
(step choice-fn kb)
Takes a set of rules and facts and returns a new fact base based on the application of single rule.
Takes a set of rules and facts and returns a new fact base based on the application of single rule.
(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