Robot Learning · Reward Design · M5-L1 · Intermediate
Shape a Reward Without Changing the Task
Experiment log · Scout at Meridian General Hospital
Experiment log, Meridian General Hospital, east annex. The new pharmacy sits at the far end of a corridor system that took the facilities team two years to finish: dead ends, switchbacks and a pocket of storage rooms that look close to the pharmacy on the floor plan and are not. Scout is rewarded only when it arrives, and after thousands of steps of tabular Q-learning it has still not arrived once. The reward is too sparse for a lucky walk to find.
The obvious repair, paying Scout a little for getting closer, is also the classic way to break a task: a careless bonus changes which route is best, and Scout goes off to collect it. You will add progress in the one form that is known not to change the best route, check that claim with value iteration on your own table, and then build the progress measure itself, where the first obvious choice turns out to be wrong.
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.