FixTheRobot Explore Robotics / Robot Learning / M10 / M10-L4

This lab works on phones, but writing code is much easier on a laptop.

Robot Learning · Sim-to-Real Transfer and Robustness · M10-L4 · Intermediate

Plan a Staged Rollout

Experiment log · Scout at Meridian General Hospital

Experiment log, Meridian General Hospital, Scout's first ward deployment. The tight policy passed every test in the simulator. The facilities team wants it in the east ward next month, where patients walk past the pillar. Nobody believes the simulator is exactly the floor, and nobody knows in which way it is wrong.

You will not write code. You plan the rollout: how many trials in an empty hall, how many with staff nearby, a speed limit for the stages with people, how much worse than the simulator's prediction a trial may be before it counts as flagged, and how many flagged trials out of ten trigger a rollback to the cautious policy. The page then runs real simulated trials through four hidden incidents: the real floor from day one, a degrading sensor, a creeping actuator delay, and a harmless wear that must not trigger anything. It reports crashes with people nearby, how long a hazard reached people before the rollback, and false rollbacks.

Your task

    Simulation
    solution.pyLoading Python…
    Ctrl+Enter runs
    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.

    Hints

    What this lab teaches

    Stage 1 shows what a pilot in an empty hall buys: a hazard that is present from the first trial is found while a crash harms nobody, the pilot logs identify the real gain, drag and delay by least squares (system identification, lesson M10-T3), and a speed limit lowers the damage at a cost in goal rate. Stage 2 tunes the monitor and the rollback rule on hazards that start during service: a margin that is too wide reacts only to crashes, one that is too tight reacts to noise. Stage 3 puts everything together on four incidents, including a harmless one, so that the price of false rollbacks is visible.

    Grading is result-based, on incident schedules you do not see: crashes with people nearby, the number of trials a hazard reaches people before the rollback, rollbacks that fire before a hazard exists, the pilot budget, and the share of service trials that still reach the goal.

    The questions are about what staging does and does not do: it manages exposure to a hazard, it does not remove the hazard (lesson M10-T5).

    Theory for this lab

    Sim-to-Real Transfer and Robustness labs

    1. M10-L1: Randomize the Simulator
    2. M10-L2: Stress-Test a Policy
    3. M10-L3: Detect When the Policy Is Out of Distribution
    4. M10-L4: Plan a Staged Rollout: this lab.

    Educational simplification: one pillar, four hand-made incident types with fixed schedules, a monitor signal that is the closest approach to the pillar compared with the simulator's prediction for the same start, a fixed cautious policy as the rollback target, and trial counts standing in for days of operation. Every trial is a real simulated episode, but the incident list is the simulator's, not a real robot's. Not a safety case.

    Get the next lab

    Get notified when new robotics labs are released. One email per new lab, nothing else.