Navigation · Global Planning: Graph Search · M3-L3 · Intermediate
Fix a Corner-Cutting Planner
13:05. Scout scrapes the corner of the pharmacy door frame again, and the paint on that corner is a different colour from the paint on the rest of the wall. The route in the log is a perfect staircase of cells, and one step of it passes diagonally through a corner that two wall cells share.
You will fix the legal-move rule, make the planner pay for cells close to walls instead of minimising distance, and then deal with the pharmacy hatch, which is a goal that lies inside the wall and cannot be stood on.
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.