Lesson 5-9 · Capstone Project — Knowledge ChecksAnswer key
What is the main challenge of the capstone?
Every component already exists and was tested in earlier lessons. The capstone is about connecting them correctly: integration, not new algorithms.
What single data structure connects the start of the run, pathfinding, detection, and what you carry into the next run?
BLOCKED flows through every stage: start → planner → detection → the next run. If it doesn't flow correctly, the whole system breaks.
Why can the program print the plan for leg 1 before the button, but not for legs 2 to 4?
Each leg is planned when it starts, from the robot's real position and the current BLOCKED list. Only leg 1's inputs are known before the robot moves.
A team's robot drives leg 1 correctly, then on leg 2 turns the wrong way and tracks off the grid. The most likely cause?
If position and heading aren't updated from the return value, the planner thinks the robot is still at (0, 0) facing north. Its path is right for that spot and wrong for where the robot is.
Which is a classic capstone integration bug to watch for?
BLOCKED must persist across all destinations in a run. Clearing it each leg throws away everything learned so far. (Also common: not assigning position and heading from navigate_with_detection's return value.)
In the demo, what evidence shows the robot 'learned'?
The measured improvement from Run 1 to Run 2 (fewer reroutes and steps) is the evidence. Same algorithm, better data to start from.