Skip to main content

Rule based reasoning; backward chaining

Short answer

Rule-based reasoning uses IF-THEN rules, facts, and an inference engine. Backward chaining is goal-driven: it starts with a goal, finds rules concluding it, proves their sub-goals recursively, backtracking on failure. Example: proving a car doesn't start by showing the battery is dead because headlights are dim.

What is rule based reasoning? Explain Backward Chaining with suitable example.

Rule-based reasoning

Rule-based reasoning is a way of solving problems with a set of IF-THEN rules (production rules) kept in a rule base, together with a fact base (working memory) and an inference engine. The inference engine matches the rules against the facts and fires them to derive new facts or conclusions, using forward or backward chaining. It is the basis of expert systems such as MYCIN. Advantages: knowledge is modular and easy to add or change, and conclusions can be explained by listing the rules used.

Backward chaining

Backward chaining is a goal-driven inference method. It starts with a goal and looks for rules whose THEN part concludes that goal. The IF conditions of such a rule become new sub-goals, which are proved recursively from known facts (or by asking the user). If every sub-goal succeeds, the goal is proved; if a rule fails, the next rule is tried (backtracking).

Example: diagnosing why a car does not start

Rules:

  • R1: IF battery is dead THEN car does not start
  • R2: IF fuel tank is empty THEN car does not start
  • R3: IF headlights are dim THEN battery is dead
  • R4: IF fuel gauge reads zero THEN fuel tank is empty

Facts: headlights are dim. Fuel gauge reads half.

Goal: Car does not start - why?

StepGoalAction / result
1car does not start?Try R1: sub-goal "battery is dead"
2battery is dead?Rule R3: sub-goal "headlights are dim"
3headlights are dim?Known fact: TRUE
4R3 fires, so battery is dead is TRUER1 fires: goal proved
car does not start
   |-- R1: battery is dead
   |        |-- R3: headlights dim [fact] TRUE
   |-- R2: fuel tank is empty          (not needed)
            |-- R4: gauge reads zero [FALSE]

Conclusion: The car does not start because the battery is dead. Since R1 already proves the goal, R2 is not needed; it would fail anyway because the fuel gauge does not read zero. So only the relevant rules are used.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Artificial Intelligence chapter 4 questions →