FORWARD CHAINING AND BACKWARD CHAINING
Forward Chaining
• It is the form of reasoning which starts with input data facts in the knowledge base and
applies inference rules in the forward direction to extract more data until a goal is reached.
• When decision is taken based on the available data then the process is called as forward
chaining.
Properties
• It moves from bottom to up (top)
• It is a process of making a conclusion based on known facts or data by starting from the
initial state and reach the goal state.
• It is otherwise called as data driven approach.
• Forward chaining is used in Expert systems
Backward Chaining:
A backward chaining algorithm is a form of reasoning, which starts with the goal and works
backward , chaining through the rules to find the known facts that supports the goal.
Properties
• It is known as top down approach
• In backward chaining goal is broken into sub goal and sub goals to prove the facts.
• It is otherwise called as goal driven approach, in which a list of goal decides which rules
are selected and used.
First iteration :
(ii) Rule 4 fires :
new sub goal to prove G is true
go backward
(iii) Rule 2 "fires''; conclusion: A is true
new sub goal to prove E is true
go backward;
(iv) no other rule fires; end of first iteration.
new sub goal found at
(iii)go for second iteration
Second iteration :
(v) Rule 3 fires :
conclusion B is true (2nd input found)
both inputs A and B ascertained
Proved