Skip to content
StackDecode
AI & ML Atlas
Artificial IntelligencealgorithmInteractive simulation

Forward Chaining

Starts from known facts and fires rules until the goal appears.

The idea

Data-driven reasoning: whenever the facts satisfy a rule's conditions, add its conclusion as a new fact, which may trigger more rules. It is a good fit when you have many facts and want to know everything that follows.

Watch it run

This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.

R1R2R3R4R5ABECGDFH
  • known / proved
  • active rule or sub-goal
  • unknown

Start from the known facts (green): A, B, E. Rules are the squares: all inputs on the left must be known to fire.

1/12

Circles are statements, squares are IF-THEN rules. A rule links its inputs to its conclusion.

Step by step

  1. 1Start with the known facts.
  2. 2Find a rule whose conditions are all known and whose conclusion is new.
  3. 3Add the conclusion to the facts.
  4. 4Repeat; stop when the goal is derived or no rule can fire.

Where it is used

Monitoring and alerting rules, production systems.

Watch out for

It may derive many irrelevant facts before reaching the one you care about.

Related