14 / 15 · 2–3 h
Deliver in the workshop.
Which strategy delivers a crate despite imprecise actions?
Check my intuition
01 · Predict
Before changing the settings.
Of 20 held-out evaluation deliveries, 18 succeed. What success rate, between 0 and 1, should be reported?
A hint
rate = successes / trials
02 · Experiment and compare
Put the model to the test.
The robot carries a crate at the start and must reach G. Compare A*, the learned Q policy and random actions on the same 32 trials and environment randomness. Vary imprecision, replay several seeds and record failures. The slider steps through the first learned route.
32 evaluation episodes without exploration or Q updates, using draws separate from training. Arrows show the greedy policy; the path is the first episode.
- Q-learning success
- 100.00 %
- Random success
- 28.13 %
- A* success
- 100.00 %
Read values as a table
| Method | Held-out episode | Success | Moves | Return | Collisions |
|---|---|---|---|---|---|
| Q-learning | 1.00 | 1.00 | 14.00 | 0.48 | 0.00 |
| Q-learning | 2.00 | 1.00 | 13.00 | 0.52 | 0.00 |
| Q-learning | 3.00 | 1.00 | 12.00 | 0.56 | 0.00 |
| Q-learning | 4.00 | 1.00 | 8.00 | 0.72 | 0.00 |
| Q-learning | 5.00 | 1.00 | 8.00 | 0.72 | 0.00 |
| Q-learning | 6.00 | 1.00 | 7.00 | 0.76 | 0.00 |
| Q-learning | 7.00 | 1.00 | 8.00 | 0.72 | 0.00 |
| Q-learning | 8.00 | 1.00 | 12.00 | 0.56 | 1.00 |
| Q-learning | 9.00 | 1.00 | 6.00 | 0.80 | 0.00 |
| Q-learning | 10.00 | 1.00 | 1.00 | 1.00 | 0.00 |
| Q-learning | 11.00 | 1.00 | 13.00 | 0.52 | 1.00 |
| Q-learning | 12.00 | 1.00 | 8.00 | 0.72 | 0.00 |
| Q-learning | 13.00 | 1.00 | 2.00 | 0.96 | 0.00 |
| Q-learning | 14.00 | 1.00 | 15.00 | 0.44 | 0.00 |
| Q-learning | 15.00 | 1.00 | 1.00 | 1.00 | 0.00 |
| Q-learning | 16.00 | 1.00 | 18.00 | 0.32 | 0.00 |
| Q-learning | 17.00 | 1.00 | 4.00 | 0.88 | 0.00 |
| Q-learning | 18.00 | 1.00 | 9.00 | 0.68 | 0.00 |
| Q-learning | 19.00 | 1.00 | 3.00 | 0.92 | 0.00 |
| Q-learning | 20.00 | 1.00 | 8.00 | 0.72 | 0.00 |
| Q-learning | 21.00 | 1.00 | 4.00 | 0.88 | 0.00 |
| Q-learning | 22.00 | 1.00 | 12.00 | 0.56 | 0.00 |
| Q-learning | 23.00 | 1.00 | 3.00 | 0.92 | 0.00 |
| Q-learning | 24.00 | 1.00 | 8.00 | 0.72 | 0.00 |
| Q-learning | 25.00 | 1.00 | 8.00 | 0.72 | 0.00 |
| Q-learning | 26.00 | 1.00 | 9.00 | 0.68 | 0.00 |
| Q-learning | 27.00 | 1.00 | 9.00 | 0.68 | 0.00 |
| Q-learning | 28.00 | 1.00 | 7.00 | 0.76 | 0.00 |
| Q-learning | 29.00 | 1.00 | 8.00 | 0.72 | 1.00 |
| Q-learning | 30.00 | 1.00 | 17.00 | 0.36 | 0.00 |
| Q-learning | 31.00 | 1.00 | 1.00 | 1.00 | 0.00 |
| Q-learning | 32.00 | 1.00 | 6.00 | 0.80 | 0.00 |
| A* | 1.00 | 1.00 | 14.00 | 0.48 | 0.00 |
| A* | 2.00 | 1.00 | 13.00 | 0.52 | 0.00 |
| A* | 3.00 | 1.00 | 12.00 | 0.56 | 0.00 |
| A* | 4.00 | 1.00 | 9.00 | 0.68 | 1.00 |
| A* | 5.00 | 1.00 | 8.00 | 0.72 | 0.00 |
| A* | 6.00 | 1.00 | 7.00 | 0.76 | 0.00 |
| A* | 7.00 | 1.00 | 8.00 | 0.72 | 0.00 |
| A* | 8.00 | 1.00 | 12.00 | 0.56 | 1.00 |
| A* | 9.00 | 1.00 | 6.00 | 0.80 | 0.00 |
| A* | 10.00 | 1.00 | 1.00 | 1.00 | 0.00 |
| A* | 11.00 | 1.00 | 16.00 | 0.40 | 2.00 |
| A* | 12.00 | 1.00 | 8.00 | 0.72 | 0.00 |
| A* | 13.00 | 1.00 | 2.00 | 0.96 | 0.00 |
| A* | 14.00 | 1.00 | 15.00 | 0.44 | 0.00 |
| A* | 15.00 | 1.00 | 1.00 | 1.00 | 0.00 |
| A* | 16.00 | 1.00 | 18.00 | 0.32 | 0.00 |
| A* | 17.00 | 1.00 | 4.00 | 0.88 | 0.00 |
| A* | 18.00 | 1.00 | 9.00 | 0.68 | 0.00 |
| A* | 19.00 | 1.00 | 3.00 | 0.92 | 0.00 |
| A* | 20.00 | 1.00 | 8.00 | 0.72 | 0.00 |
| A* | 21.00 | 1.00 | 4.00 | 0.88 | 0.00 |
| A* | 22.00 | 1.00 | 12.00 | 0.56 | 0.00 |
| A* | 23.00 | 1.00 | 3.00 | 0.92 | 0.00 |
| A* | 24.00 | 1.00 | 8.00 | 0.72 | 0.00 |
| A* | 25.00 | 1.00 | 8.00 | 0.72 | 0.00 |
| A* | 26.00 | 1.00 | 9.00 | 0.68 | 0.00 |
| A* | 27.00 | 1.00 | 9.00 | 0.68 | 0.00 |
| A* | 28.00 | 1.00 | 7.00 | 0.76 | 0.00 |
| A* | 29.00 | 1.00 | 8.00 | 0.72 | 1.00 |
| A* | 30.00 | 1.00 | 17.00 | 0.36 | 0.00 |
| A* | 31.00 | 1.00 | 1.00 | 1.00 | 0.00 |
| A* | 32.00 | 1.00 | 6.00 | 0.80 | 0.00 |
| Random | 1.00 | 0.00 | 128.00 | -5.12 | 38.00 |
| Random | 2.00 | 0.00 | 128.00 | -5.12 | 37.00 |
| Random | 3.00 | 0.00 | 128.00 | -5.12 | 38.00 |
| Random | 4.00 | 1.00 | 63.00 | -1.48 | 15.00 |
| Random | 5.00 | 0.00 | 128.00 | -7.28 | 32.00 |
| Random | 6.00 | 1.00 | 106.00 | -6.48 | 23.00 |
| Random | 7.00 | 1.00 | 111.00 | -3.40 | 21.00 |
| Random | 8.00 | 0.00 | 128.00 | -5.12 | 35.00 |
| Random | 9.00 | 0.00 | 128.00 | -5.20 | 36.00 |
| Random | 10.00 | 1.00 | 11.00 | 0.60 | 0.00 |
| Random | 11.00 | 0.00 | 128.00 | -5.12 | 36.00 |
| Random | 12.00 | 0.00 | 128.00 | -6.64 | 34.00 |
| Random | 13.00 | 0.00 | 128.00 | -8.56 | 24.00 |
| Random | 14.00 | 0.00 | 128.00 | -5.12 | 45.00 |
| Random | 15.00 | 1.00 | 1.00 | 1.00 | 0.00 |
| Random | 16.00 | 0.00 | 128.00 | -8.40 | 28.00 |
| Random | 17.00 | 0.00 | 128.00 | -9.76 | 34.00 |
| Random | 18.00 | 0.00 | 128.00 | -11.36 | 33.00 |
| Random | 19.00 | 0.00 | 128.00 | -7.04 | 35.00 |
| Random | 20.00 | 0.00 | 128.00 | -6.72 | 37.00 |
| Random | 21.00 | 1.00 | 106.00 | -3.20 | 18.00 |
| Random | 22.00 | 0.00 | 128.00 | -5.12 | 56.00 |
| Random | 23.00 | 1.00 | 43.00 | -0.68 | 6.00 |
| Random | 24.00 | 0.00 | 128.00 | -9.92 | 23.00 |
| Random | 25.00 | 0.00 | 128.00 | -10.00 | 36.00 |
| Random | 26.00 | 1.00 | 83.00 | -5.32 | 22.00 |
| Random | 27.00 | 0.00 | 128.00 | -7.68 | 44.00 |
| Random | 28.00 | 0.00 | 128.00 | -5.12 | 37.00 |
| Random | 29.00 | 0.00 | 128.00 | -5.12 | 30.00 |
| Random | 30.00 | 0.00 | 128.00 | -5.12 | 28.00 |
| Random | 31.00 | 0.00 | 128.00 | -7.92 | 32.00 |
| Random | 32.00 | 1.00 | 18.00 | 0.32 | 2.00 |
Understand the calculations
03 · Connect the diagram to calculations
The numbers behind motion.
This synthesis reuses exactly the Q-learning laboratory map, transitions and evaluations. A* knows the map and replans from the current cell; Q is learned by trial and then frozen. Evaluation start cells and environment seeds are identical for all three policies. Also measure length, return and blocked actions, which represent collisions here. Cell observations are exact: the sensor, Kalman filter, continuous dynamics, arm and generative network are not integrated into this discrete scenario. The second mission connects a sensor, Kalman, A* and PID on a planar mobile robot.
success_rate = delivered / trials
path_length = number_of_actions
collisions = blocked_actions
compare: same map, starts, noise seeds, time limitA few lines to reconstruct
for seed, start in held_out_trials:
result = rollout(frozen_policy, start, seed, max_steps=128)
record(result.success, result.steps, result.collisions)The notebook provides one function per laboratory, hand-calculated examples and tests. Exercises isolate components; these pages run the complete simulations.
Keep an observation
04 · Record
What changed?
Compare two settings. Record the effect, your explanation and a case where the model might fail. Saving keeps the current settings and seed, not a certification of competence.
atomsh / lab