Q15Principles of Artificial Intelligence
Question
4 marks
Differentiate between Forward Chaining and Backward Chaining.
Answer
An architectural comparison of Forward and Backward Chaining inference engines. Contrasts the data-driven explosive generation of Forward Chaining against the highly directed, goal-driven mathematical execution of Backward Chaining.
In Rule-Based AI (Expert Systems), the Inference Engine utilizes strict mathematical algorithms to deduce truths from a Knowledge Base of IF-THEN rules. The two absolute dominant algorithms are Forward and Backward Chaining, executing in completely opposite architectural directions.
1. Forward Chaining (Data-Driven)
- Mechanism: It begins with the raw absolute Facts. It aggressively searches the Knowledge Base for any rules where the
IFcondition mathematically matches the known facts. It fires the rule, deducing a brand new fact (theTHENpart). It adds this new fact to the database and repeats the entire violent cycle until no new rules can fire. - Use Case: Highly optimal for systems where you have all the data upfront and want to see what happens (e.g., Weather Forecasting. "If Pressure is Low, and Humidity is High Rain").
- Demerit: Catastrophically inefficient. It might fire 10,000 rules deducing useless facts completely unrelated to the user's actual question.
2. Backward Chaining (Goal-Driven)
- Mechanism: It begins with the Goal (the Hypothesis). The user asks, "Does the patient have Malaria?" The algorithm mathematically works backward. It finds the rule
IF X and Y THEN Malaria. It then aggressively spawns sub-goals: "Is X true? Is Y true?" It searches the database for X. If X is unknown, it searches for a rule that concludes X, and chains violently backward until it hits raw facts or asks the user. - Use Case: Highly optimal for Medical Diagnostics (PROLOG uses this natively). The AI does not blindly deduce every disease; it strictly focuses on proving the specific hypothesis.
- Merit: Absolutely mathematically efficient. It only explores the exact logical paths required to prove the goal, ignoring 99% of the irrelevant Knowledge Base.