- Forward chaining
Forward chaining is one of the two main methods of reasoning when using
inference rules(in artificial intelligence). It is referred in philosophical circle as modus ponens. The opposite of forward chaining is backward chaining.
Forward chaining starts with the available
dataand uses inference rules to extract more data (from an end user for example) until a goal is reached. An inference engineusing forward chaining searches the inference rules until it finds one where the antecedent (If clause) is known to be true. When found it can conclude, or infer, the consequent(Then clause), resulting in the addition of new informationto its data.
Inference engines will iterate through this process until a goal is reached.
For example, suppose that the goal is to conclude the color of a pet named Fritz, given that he croaks and eats flies, and that the
rule basecontains the following four rules:
# If X croaks and eats flies - Then X is a frog
# If X chirps and sings - Then X is a canary
# If X is a frog - Then X is green
# If X is a canary - Then X is yellow
rule basewould be searched and the first rule would be selected, because its antecedent (If Fritz croaks and eats flies) matches our data. Now the consequents (Then X is a frog) is added to the data. The rule baseis again searched and this time the third rule is selected, because its antecedent (If Fritz is a frog) matches our data that was just confirmed. Now the new consequent(Then Fritz is green) is added to our data. Nothing more can be inferred from this information, but we have now accomplished our goal of determining the color of Fritz.
Because the data determines which rules are selected and used, this method is called data-driven, in contrast to goal-driven
backward chaininginference. The forward chaining approach is often employed by expert systems, such as CLIPS.
One of the advantages of forward-chaining over backward-chaining is that the reception of new data can trigger new inferences, which makes the engine better suited to dynamic situations in which conditions are likely to change.
Wikimedia Foundation. 2010.