Backward chaining

From Wikipedia, the free encyclopedia

Backward chaining is one of the two main methods of reasoning when using inference rules. The other is forward chaining.

Backward chaining starts with a list of goals (or a hypothesis) and works backwards to see if there are data available that will support any of these goals. An inference engine using backward chaining would search the inference rules until it finds one which has a Then clause that matches a desired goal. If the If clause of that inference rule is not known to be true, then it is added to the list of goals (in order for your goal to be confirmed you must also provide data that confirms this new rule).

For example, suppose that the goal is to conclude the color of my pet Fritz, given that he croaks and eats flies, and that the rulebase contains the following two rules:

  1. If Fritz croaks and eats flies - Then Fritz is a frog
  2. If Fritz is a frog - Then Fritz is green

This rulebase would be searched and the second rule would be selected, because its conclusion (the Then clause) matches the goal (that Fritz is green). It is not yet known that Fritz is a frog, so the If statement is added to the goal list (in order for Fritz to be green, he must be a frog). The rulebase is again searched and this time the first rule is selected, because its Then clause matches the new goal that was just added to the list (whether Fritz is a frog). The If clause (Fritz croaks and eats flies) is known to be true and therefore the goal that Fritz is a frog can be concluded (Fritz croaks and eats flies, so must be green; Fritz is green, so must be a frog).

Because the list of goals determines which rules are selected and used, this method is called goal driven, in contrast to data-driven forward-chaining inference. This bottom-up appoach is often employed by expert systems.

Programming languages such as Prolog or Eclipse supports backward chaining.

[edit] See Also

[edit] External links

In other languages