Theme
Tier 6 · lesson 9 of 9 · 45 min

Learn from demonstration, and find what it was never shown

You will: Train a policy from recorded demonstrations, and measure where it fails.

Builds on Two arms, one motion: leader and follower, Datasets, splits, and the leak you did not look for and Shipping a model like software.

Everything so far told the arm what to do. Imitation learning shows it instead: record demonstrations with the leader arm, train a policy that maps what the camera sees and where the joints are to the next command, and let it drive.

It works more often than it has a right to, and it fails in a way worth understanding. A policy has only seen the states its demonstrations passed through. Nudge the arm somewhere a demonstration never went and its errors compound: each small mistake takes it further from anything it knows. So the honest evaluation is not "it picked the cube up" but where it stops working, measured: the cube moved a few centimetres, the light changed, a distractor on the bench.

The SO-101 is the arm most of this work is published on, which makes it a fair place to start, and the rest of this course is what makes the result trustworthy: a dataset with a manifest, a test set split by episode, a model shipped with gates and rollback, and readiness that notices a joint straining.

Planned: the steps on the SO-101 are not written yet. Waits on the leader arm and the dataset lessons. Training a policy needs a GPU, your own or rented; the lesson will say how much.

In the simulation

Record a demonstration and replay it: a replay is the narrowest possible policy, one that has seen exactly one episode. Then move the target a few centimetres and see that the replay does not follow. With a real leader arm, the Lab page's Leader panel drives the sim and Record captures it. The trained policy is planned.

Kinematic: joints move at their real speed limit, but there is no gravity, no load and no physics.

The SO-101 loads as you reach it.

In this lesson

  1. Press Record, open the jaw and bring it down onto the cube, then press Record again to stop.
  2. Press Replay and watch it repeat the demonstration exactly.
  3. Suppose the cube moved 5 cm to the right: put the tool there, y 0.04 to 0.08, low. The replay would still go to the old spot.

Terms

Imitation learning
Training a policy to copy demonstrations, rather than writing the behaviour by hand or rewarding it into existence.
Compounding error
Small mistakes that take a policy into states its demonstrations never visited, where its next mistake is larger.