Reason with procedures and search.
Compare a local shortcut with a procedure that explores alternatives and checks its result.
By the end: Distinguish memorization, a direct policy, and search; explain why a budget failure is not proof of impossibility.
Start with something concrete.
You can remember a familiar route home. When a road is closed, remembering that route may not help. You need a way to consider alternatives, check which roads are legal, and tell when you have actually arrived.
Try the interactive model ↓A move makes the straight-line distance to the goal smaller. Must it belong to a successful route?
Change one thing. Watch what follows.
- On “A wall in the way”, compare the local distance policy with breadth-first search. Inspect their proposed states and exact goal checks.
- Reveal the search expansions one at a time. Explain why search spends work on squares outside the final route.
- Reduce the query budget to 4. Compare that failure with searching the unreachable-goal puzzle at budget 100.
- Switch to the corridor. Explain what stayed the same in the procedure even though the map changed.
Loading this browser experiment…
A remembered answer and a reusable procedure
A lookup table can return a multiplication result it has seen before. An algorithm applies a sequence of operations to new inputs. In the source example, 18 boxes × 24 apples − 175 sold becomes 432 − 175 = 257 apples. Multiplication and subtraction supply reusable rules; storing the answer 257 does not by itself supply those rules.
A neural network can learn computations that behave like procedures, but gradient training does not guarantee a robust algorithm. Test changes in input size, names, composition, and required depth. Success on familiar patterns alone does not establish systematic generalization.
Written intermediate steps can let an autoregressive model reuse prior calculations. They can also contain errors. More words are not an independent check of arithmetic. In an exactly defined task, an exact calculator or simulator can provide a stronger check.
A local clue is not a complete plan
A heuristic estimates what looks promising. Our direct rule chooses a legal neighboring square with the smallest Manhattan distance: horizontal distance plus vertical distance to the goal. It considers four local moves, but does not explore their later consequences. Obstacles can make a temporary move away from the goal necessary.
The policy detects a repeated square and stops so that the demonstration cannot loop forever. That memory detects the failure; it does not give the policy a strategy for escaping it. The rule is hand-written, not a trained policy network.
Search keeps alternatives
Breadth-first search keeps a queue of discovered states. It expands a state by checking its four possible actions, records how newly reached states were found, and continues with the earliest queued state. The parent records reconstruct a path when the goal is reached.
With equal move costs and correct deterministic rules, breadth-first search finds a shortest path when given enough work. It may explore many states that are not on the final path. That extra work is the cost of keeping alternatives instead of committing to a local guess.
A queue emptied without reaching the goal rules out a route in this finite graph. A query-budget cutoff does not: unexplored alternatives may remain. In our lab, the budget counts transition queries, not all bookkeeping or wall-clock time. An independent replay then checks every proposed move and the final goal.
Where neural estimates can fit
A policy network can prioritize promising actions, and a value network can estimate future success. Search can use those estimates while an exact simulator handles legal transitions. A verifier checks whether the final proposal satisfies the task. These roles complement one another; an estimate is not an exact rule.
A fixed-depth network performs a fixed sequence of transformations per pass. Additional generated tokens allow additional passes. A recurrent model instead repeatedly updates a hidden state. Both can add sequential computation, but the updates must be useful. We inspect repeated state updates in the refinement lesson.
Sort the jobs in chess
The source exercise asks you to separate pattern recognition, search, exact execution, and verification in move selection. Try assigning each of these jobs before opening the example.
Compare the four roles
A learned policy may recognize a promising attack or a familiar position. Search explores possible move sequences and responses. Exact rules determine whether moves are legal and how the board changes, including special rules. A verifier can check a claimed legal sequence or checkmate against those rules. A position evaluation estimates promise; it does not prove the eventual outcome of an unexplored game.
Search stopped because its query budget ran out. What can you conclude?
Take this idea with you.
Reusable procedures can handle new inputs, but correctness depends on the rules and stopping conditions. Search spends work on alternatives; verification checks the resulting claim.