Robot Learning · Reinforcement Learning Foundations · M4-L4 · Intermediate
Debug a Q-Learning Agent
Experiment log · Scout at Meridian General Hospital
Experiment log, Meridian General Hospital. A colleague hands over three versions of Scout's tabular Q-learning agent. Each one runs without an error, each one prints plausible numbers, and none of them learns: the return per episode is flat, or the routes ignore the shortest way, or the plan at the start of the ward is arbitrary.
You will read each agent as a reviewer would: compare its table and its learning curve with a reference agent that sees exactly the same random numbers, name the symptom, find the one line responsible and fix it. The hidden tests run your function on other wards and measure the exact value of the policy your table implies.
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.