Difference between Backward and Forward Chaining.

Forward Chaining and Backward Chaining are the two most important strategies in the field of Artificial Intelligence and lie in the Expert System Domain of AI.
Forward and Backward chaining is the strategies used by the Inference Engine in making the deductions.

Inference Engine:
Inference Engine is a component of the expert system that applies logical rules to the knowledge base to deduce new information. It interprets and evaluates the facts in the knowledge base in order to provide an answer.
A knowledgebase is a structured collection of facts about the system’s domain.

Forward Chaining:
Forward Chaining the Inference Engine goes through all the facts, conditions and derivations before deducing the outcome i.e When based on available data a decision is taken then the process is called as Forwarding chaining, It works from an initial state and reaches to the goal(final decision).

Example:
A
A -> B
B
—————————–
He is running.
If he is running, he sweats.
He is sweating.

Backward Chaining:
In this, the inference system knows the final decision or goal, this system starts from the goal and works backwards to determine what facts must be asserted so that the goal can be achieved, i.e it works from goal(final decision) and reaches the initial state.



Example:
B
A -> B
A
—————————–
He is sweating.
If he is running, he sweats.
He is running.

Difference between Forwarding Chaining and Backward Chaining:

Forward Chaining Backward Chaining
1. When based on available data a decision is taken then the process is called as Forward chaining. Backward chaining starts from the goal and works backward to determine what facts must be asserted so that the goal can be achieved.
2. Forward chaining is known as data-driven technique because we reaches to the goal using the available data. Backward chaining is known as goal-driven technique because we start from the goal and reaches the initial state in order to extract the facts.
3. It is a bottom-up approach. It is a top-down approach.
4. It applies the Breadth-First Strategy. It applies the Depth-First Strategy.
5. Its goal is to get the conclusion. Its goal is to get the possible facts or the required data.
6. Slow as it has to use all the rules. Fast as it has to use only a few rules.
7. It operates in forward direction i.e it works from initial state to final decision. It operates in backward direction i.e it works from goal to reach initial state.
8. Forward chaining is used for the planning, monitoring, control, and interpretation application. It is used in automated inference engines, theorem proofs, proof assistants and other artificial intelligence applications.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up


If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.