Forward chaining
   HOME

TheInfoList



OR:

Forward chaining (or forward reasoning) is one of the two main methods of
reasoning Reason is the capacity of consciously applying logic by drawing conclusions from new or existing information, with the aim of seeking the truth. It is closely associated with such characteristically human activities as philosophy, science, langu ...
when using an inference engine and can be described logically as repeated application of ''
modus ponens In propositional logic, ''modus ponens'' (; MP), also known as ''modus ponendo ponens'' (Latin for "method of putting by placing") or implication elimination or affirming the antecedent, is a deductive argument form and rule of inference ...
''. Forward chaining is a popular implementation strategy for
expert system In artificial intelligence, an expert system is a computer system emulating the decision-making ability of a human expert. Expert systems are designed to solve complex problems by reasoning through bodies of knowledge, represented mainly as ifâ ...
s,
business Business is the practice of making one's living or making money by producing or buying and selling products (such as goods and services). It is also "any activity or enterprise entered into for profit." Having a business name does not separ ...
and production rule systems. The opposite of forward chaining is
backward chaining Backward chaining (or backward reasoning) is an inference method described colloquially as working backward from the goal. It is used in automated theorem provers, inference engines, proof assistants, and other artificial intelligence applications ...
. Forward chaining starts with the available
data In the pursuit of knowledge, data (; ) is a collection of discrete values that convey information, describing quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpret ...
and uses inference rules to extract more data (from an end user, for example) until a goal is reached. An inference engine using forward chaining searches the inference rules until it finds one where the antecedent (If clause) is known to be true. When such a rule is found, the engine can conclude, or infer, the consequent (Then clause), resulting in the addition of new
information Information is an abstract concept that refers to that which has the power to inform. At the most fundamental level information pertains to the interpretation of that which may be sensed. Any natural process that is not completely random, ...
to its data. Inference engines will iterate through this process until a goal is reached.


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 base In computer science, a rule-based system is used to store and manipulate knowledge to interpret information in a useful way. It is often used in artificial intelligence applications and research. Normally, the term ''rule-based system'' is appl ...
contains the following four rules: # If X croaks and X eats flies - Then X is a frog # If X chirps and X sings - Then X is a canary # If X is a frog - Then X is green # If X is a canary - Then X is blue Let us illustrate forward chaining by following the pattern of a computer as it evaluates the rules. Assume the following facts: * Fritz croaks * Fritz eats flies With forward reasoning, the inference engine can derive that Fritz is green in a series of steps: 1. Since the base facts indicate that "Fritz croaks" and "Fritz eats flies", the antecedent of rule #1 is satisfied by substituting Fritz for X, and the inference engine concludes: Fritz is a frog 2. The antecedent of rule #3 is then satisfied by substituting Fritz for X, and the inference engine concludes: Fritz is green The name "forward chaining" comes from the fact that the inference engine starts with the data and reasons its way to the answer, as opposed to
backward chaining Backward chaining (or backward reasoning) is an inference method described colloquially as working backward from the goal. It is used in automated theorem provers, inference engines, proof assistants, and other artificial intelligence applications ...
, which works the other way around. In the derivation, the rules are used in the opposite order as compared to
backward chaining Backward chaining (or backward reasoning) is an inference method described colloquially as working backward from the goal. It is used in automated theorem provers, inference engines, proof assistants, and other artificial intelligence applications ...
. In this example, rules #2 and #4 were not used in determining that Fritz is green. Because the data determines which rules are selected and used, this method is called data-driven, in contrast to goal-driven
backward chaining Backward chaining (or backward reasoning) is an inference method described colloquially as working backward from the goal. It is used in automated theorem provers, inference engines, proof assistants, and other artificial intelligence applications ...
inference. The forward chaining approach is often employed by
expert system In artificial intelligence, an expert system is a computer system emulating the decision-making ability of a human expert. Expert systems are designed to solve complex problems by reasoning through bodies of knowledge, represented mainly as ifâ ...
s, 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.


See also

*
Backward chaining Backward chaining (or backward reasoning) is an inference method described colloquially as working backward from the goal. It is used in automated theorem provers, inference engines, proof assistants, and other artificial intelligence applications ...
* Constraint Handling Rules * Opportunistic reasoning *
Rete algorithm The Rete algorithm ( , , rarely , ) is a pattern matching algorithm for implementing rule-based systems. The algorithm was developed to efficiently apply many rules or patterns to many objects, or facts, in a knowledge base. It is used to de ...


References

{{reflist


External links


Forward vs. Backward Chaining Explained at SemanticWeb.com
Logic Expert systems Logic in computer science