Backward Chaining
Backward Chaining is a goal-driven reasoning approach. Starting from a target hypothesis or goal, it identifies rules that can conclude this goal and recursively attempts to prove their preconditions as subgoals.
Category:Rule-Based Systems
•Difficulty:Beginner
•Time complexity:O(b^d)
•Space complexity:O(d)
Interactive VisualizationBackward Chaining Visualizer
PHASE: INITIALIZEDGoal-driven reasoning (working backward from hypothesis)
Target Goal:
Knowledge Base (Rules)
Production rules structured as IF (antecedents) → THEN (consequent)
R1
IFfeverANDcough
THENflu_suspected
R2
IFflu_suspectedANDbody_ache
THENflu_likely
R3
IFflu_likely
THENadvise_rest
R4
IFrash
THENallergy
Working Memory
Known facts in the current state
Working memory is empty.
Goal Stack
Subgoals being verified
Active Stack (Top to Bottom)
Stack is empty.
0/0
Step Trace & Explanation-
Action:Click 'Run Inference' to start simulation.
Backward Chaining Pseudocode
1.prove(goal):
2. if goal in working memory: return true
3. for each rule that concludes goal:
4. if prove(every condition in rule.IF): add goal to memory, return true
5. return false (or ask the user)
Real-time Telemetry HUD
Live StreamNodes Explored
0Frontier (Open Set)
0Optimal Cost g(n)
—Total Step Frames
0