Course Summary: The Robot-Learning Spine

Twenty-four lectures attack two hard problems and chase one objective. Tell the router what you have. It names the method family to start with, the bill it charges, and the lectures to reopen.

Pick a robot problem, or flip the switches yourself. Watch the route light up on the course map. Then we build, piece by piece, the two hard problems, the shared objective, the decision tree, the bills, and a race you can measure.

You need the course, or at least Lectures 1 to 11. This lesson connects and decides. It does not re-teach.

Lecture 25 of 25 in Introduction to Robot Learning, CMU 16-831 (Spring 2024), taught by Guanya Shi. Slides on the course lectures page. Every idea is re-taught here in our own words and devices. Previous: Lecture 24, Foundation Models in Robotics.

Route a robot problem

What you have What you face

The routing rule is the decision tree of Chapter 4, built from the course's topic groups. The five problems are illustrative. The tree gives a starting family, not a finished system.

Chapter 0

Which Lecture Do You Open?

Map each of the 24 lectures to the part of the loop it improves

A team has a robot arm and 50 recordings of a person peeling a sticker. Nothing scores a peel. Twenty-four lectures each offer a method. Which one do they open first?

This lesson answers that question. It does not re-teach the methods. It shows the two problems every method attacks and the one objective they share. Then a short tree of questions routes a problem to a method family.

Start from the loop of Lecture 1. The robot senses. Its policy, the decision rule, picks an action. The world answers with the next state. Each lecture improves one part of that loop.

Find the lectures for each part of the loop

Each node is one part of the loop, in its series colour. Pick a part. The chips show which lectures work on it, and the read-out links them.

The grouping of lectures by loop part is ours, built from the course's eight topic groups. Some lectures touch several parts; each sits where it does most.

The sticker team has demonstrations and no reward. So they improve the policy by copying: that is imitation learning, Lectures 5 and 6. Chapter 4 turns that judgement into a rule.

The failure, as symptom, measurement and fix

The symptom is a team that reaches for its favourite algorithm. To measure it, write down what you have: a model, demonstrations, a reward, the right to try things. The fix is to let that list pick the method.

