HOME

TheInfoList



OR:

Backward chaining (or backward reasoning) is an
inference Inferences are steps in reasoning, moving from premises to logical consequences; etymologically, the word ''wikt:infer, infer'' means to "carry forward". Inference is theoretically traditionally divided into deductive reasoning, deduction and in ...
method described colloquially as working backward from the goal. It is used in
automated theorem prover Automated theorem proving (also known as ATP or automated deduction) is a subfield of automated reasoning and mathematical logic dealing with proving mathematical theorems by computer programs. Automated reasoning over mathematical proof was a m ...
s, inference engines,
proof assistant In computer science and mathematical logic, a proof assistant or interactive theorem prover is a software tool to assist with the development of formal proofs by human-machine collaboration. This involves some sort of interactive proof edi ...
s, and other
artificial intelligence Artificial intelligence (AI) is intelligence—perceiving, synthesizing, and inferring information—demonstrated by machines, as opposed to intelligence displayed by animals and humans. Example tasks in which this is done include speech ...
applications. In
game theory Game theory is the study of mathematical models of strategic interactions among rational agents. Myerson, Roger B. (1991). ''Game Theory: Analysis of Conflict,'' Harvard University Press, p.&nbs1 Chapter-preview links, ppvii–xi It has appli ...
, researchers apply it to (simpler) subgames to find a solution to the game, in a process called ''
backward induction Backward induction is the process of reasoning backwards in time, from the end of a problem or situation, to determine a sequence of optimal actions. It proceeds by examining the last point at which a decision is to be made and then identifying wha ...
''. In chess, it is called retrograde analysis, and it is used to generate table bases for
chess endgame In chess and other similar games, the endgame (or end game or ending) is the stage of the game when few pieces are left on the board. The line between middlegame and endgame is often not clear, and may occur gradually or with the quick exchange ...
s for
computer chess Computer chess includes both hardware (dedicated computers) and software capable of playing chess. Computer chess provides opportunities for players to practice even in the absence of human opponents, and also provides opportunities for analysi ...
. Backward chaining is implemented in
logic programming Logic programming is a programming paradigm which is largely based on formal logic. Any program written in a logic programming language is a set of sentences in logical form, expressing facts and rules about some problem domain. Major logic pro ...
by
SLD resolution SLD resolution (''Selective Linear Definite'' clause resolution) is the basic inference rule used in logic programming. It is a refinement of resolution, which is both sound and refutation complete for Horn clauses. The SLD inference rule Give ...
. Both rules are based on the
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 ...
inference rule. It is one of the two most commonly used 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 ...
with
inference rule In the philosophy of logic, a rule of inference, inference rule or transformation rule is a logical form consisting of a function which takes premises, analyzes their syntax, and returns a conclusion (or conclusions). For example, the rule of ...
s and logical implications – the other is
forward chaining Forward chaining (or forward reasoning) is one of the two main methods of reasoning when using an inference engine and can be described logically as repeated application of ''modus ponens''. Forward chaining is a popular implementation strategy ...
. Backward chaining systems usually employ a
depth-first search Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible a ...
strategy, e.g.
Prolog Prolog is a logic programming language associated with artificial intelligence and computational linguistics. Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is intended primarily ...
.


How it works

