The map is not the world.
A grid-world agent sees a 5×5 window, writes what it sees into an occupancy map, plans with A*, and executes. Remove the model, or remove the loop, and watch what survives.
The grid-world agent lab
Legend. The left panel is the world; the right panel is what the agent believes. Dark cells are walls. The orange line is the current plan; the teal line is the path already taken. The dashed teal box is the 5 × 5 window. In reactive mode the right panel shows only that window, because there is no stored map.
Mode
Switching mode resets the episode. The world is the same in every mode; only the agent changes. The layout is fixed (seed 15), and A* tie-breaking is deterministic.
Trace
| Mode | Outcome | Steps | Replans | Collisions | Nodes |
|---|
Press “Compare all three” to run each architecture on the same world.
What this shows
The reactive agent has no model, so it cannot see past the next hill: it walks into the U-shaped trap and stops at a local minimum. The open-loop agent has a model, but it never updates it; its plan is valid for the prior and invalid for the world, and it collides with a wall it never looked at. The closed-loop agent perceives, updates the map, replans when the plan meets a known wall, and reaches the goal.
The cost is visible: replans and nodes expanded are the price of keeping the model honest. A wrong model is not a planner bug; it is a model that stopped listening.
Three architectures, three failures.
No model, local minimum
The greedy step is optimal for the next cell and wrong for the task. The U-shaped trap is a one-cell-deep local minimum: every escape increases the distance. A model is what lets the agent see the escape before it takes it.
A model without a monitor
The plan is valid for the prior: the divider door is known, the furniture is not. The agent follows the plan into the horizontal wall and stops. It is not a planner failure — A* was correct relative to the map. The map was wrong, and nothing checked it.
Perceive, replan, pay
The same planner, with a map that is updated from the 5 × 5 window. The plan changes when the wall is observed; the agent goes around. The cost is real: extra steps, replans, and nodes expanded. The benefit is that the model stays in contact with the world.
It is a hand-built 22 × 14 grid with a deterministic A* planner and an idealized 5 × 5 window. It has no learned perception, no continuous control, no noise, and no physics. It does not measure a benchmark. It isolates one mechanism: a model in the loop is what turns a plan into a behaviour that survives contact with the world.
Read the agent loop again · Read the failure taxonomy · Slides