Planning Simulator

Master AI agent planning through interactive simulations and real-world scenarios

Building Plans Step-by-Step

Plan construction is decomposition in action. You break a large goal ("organize trip to Paris") into concrete, executable subtasks ("check flights", "book hotel", "reserve car"). Each subtask must be:

  • Atomic - Single, well-defined action
  • Sequenceable - Clear before/after ordering
  • Testable - Can verify success or failure
  • Resource-aware - Knows what it needs (API access, data, time)

Decomposition Strategies

🔗

Forward Chaining

Start from current state, build forward toward goal. "What can I do now?" then "What's next?"

State → Action1 → State' → Action2 → Goal
⬅️

Backward Chaining

Start from goal, work backward to current state. "What must happen before this?" repeatedly.

Goal → Need X → Need Y → Current
🌳

Hierarchical

Decompose top-level goal into subgoals, then each subgoal into tasks, recursively.

Trip → [Flight, Hotel, Car] → subtasks

Interactive: Build a Travel Plan

Select tasks in the correct order to build a valid plan. Pay attention to dependencies!

Available Tasks

Check flight availability2s
Compare flight prices3s
Requires: Task 1
⚠️ Dependencies not met
Book selected flight1s
Requires: Task 2
⚠️ Dependencies not met
Search hotels near destination2s
Requires: Task 3
⚠️ Dependencies not met
Reserve hotel room2s
Requires: Task 4
⚠️ Dependencies not met
Send confirmation email1s
Requires: Task 3, 5
⚠️ Dependencies not met

Your Plan (0 steps)

📋

No steps added yet

Click tasks on the left to build your plan

Understanding Dependencies

Dependencies define execution order. Task B depends on Task A if B needs A's output or if A must complete before B can start. Violating dependencies causes failures.

Valid Dependencies

Data Dependencies
Task B needs Task A's output
search_flights() → book_flight(flight_id)
State Dependencies
Task B requires state created by Task A
authenticate() → make_api_call()
Resource Dependencies
Task B needs resource held by Task A
acquire_lock() → write_data() → release_lock()

Common Mistakes

Circular Dependencies
Task A needs B, but B needs A - deadlock!
A → B → A (infinite loop)
Missing Dependencies
Using data before it's available
book_flight() before search_flights()
Over-Dependencies
Unnecessary ordering constraints slow execution
Sequential when parallel is possible

Plan Validation Checklist

✓ A Valid Plan Should Have:

  • All dependencies satisfied before execution
  • No circular dependencies (A needs B, B needs A)
  • Clear start and end states
  • Each task is atomic and executable
  • Resource requirements documented

⚠️ Warning Signs:

  • Vague tasks ("do something", "handle it")
  • Missing error handling or fallbacks
  • No consideration for parallelization
  • Tasks too large (should be decomposed further)
  • Ignoring state persistence across tasks