Backward chaining starts with a list of
goal A goal is an idea of the future or desired result that a person or a group of people envision, plan and commit to achieve. People endeavour to reach goals within a finite time by setting deadlines. A goal is roughly similar to a purpose or ...
s (or a
hypothesis A hypothesis (plural hypotheses) is a proposed explanation for a phenomenon. For a hypothesis to be a scientific hypothesis, the scientific method requires that one can test it. Scientists generally base scientific hypotheses on previous obse ...
) and works backwards from the
consequent A consequent is the second half of a hypothetical proposition. In the standard form of such a proposition, it is the part that follows "then". In an implication, if ''P'' implies ''Q'', then ''P'' is called the antecedent and ''Q'' is called ...
to the antecedent to see if any
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 ...
supports any of these consequents. An inference engine using backward chaining would search the
inference Inferences are steps in reasoning, moving from premises to logical consequences; etymologically, the word ''wikt:infer, infer'' means to "carry forward". Inference is theoretically traditionally divided into deductive reasoning, deduction and in ...
rules until it finds one with a consequent (Then clause) that matches a desired goal. If the antecedent (If clause) of that rule is known to be true, then it is added to the list of goals (for one's goal to be confirmed one must also provide data that confirms this new rule). For example, suppose a new pet, Fritz, is delivered in an opaque box along with two facts about Fritz: * Fritz croaks * Fritz eats flies The goal is to decide whether Fritz is green, based on a
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 ...
containing 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 yellow With backward reasoning, an inference engine can determine whether Fritz is green in four steps. To start, the query is phrased as a goal assertion that is to be proven: "Fritz is green". 1. Fritz is substituted for X in rule #3 to see if its consequent matches the goal, so rule #3 becomes: If Fritz is a frog – Then Fritz is green Since the consequent matches the goal ("Fritz is green"), the rules engine now needs to see if the antecedent ("Fritz is a frog") can be proven. The antecedent, therefore, becomes the new goal: Fritz is a frog 2. Again substituting Fritz for X, rule #1 becomes: If Fritz croaks and Fritz eats flies – Then Fritz is a frog Since the consequent matches the current goal ("Fritz is a frog"), the inference engine now needs to see if the antecedent ("Fritz croaks and eats flies") can be proven. The antecedent, therefore, becomes the new goal: Fritz croaks and Fritz eats flies 3. Since this goal is a conjunction of two statements, the inference engine breaks it into two sub-goals, both of which must be proven: Fritz croaks Fritz eats flies 4. To prove both of these sub-goals, the inference engine sees that both of these sub-goals were given as initial facts. Therefore, the conjunction is true: Fritz croaks and Fritz eats flies therefore the antecedent of rule #1 is true and the consequent must be true: Fritz is a frog therefore the antecedent of rule #3 is true and the consequent must be true: Fritz is green This derivation, therefore, allows the inference engine to prove that Fritz is green. Rules #2 and #4 were not used. Note that the goals always match the affirmed versions of the consequents of implications (and not the negated versions as in
modus tollens In propositional logic, ''modus tollens'' () (MT), also known as ''modus tollendo tollens'' (Latin for "method of removing by taking away") and denying the consequent, is a deductive argument form and a rule of inference. ''Modus tollens' ...
) and even then, their antecedents are then considered as the new goals (and not the conclusions as in
affirming the consequent Affirming the consequent, sometimes called converse error, fallacy of the converse, or confusion of necessity and sufficiency, is a formal fallacy of taking a true conditional statement (e.g., "If the lamp were broken, then the room would be dar ...
), which ultimately must match known facts (usually defined as consequents whose antecedents are always true); thus, the inference rule used is
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 ...
. 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 Forward chaining (or forward reasoning) is one of the two main methods of reasoning when using an inference engine and can be described logically as repeated application of '' modus ponens''. Forward chaining is a popular implementation strateg ...
inference. The backward chaining approach is often employed by
expert systems 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� ...
. Programming languages such as
Prolog Prolog is a logic programming language associated with artificial intelligence and computational linguistics. Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is intended primarily ...
,
Knowledge Machine The Knowledge Machine is a concept of Seymour Papert, which is intended to enable children to explore any situation and engage them completely. Although Papert never clearly defined the Knowledge Machine, one interpretation is a virtual reality ...
and
ECLiPSe An eclipse is an astronomical event that occurs when an astronomical object or spacecraft is temporarily obscured, by passing into the shadow of another body or by having another body pass between it and the viewer. This alignment of three c ...
support backward chaining within their inference engines.


See also

*
Backtracking Backtracking is a class of algorithms for finding solutions to some computational problems, notably constraint satisfaction problems, that incrementally builds candidates to the solutions, and abandons a candidate ("backtracks") as soon as it d ...
*
Backward induction Backward induction is the process of reasoning backwards in time, from the end of a problem or situation, to determine a sequence of optimal actions. It proceeds by examining the last point at which a decision is to be made and then identifying wha ...
*
Forward chaining Forward chaining (or forward reasoning) is one of the two main methods of reasoning when using an inference engine and can be described logically as repeated application of ''modus ponens''. Forward chaining is a popular implementation strategy ...
* Opportunistic reasoning


References

Definition of backward chaining as a depth-first search method: * Languages that support backward chaining: *


Sources

*


External links


Backward chaining example
{{Automated reasoning Expert systems Logic in computer science Reasoning Automated reasoning