Lesson 06.08 · Phase 06 · Planning & Reasoning

Replanning on surprise

A plan is a bet on what the world looks like. When a step's result says the bet was wrong, update what you believe and plan again from where you are, not from where you started.

Learning objectives

  • Keep an explicit belief (the facts the agent thinks are true) separate from the world, and update it from every observation, including errors.
  • Detect surprises by comparing a step's result with what the plan expected.
  • Implement three responses: stop, restart from the original belief, and replan from the updated belief while keeping finished work.
  • Handle transient failures (retry) differently from lasting ones (replan), and avoid repeating side effects.

Lesson 2's plan for a release was correct for the world the planner imagined. The real world had three differences:

Loading the full lesson…