Backward chaining
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 confimed you must also provide data that confims this new rule).
For example, suppose a rulebase contains two rules and that the goal is to conclude that Fritz is a frog:
- (1) If Fritz hops - Then Fritz is green
- (2) If Fritz is green - Then Fritz is a frog
This rulebase would be searched and rule (2) would be selected because its conclusion (the Then clause) matches the goal (that Fritz is a frog). It is not yet known that Fritz is green, so this If statement is added to the goal list (in order for Fritz to be a frog he must be green). The rulebase is again searched and this time rule (1) is selected because its Then clause matches the new goal just added to the list (that Fritz is green). The If clause (Fritz hops) is known to be true and therefore the goal that Fritz is a frog can be concluded (Fritz hops and therefore must be green, Fritz is green and therefore must be a frog).
Because the list of goals determines which Rules are selected and used, this method is called "goal driven". This bottom-up appoach is often employed by expert systems.
The programming language Prolog supports backward chaining.