1

주제: Forward Vs Backward chaining rule engine

http://oopweb.com/Prolog/Documents/XSIP/Volume/intro1-2.gif
IMG 출처 : http://oopweb.com

Forward Chaining

  • Given some facts, work forward through inference net.

  • Discovers what conclusions can be derived from data.

http://www.cse.unsw.edu.au/~billw/cs9414/notes/kr/rules/rules2.gif

Backward Chaining

  • To determine if a decision should be made, work backwards looking for justifications for the decision.

  • Eventually, a decision must be justified by facts.

http://www.cse.unsw.edu.au/~billw/cs9414/notes/kr/rules/rules1.gif

-source : http://www.cse.unsw.edu.au/~billw/cs941 … rules.html -

•Forward chaining - When one or more conditions are shared between rules, they are considered "chained." Chaining refers to sharing conditions between rules, so that the same condition is evaluated once for all rules.

•Backward chaining - Backward chaining is very similar to forward chaining with one difference. Backward chaining engines query for new facts, whereas forward chaining relies on the application asserting facts to the rule engine. Backward chaining rule engines will implicitly create subgoals and use those subgoals to execute queries.

•Bi-directional chaining - When rules operate in both modes, it is considered bi-directional.

One of the benefits of backward chaining is the user doesn't have to explicitly write rules for the subgoals.

The best way to build efficient applications using rule engines is to take the time to learn how each approach works and use both techniques. Although it increases the learning curve, the choice between forward and backward chaining isn't something that can be summed up in 2-3 sentences. It's crucial to consider the intent of the rule, size of the dataset and performance requirements.
-source : http://legacy.drools.codehaus.org/Forwa … d+chaining

Share