Robot Learning · Offline and Data-Efficient Learning · M8-L1 · Intermediate
Build a Replay Buffer
Experiment log · Scout at Meridian General Hospital
Experiment log, Meridian General Hospital, east corridor. Scout runs the night-shift supply route and records every step it takes. Out of thousands of uneventful metres there are a handful of collisions with a linen cart, and the learning team has noticed something odd: a policy that avoided the cart last week now clips it again.
The replay memory is the suspect. It holds a fixed number of steps, and once it is full it must decide what to throw away and what to hand to the learner next. You will write the three pieces that decide that: the buffer that overwrites its oldest entry, the draw that picks a minibatch, and the prioritised draw that replays surprising steps more often, together with the weights that keep that from biasing the learner.
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.