Robot Learning · Model-Based Robot Learning · M7-L2 · Intermediate
Plan with Random Shooting
Experiment log · Scout at Meridian General Hospital
Experiment log, Meridian General Hospital, logistics corridor. With the dynamics fitted (lab M7-L1), Scout no longer needs a trained policy to reach the pharmacy: it can imagine futures. At every moment it will try a few dozen random command sequences in its head, see where each would lead, and carry out the best.
You will write the three pieces of that planner: the cost that says which imagined future is better (including a hefty penalty for hitting the pillar), the loop that rolls every candidate through the model and picks the cheapest, and the cross-entropy refit that concentrates the next batch of guesses around the best ones. JavaScript supplies the candidates and then drives your chosen plan on the real floor.
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.