Navigation · Safety, Uncertainty and Recovery · M7-L4 · Intermediate
Detect and Escape a Stuck Robot
16:30. Scout rocks back and forth in front of a locked door for ten minutes. The wheels turn, the odometer climbs, and the log says "navigating". Nobody is told until the pharmacy phones.
You will teach Scout to notice that it is going nowhere, to pick a recovery that is safe where it stands, and to fire the recovery once and give it time.
Your task
Lab complete: post-mortem
You have passed every stage. Now connect it back to the theory and move on:
Output
What Python can I use?
Plain Python with math and heapq. Your code runs in a background worker: an endless loop is stopped after a few seconds and the page stays usable. It runs in your browser and is never sent anywhere.