The road

  1. Errors compound: why one mistake becomes many, and which lectures fight it.
  2. Robot data is scarce: what robot time costs, and where each family finds data.
  3. One objective: the return every rung of the ladder maximizes.
  4. The decision tree: four questions that pick the starting family (the hero's rule).
  5. The bills: what each family pays for what it gains.
  6. Four threads: the ideas that run through all 24 lectures.
  7. Regret: what exploring costs, counted.
  8. Head to head: three families race on one task.
  9. Misreads and the frontier: what the course corrects, and what is still open.
  10. The field guide: every lecture, the numbers, the rule in code, and credit.
The sticker team has 50 demonstrations, no reward, and can run the arm. Which part of the loop do they improve first?

Chapter 1

Hard Problem 1: Errors Compound

Copy an expert, slip once, and watch the copy stay lost for the rest of the run

A copied policy picks a wrong action with a small chance ε (epsilon) at each step. Supervised learning predicts ε × H bad steps over a run of H steps. A robot does worse.

The first mistake puts the robot in a state the expert never visited. This is distribution shift: the policy meets inputs unlike its training data. It has no data there, so it keeps guessing. One error becomes many.

Name the quantities before the bound. Call the expert's total cost over the run J(π*), and the copy's total cost J(π̂). Each step costs at most 1, the error rate is ε and the horizon is H steps.

Say it aloud

J of pi-hat is at most J of pi-star plus epsilon H squared.

J(π̂)
J of pi-hat the copied policy's total cost over one run, in bad steps.
≤
is at most a ceiling, not a prediction. The real count can be lower.
J(π*)
J of pi-star the expert's total cost on the same task.
ε
epsilon the chance the copy errs on an expert state, per step. Between 0 and 1.
H2
H squared the horizon, in steps, times itself.
In plain words

Take the error rate ε. Multiply by H once for the steps where a mistake can start. Multiply by H again for the steps it can last. Add that to the expert's cost J(π*).

With numbers

With made-up numbers: ε = 0.002 and H = 100. The naive guess ε × H is 0.2 bad steps. The bound εH2 is 20. Double H to 200 and the bound is 80, four times as much.

Unroll twenty copies

Each bar is one run. Blue steps are on the expert's data. The tick is the first mistake; red steps are lost. Move ε and H, then compare the three summary bars.

0.010
100

Illustrative toy: once a run errs, every later step counts as lost. The expected count is the sum over steps of the chance a mistake has already happened. The bound is from Ross and Bagnell (2010).

The device counts the expected lost steps exactly. At ε = 0.002 it gives 9.5 for H = 100 and 35 for H = 200. Doubling the run more than triples the damage. Four families exist partly to fight this:

FixWhat it does about driftLecture
DAggerThe expert labels the states the policy itself reaches.6
Reinforcement learningThe policy trains on its own states, so it learns to recover.7 to 11
Conservative offline RLIt distrusts actions the log never tried.17
Online adaptationIt re-fits when the world itself moves.23

The failure, as symptom, measurement and fix

The symptom is a policy that passes tests from the expert's start states and drifts on deployment. To measure it, start from states the policy itself causes and log the error at each step. The fix is DAgger or an RL fine-tune.

A teammate says: "Our copy errs on 5% of steps. Over 200 steps that is only 10 mistakes." What is wrong?

Chapter 2

Hard Problem 2: Robot Data Is Scarce

Price robot experience in wall-clock time, then see where each family finds more

Four of the five ingredients behind GPT transfer to robots: the transformer, the loss, the optimizer and the way it generates. The fifth, the data, does not (Lecture 1). Text already exists on the web. A robot must act out its experience, one step at a time, on hardware or in a simulator you must trust.

Name the quantities. Call the number of steps you need N, the control rate f in steps per second, and the number of robots running at once R. The wall-clock time is T.

Say it aloud

T equals N over f times R.

T
T the wall-clock time to collect the data, in seconds.
N
N the number of steps of experience you need.
/
over divided by.
f
f the control rate, in steps per second (hertz). 50 Hz is common for an arm.
R
R the number of robots that collect at the same time.
In plain words

Multiply the rate f by the robot count R to get the fleet's steps per second. Divide the steps you need, N, by that. The answer T assumes no breaks, no resets and no repairs.

With numbers

With N = 10 million, f = 50 Hz and R = 1: T = 10,000,000 / 50 = 200,000 s, about 2.3 days. With N = 10 trillion, about the size of a large language model's text: T = 200 billion seconds, about 6,300 years.

Put robot experience on a clock

Set how many steps you need and how many robots you run. The marker shows the wall-clock time on a ruler that grows ten times per tick.

10 M
1

The formula assumes nonstop collection. Real fleets lose time to resets, charging and repairs, so the true time is longer.

So every family answers one question: where does extra data come from?

FamilyWhere the extra data comes fromLecture
ImitationA human expert shows the task.5, 6
Model-based RLImagined runs inside a learned model.15, 16
Offline RLLogs you already have.17
ExplorationSmarter choices of what to try.20
Sim2realA simulator, run faster than real time.21
Foundation modelsPretraining on internet-scale data.24

The failure, as symptom, measurement and fix

The symptom is a plan that needs 50 million real steps. To measure it, price the plan in robot-days with T before you start. The fix is a data source from the table, or training in a simulator.

You need 10 million steps at 50 Hz and run ten robots nonstop. About how long does collection take?

Chapter 3

One Objective, Six Starting Points

Fix the target every method shares, then climb down the ladder of what you start with

Imitation, Q-learning, model-predictive control and offline RL look like separate subjects. They chase one target. Each produces a policy that collects as much reward as it can over time.

Name the parts. The reward at step t is r-t. A later reward counts less, by a factor γ (gamma, the discount) for each step of delay. The policy π picks the actions, and its score is J(π).

Say it aloud

J of pi equals the expected value under pi of the sum over t of gamma to the t times r-t.

J(π)
J of pi the policy's score: its average discounted return.
Eπ
the expected value under pi the average over many runs in which π picks the actions. Runs differ because the world is noisy.
Σt
the sum over t add one term for each step, from step 0 to the end.
γt
gamma to the t the discount, between 0 and 1, multiplied by itself t times.
rt
r-t the reward at step t.
In plain words

Run the policy π. Shrink each reward r-t by gamma once per step of delay, and add them: that is one run's return. Average the returns of many runs to get J(π).

With numbers

With made-up numbers from Lecture 1's corridor: rewards −0.1, −0.1, −0.1, +1 and γ = 0.9. The return is −0.1 − 0.09 − 0.081 + 0.729 = 0.458. Chapter 7's code lab finds the same 0.458 as the best any policy can earn there.

What changes from rung to rung is the input. Each rung exists because the one above it assumed something you cannot always afford.

Loosen one assumption at a time

The yellow bar is the shared objective. It never changes. Pick a rung, or press the button to step down the ladder and watch which input you stop needing.

Our summary of the course's ladder. A filled dot means the rung needs the input; a ring means it can use it.

The failure, as symptom, measurement and fix

The symptom is a team that argues "imitation or RL?" as if the goals differ. To measure it, write the objective both methods serve and list the inputs each one needs. The fix is to compare inputs and costs, not goals.

What best explains the order of the ladder from imitation to offline RL?

Chapter 4

The Decision Tree

Ask four questions in order and let the first yes pick the starting family

Faced with a new robot problem, do not start from an algorithm. Start from what you have. Ask these questions in order. The first yes picks the family.

  1. A good dynamics model and a reward? Use model-based control and RL: LQR, MPC, MPPI, Dreamer (Lectures 12 to 16). It needs the fewest real samples.
  2. Demonstrations but no usable reward? Use imitation: behaviour cloning, DAgger, Diffusion Policy (5, 6).
  3. A reward, and you can try things? Use model-free RL: PPO, SAC (7 to 11). With demos too, start from them and fine-tune with RL.
  4. No new tries allowed, only a log? Use offline RL: IQL, CQL (17). With no reward, learn one first (18, 19).
  5. None of these? You can try things but nothing scores them. Learn a reward from preferences, then explore (19, 20).

Walk the tree

Set what you have. Each diamond reads yes or no. The route stops at the first yes and lights its family.

The same rule as the code lab below and the hero. All 16 combinations of the four switches route somewhere.

Order matters. A good model with a reward wins on samples, so it goes first. A reward plus the right to try is the general fallback. Offline RL sits after it because it is what remains when trying is forbidden.

The honest caveat. The tree gives the starting family, not the final system. Real robots end up hybrid: classical control where physics is known, learning where it is not, a simulator for data, and adaptation on top.

A rule you can run is a rule you understand. Write it:

The failure, as symptom, measurement and fix

The symptom is "we had demos and a reward, so we ran PPO from scratch for three weeks." To measure it, count the real steps spent before the first success. The fix is to start from the demos, then fine-tune with RL.

A robot fleet ran for months and logged everything. No new live runs are allowed. No reward was logged, but people can label runs as good or bad. Where do you start?

Chapter 5

Every Family Sends a Bill

Weight what your robot can afford and watch the ranking of the four families change

No family wins on every axis. Each buys an advantage and pays for it somewhere else. Four axes matter most on a real robot:

AxisImitationModel-free RLModel-based RLOffline RL
Samples neededFew: reuses demosMillions of stepsFewest: plans in the modelNone new
AssumesA good expertA reward and triesA model you can learnA useful log
Safe while learningYes: trains offlineNo: explores livePartly: unsafe if the model is wrongYes: no live runs
CeilingThe expertAbove the expertHigh, if the model is rightAbove the log, inside its support
Fails byDrift off the expert's statesSample cost, unsafe triesModel biasOverrating unseen actions

Weight the bill

Each slider says how much your robot cares about one axis. The bars add up each family's scores, weighted. Find a weighting where each family wins.

2
1
2
1

Illustrative scores from 1 to 5, read off the table above. Your own robot may score the families differently.

If a failure breaks costly hardware, weight safety, and imitation or offline RL rises. If you have a faithful simulator and must beat a human, weight the ceiling, and model-free RL in simulation rises. The chart is a budget, not a leaderboard.

The failure, as symptom, measurement and fix

The symptom is a method that wins the benchmark and breaks the robot. To measure it, score the candidates on all four axes before you build. The fix is to choose by the bill you can pay.

Peeling a sticker: contact physics you cannot model, plenty of demos, and safety matters while learning. Which family is the worst fit?

Chapter 6

Four Threads Through 24 Lectures

Trace the ideas that return under new names, lecture after lecture

Step back from single algorithms and four ideas keep coming back. Spotting them turns a list of methods into one subject.

  1. Closed-loop feedback. Sense again before every action, so the robot can react to what it did not predict.
  2. Distribution shift. The policy acts on inputs unlike its training data. It wears four masks: compounding error in imitation, overfitting in supervised learning, overrated unseen actions in offline RL, and the reality gap in sim2real.
  3. Sample efficiency. Every method pays for how much it learns per real step: replay buffers, learned models, logs, simulators.
  4. Generalization. A robot meets new objects, new rooms and new bodies. Structured models, adaptation and pretraining aim at this.

Trace a thread

Each cell is one lecture. Pick a thread. The lit cells are the lectures where it is central. Hover or tap a cell for its title.

Our reading of where each thread is central. Most threads touch every lecture a little.

Moravec's paradox, over all four. The lecture closes on it: the hard problems are easy and the easy problems are hard. A computer passes exams but cannot match a toddler's grasp or gait. Sensing and moving took evolution far longer to build than reasoning did.

The failure, as symptom, measurement and fix

The symptom is a learner who treats the reality gap and compounding error as two unrelated bugs. To measure it, ask what data each policy trained on and what data it now sees. The fix is to name the shift, then pick the lecture that fights it.

Compounding error, overfitting, overrated unseen actions in offline RL, and the reality gap are best seen as...

Chapter 7

Exploring Costs Regret

Count the reward a learner gives up while it finds the best action

A robot that only repeats its best-known action never finds a better one. A robot that keeps trying new ones wastes runs. Exploration is trying actions to learn about them. Regret is the reward you give up while you learn.

An ε-greedy learner picks the best-looking action, except on a fraction ε of tries, where it picks at random. Name the parts. The best possible average reward per try is μ* (mu-star). At try n the learner picks action a-n, whose true average reward is μ(a-n).

Say it aloud

R-N equals the sum, for n from 1 to N, of mu-star minus mu of a-n.

RN
R-N the regret after N tries: total reward given up.
Σn=1..N
the sum for n from 1 to N add one gap for each try.
μ*
mu-star the average reward of the best action. The learner does not know it.
μ(an)
mu of a-n the true average reward of the action picked at try n.
In plain words

At each try, subtract the true value of the picked action, μ(a-n), from the best value μ*. Add these gaps over all N tries. A learner that stops picking bad actions has a regret R-N that flattens.

With numbers

With made-up numbers: two actions pay 0.6 and 0.4 on average, so μ* = 0.6. With ε = 0.1, the learner picks at random on 10% of tries and hits the bad action on half of those. Over N = 1,000 tries that is about 50 bad picks × 0.2 = 10, plus a few early mistakes; the device below measures about 18. A learner stuck on the bad action has R-N = 200.

Tune the explorer

Two actions pay 0.6 and 0.4. The red curve is the average regret of 200 learners with your ε. The grey curve is pure greedy, ε = 0. Move ε, or let it shrink over time.

0.10

Illustrative two-action bandit with coin-flip rewards, averaged over 200 seeded learners. Shrinking divides ε by 1 + n/50 at try n.

The same idea runs over whole episodes. The lab below computes the best return with value iteration (Lecture 7), then watches an ε-greedy Q-learner (Lecture 8) close the gap.

The failure, as symptom, measurement and fix

The symptom is a regret curve that keeps rising in a straight line. To measure it, take the slope over the last few hundred tries. The fix is to shrink ε over time, or explore by optimism (Lecture 19) or curiosity (Lecture 20).

A learner with ε fixed at 0.3 has a regret curve that never flattens. Why?

Chapter 8

Head to Head on One Task

Race three families on a point mass, count their real steps, then break each one

Claims about bills are cheap, so measure them. A point mass starts at 0 and must stop at the target 1.0 after 10 steps. Each step moves it by the gain g times the action, with g = 0.8. Three families try:

Race three families

Press Race. Then make the model wrong, or start the clone off the expert's path, and race again.

0%
0.00

Illustrative toy. Model-free sees noise of 0.02 per step. Model-based spends 10 real steps to fit its gain. The clone's expert starts at 0. Green means within 0.1 of the target.

Model-based wins on steps because it spends compute, not robot time. Its risk lives in the model. It plans with its estimate of the gain, ĝ (g-hat). Call the target x* and the number of steps H = 10. The plan picks the constant action a = x*/(H·ĝ). The world then moves the mass by the true g.

Say it aloud

x-H equals x-star times g over g-hat.

xH
x-H where the mass ends in the real world after H steps.
x*
x-star the target, 1.0.
g
g the true gain of the world: how far one unit of action moves the mass. Here 0.8.
ĝ
g-hat the model's estimate of g, used to plan.
In plain words

The plan expects each step to move g-hat times the action. The world moves g times the action. So the mass ends at the target x* scaled by g over g-hat. A perfect model, g-hat equal to g, lands exactly.

With numbers

With made-up numbers: g = 0.8 and a model 30% too high, g-hat = 1.04. x-H = 1.0 × 0.8 / 1.04 = 0.77. The plan stops 23% short, and the planner believes it arrived.

Now run the race in code. The lab counts real steps for each family and tests the clone off its path.

The failure, as symptom, measurement and fix

The symptom is a planner that is confident and wrong. To measure it, compare the model's predicted end state with the real one over a few runs. The fix is to re-fit the model on new data, or plan again at every step (MPC, Lecture 13), so feedback absorbs the error.

Why did model-based need far fewer real steps than model-free?

Chapter 9

Misreads and the Frontier

Retire five common misreads, then see how far robots are from general skill

Most misreads come from one habit. People carry an idea from a setting with no sequence and no physics into one that has both.

MisreadWhy it failsLecture
Imitation is supervised learningIts predictions change its next input, so errors compound.5, 6
Offline RL is imitationOffline RL can join good pieces of different runs and beat the log, if it stays where the log has data.17
More reward shaping always helpsThe robot optimizes a wrong reward exactly: it finds the loophole.18, 19
Learning beats classical controlWith a good model, control and planning work with no learning at all.12 to 14
A bigger model fixes the data problemParameters do not create experience. Data sources do.1, 24

The lecture's honest summary: robots do well on narrow tasks and are far from general skill. A system tuned for one setting stays strong only inside it. A general system gives up some peak skill to cover more ground.

Widen the task

Slide the diversity of tasks and rooms. The pink curve is a specialist built for one setting. The purple curve is a would-be generalist.

0.20

Illustrative curves, not measured data. The shapes follow the lecture's narrow-versus-general framing.

Three questions remain open, all downstream of the data problem:

  1. Where does the data come from? Teleoperation, play data, simulation and internet video each help. None is enough alone.
  2. How do we use it? The right mix of imitation and RL, and the right architecture, are still open.
  3. What is a robot foundation model? Can pretraining give robots the prior that text gave language models (Lecture 24)?

The failure, as symptom, measurement and fix

The symptom is a demo video that fails in a new kitchen. To measure it, test on objects, rooms and lighting the training never saw. The fix today is more varied data plus adaptation; the open bet is pretraining.

Why do robots still fail at tasks a toddler does with ease?

Chapter 10

The Field Guide

Keep every lecture, the numbers, a checklist and the routing rule in code

Robot learning is learning to make sequential decisions in the physical world. Errors compound and data is scarce. Every method maximizes the same return, and differs in what it starts with. Route by what you have, then pay the bill you can afford.

All 24 lectures, by family

FOUNDATIONS: THE LOOP AND THE TOOLS

IMITATION: BORROW AN EXPERT'S DATA

MODEL-FREE RL: LEARN FROM REWARD BY TRYING

MODEL-BASED: PREDICT THE WORLD, THEN PLAN

OFFLINE DATA AND REWARDS: USE A LOG, LEARN WHAT IS GOOD

REAL-WORLD ADD-ONS: MAKE IT WORK ON A ROBOT

Terms and numbers

TermOne lineNumber to remember
Compounding errorBehaviour cloning's extra cost is at most εH².ε 0.002, H 100: bound 20, not 0.2
Robot timeT = N / (f · R).10 M steps at 50 Hz: 2.3 days
ObjectiveJ(π) is the average of the sum of γt r-t.Corridor at γ 0.9: 0.458
Decision treeModel and reward, demos without reward, reward and tries, log only.4 questions, 16 cases
RegretR-N adds μ* − μ(a-n) over N tries.ε 0.1, 1,000 tries: about 10 plus the start
Model biasx-H = x* · g / g-hat.g-hat 30% high: 23% short

Before you pick a method

  1. List what you have: a model, demos, a reward, the right to try things.
  2. Walk the tree. Write down the starting family and its lectures.
  3. Price the data in robot-days.
  4. Name the bill: samples, assumptions, safety, ceiling.
  5. Test from states the policy causes, not only the expert's.
  6. Add the add-ons you need: simulator, safety layer, adaptation, pretraining.

The routing rule in code

pythondef route(model, demos, reward, interact):
    if model and reward:      return 'model-based'    # L12-16: plan in the model
    if demos and not reward: return 'imitation'      # L5-6: copy, then DAgger
    if reward and interact:  return 'model-free RL'  # L7-11: start from demos if you have them
    if not interact:          return 'offline RL'     # L17: learn a reward first if none (L18-19)
    return 'learn a reward, then explore'          # L19-20

Keep going on this site

The takeaway. The algorithms will change. The spine will not: close the loop, expect errors to compound, price your data, and pick the method by what you have and what you can pay.

This lesson follows Lecture 25, the course summary, of CMU 16-831 Introduction to Robot Learning, Spring 2024, taught by Guanya Shi. The slides are on the lectures page. The compounding-error bound is from Ross and Bagnell (2010), restated as Theorem 2.1 of the DAgger paper. Chapters 4, 7 and 8 add devices and numbers of our own.

Now press Present or Teach and explain from memory: the two hard problems, the shared objective, the four questions and one bill per family. Then go back to the router, pick a robot problem of your own, and say which lecture you would open first.

Introduction to Robot Learning · CMU 16-831 · Lecture 25: Course Summary
Previous: Foundation Models in Robotics · Back to Lecture 1 · Back to Gleams