Introduction to Robot Learning · Lecture 2 of 25 · CMU 16-831

Robot Learning: An Overview

A bird's-eye tour of the whole field: why a brain exists for movement, what a policy really is, and the ladder of methods from copying an expert to learning a world from scratch.

Prerequisites: basic vectors + a little Python. Lecture 1 helps but isn't required.
9
Chapters
6
Simulations
3
Code Labs

Chapter 0: The Animal That Eats Its Own Brain

There is a small marine animal called the sea squirt. In its youth it swims, a tadpole-shaped larva with a primitive eye, a tail, and a tiny nervous system, drifting through the ocean hunting for a place to live. When it finds a good rock, it cements its head to the surface, stops moving forever — and then does something startling. It digests its own brain and nervous system and absorbs them for nutrients.

The neuroscientist Daniel Wolpert tells this story to make one blunt claim, which is the thesis of this entire lecture: "We have a brain for one reason and one reason only, and that's to produce adaptable and complex movements." Once the sea squirt no longer needs to act in the world, it has no further use for a brain. So it eats it.

The big idea. A brain is not a passive recognizer of images or a calculator of facts. It is fundamentally a controller — an engine for turning perception into action, again and again, in a world that pushes back. That is exactly what we are trying to build into a robot, and it is what makes robot learning its own field rather than a corner of computer vision.

This reframes what "intelligence" even means. We are dazzled by systems that play chess or write essays, and we wave away the fact that a one-year-old child can pick up a strange spoon, on a strange table, and bring it to her mouth without a second thought. But which of those is actually hard for a machine?

Hans Moravec noticed the answer decades ago. Moravec's paradox states that the hard problems are easy and the easy problems are hard. In Moravec's own 1988 words: it is comparatively easy to make computers play checkers or pass intelligence tests, and difficult or impossible to give them the perception and mobility skills of a one-year-old. Abstract reasoning is recent and rare in evolution; perception and movement are billions of years old and exquisitely tuned. Evolution spent three and a half billion years refining motor control and only the last sliver of time on language.

Moravec's ladder — the inverted difficulty of intelligence

Hover or click each rung. Things humans find effortless (perception, grabbing a mug) took evolution the longest and are hardest for robots. Things we find impressive (chess, language) are youngest and, for machines, the easiest.

Pick a rung above.

So why is grabbing a mug so hard? A tempting answer is "our hardware is just better — human muscles beat robot motors." The instructor pushes back: that's likely not the bottleneck. A cheap teleoperated robot (the Mobile ALOHA system costs under thirty-two thousand dollars and has only sixteen degrees of freedom) can do delicate kitchen tasks beautifully when a human is driving it. The motors are fine. What's missing is the algorithm that closes the loop the way a brain does: perception, planning, control, and action, all coupled together, all reacting to each other in real time.

Where this lecture is going. The whole point of robot learning is to build that brain — the perception-to-action loop. The rest of this lesson is the tour: the loop itself and the reward that drives it (Ch 1), what a policy actually is as a function (Ch 2), the ladder of methods that learn one (Ch 3), whether the robot is handed a model of the world or must learn it (Ch 4), how skills stack into plans (Ch 5), and where the frontier actually stands today (Ch 6).

Wolpert's sea-squirt story and Moravec's paradox both point to the same lesson. What is it?

Chapter 1: The Agent–Environment Loop and the Reward Hypothesis

If a brain exists to produce action, then we need a precise picture of how action and perception fit together. Reinforcement learning gives us the cleanest one, and it is just two boxes and two arrows. It comes straight out of the opening chapter of Sutton and Barto.

On one side is the agent — the decision-maker, the thing we are building. On the other side is the environment — everything else: the floor, gravity, the mug, the wind. They talk to each other in a never-ending cycle.

Agent observes state st
The agent reads the situation of the world right now (pixels, joint angles).
↓ the agent chooses…
Action at
It acts: a torque, a wheel speed, a gripper command.
↓ the environment responds with…
Reward rt & next state st+1
A number scoring that action, plus the new situation the action produced.
↻ the agent observes st+1 and the loop repeats, forever

That loop is the heartbeat of every method in this course. The agent never gets to see the whole future; it only ever sees where it is now, picks an action, and gets pushed somewhere new. The single arrow that makes this hard — and makes it a control problem and not just a prediction problem — is the one from the action back into the environment: your action changes the next state you have to deal with.

What is the agent trying to do? The reward hypothesis

The environment hands back a single number at every step: the reward, written r(s, a) — a score for taking action a in state s. Sutton and Barto elevate this to a foundational claim called the reward hypothesis:

The reward hypothesis. Everything we mean by goals and purposes can be captured as the maximization of the expected value of the cumulative sum of a single scalar reward signal. In plain words: whatever you want the robot to do, you can express it as "collect as much reward as possible over time."

This is a remarkably strong and slightly uncomfortable claim. "Walk without falling," "stack the blocks," "win the soccer match" — the bet is that each can be boiled down to one number per step, and that maximizing the long-run total of that number produces the behavior you wanted. The agent's true objective is not the reward at this instant; it is the return — the sum of all future rewards, with rewards further in the future counted a little less (a far-off reward is worth less today, the same way a dollar next year beats nothing but is worth less than a dollar now).

Let's make that concrete. Suppose a walking robot earns plus one for every step it stays upright and minus ten the moment it falls. Over an episode it racks up a sequence of rewards; the return is what we add up. The lab below builds exactly this accumulation — the quantity every algorithm in the course is secretly trying to grow.

Why discounting flips the sign here. The undiscounted sum is eight plus-ones minus ten, which is minus two — falling looks fatal. But the fall happens eight steps out, so it's multiplied by gamma to the eighth (about 0.78), shrinking the penalty to roughly minus 7.8. The eight near-term plus-ones barely shrink at all. Net return turns positive: a far-off disaster, discounted, is less scary than near-term gains are sweet. That tension — pay now, suffer later — is the whole drama of sequential decisions.

The reward hypothesis claims that…

Chapter 2: A Policy Is a Function from State to Action

We keep saying the agent "chooses an action." Let's pin down the object that does the choosing, because it is the thing we actually learn and the thing every method in the course produces. It is called the policy, written π (the Greek letter pi).

The whole job in one line. A policy is a mapping from state to action: a = π(state). You give it what the robot currently sees; it gives you back what the robot should do. Everything else in robot learning is machinery for finding a good π.

The instructor draws this with the most important example in modern robotics: a policy that maps an image to a control. The slide for imitation learning shows it literally — a network learns the mapping "from state (image) to control (steering direction)." So let's trace the actual data, because a policy is not an abstract arrow; it is a concrete function with concrete shapes flowing through it.

Concept becomes realization: the shapes

Say the robot is a self-driving car and its sensor is a forward camera.

Observation in
An RGB image. As a tensor: height × width × 3 channels, e.g. 224 × 224 × 3 — about 150,000 numbers, each a pixel brightness.
↓ flatten / convolve, then pass through the policy network π…
Policy network πθ
A neural net with weights θ (theta). These weights are what training changes. It squeezes 150,000 pixels down to a tiny answer.
↓ emit…
Action out
A short vector. For a car: one number (steering angle). For an arm: maybe 7 numbers (joint velocities). A vector of length 1 to ~20.

Read that top to bottom and the magnitude of the problem jumps out: the policy compresses a high-dimensional input (an image is a huge, raw, mostly-irrelevant blob of pixels) down to a low-dimensional output (a handful of motor numbers). The instructor names this the central difficulty of unifying perception and control: "How to get to the low-dimensional manifold of meaningful things from raw input." Most of those 150,000 pixels are sky and asphalt; the policy must learn which few features (the lane lines, the car ahead) actually decide the steering.

The flip side is just as hard for some robots: a humanoid has a high-dimensional output too — dozens of joints — and the search space of action sequences grows exponentially with the number of steps. Perception is hard because the input is huge; control is hard because the output space is huge; doing both at once is robot learning's signature challenge.

The simplest possible policy: a line

You don't need a deep network to feel what a policy is. The simplest one maps state to action with a single straight line: action = slope × state + offset. We can learn that line from demonstrations by plain supervised regression — show it states paired with the expert's actions, and fit the line that best reproduces them. That is the seed of imitation learning, which we'll meet on the ladder next chapter.

Image → policy → action: watch the dimensions collapse

A toy 8×8 camera frame (left) is fed to a policy that must squeeze it to a single steering number (right gauge). Drag the lane offset slider: the bright lane pixels shift, and a good policy turns that shift into the correct steer. The point is the funnel — thousands of pixels in, one action out.

Lane offset 0.00
In "the policy maps an image to a steering command," what makes this mapping fundamentally hard?

Chapter 3: The Ladder of Methods — Easiest to Hardest

So we want a good policy. How do we get one? The lecture surveys the family of methods this course will teach, and they are not a random list — they form a ladder of difficulty, ordered by how much help the robot is given and how much it must figure out for itself. Climb it and the assumptions get weaker, the data gets harder to come by, and the autonomy goes up.

RungMethodWhat it's givenHow it learns the policy
1 (easiest)Supervised / Imitation LearningExpert demonstrations (state–action pairs)Copy the expert: regress action on state
2Model-free RLOnly a reward signal; trial and errorMake "good stuff" likelier, "bad stuff" rarer
3Model-based RLReward + ability to learn a world modelLearn the dynamics, then plan inside it
4 (hardest data)Offline RLA fixed logged dataset — no interactionSqueeze a policy from old data, no exploring

Let's walk the rungs, because the distinction between them is the spine of the syllabus.

Rung 1 — Imitation learning

Imitation learning is the easiest because someone already solved the task: a human expert. You collect demonstrations and train the policy to reproduce the expert's action at each state — exactly the regression you just coded. The catch (the whole subject of Lecture 6) is that the moment your copy makes a small mistake, it drifts into states the expert never showed it, and the errors snowball. But when good demonstrations exist, nothing is faster.

Rung 2 — Model-free reinforcement learning

Model-free RL throws away the expert. The robot learns purely from interacting with the environment — trial and error, guided only by reward. The instructor's one-line summary of the basic policy-gradient algorithm REINFORCE: "make good stuff more likely and bad stuff less likely." No model of the world is built; the robot just tries things and reinforces what worked. It's powerful and general, but desperately data-hungry, because trial and error in the physical world is slow and risky.

Rung 3 — Model-based RL

Model-based RL adds a clever twist: instead of only reacting, the robot learns a model of the world's dynamics — a "world model" that predicts the next state from the current state and action — and then plans inside that model. The instructor's framing: no simulator handed to you, so you collect data from the real robot, learn a model, design a policy against it, and deploy. Because you can "imagine" rollouts in your learned model instead of executing every one for real, it is far more sample-efficient — it squeezes more behavior out of fewer real interactions.

Rung 4 — Offline RL

Offline RL is the strictest: you get a fixed dataset of logged experience and you may not interact with the world at all — no exploring, no trying things, because online interaction is expensive and unsafe. The instructor flags the key contrast: unlike imitation learning, offline RL does not rely on expert data — the logged trajectories can be mediocre or random, and the algorithm must still distill a good policy from them. That makes it powerful and treacherous in equal measure.

The organizing question. Every rung is a different answer to where the supervision comes from. Imitation borrows a human's answers. Model-free RL discovers them by trial and error. Model-based RL imagines them with a learned simulator. Offline RL mines them from a frozen log. Read the ladder this way and the whole course suddenly has a shape.

The difficulty ladder — same task, four kinds of help

Click a rung to see what that method is handed and what it must figure out for itself. The bars show the trade: more help (left) means easier learning but a ceiling set by your demos; less help (right) means harder, hungrier learning but the freedom to surpass any expert.

Pick a rung above.
What single distinction separates offline RL from imitation learning, per the lecture?

Chapter 4: Known World vs. Learned World

There's a fault line running underneath that whole ladder, and it's worth surfacing on its own because it explains why the rungs differ. It is the question: does the robot have a model of the world's dynamics, or must it learn one?

A model of the dynamics (also called a transition model or world model) is a function that answers: if I'm in this state and I take this action, what state do I end up in? If you have it, you can plan — simulate the consequences of actions in your head before committing to any.

SituationYou have the dynamics…Then you can…
Explicit / known modelby hand, from physics (mass, friction, geometry)use classical optimal control: LQR, MPC, trajectory optimization
Learned modelby fitting it from data the robot collectsdo model-based RL: plan inside the learned model
No modelyou don't have it and don't even try to build itdo model-free RL: pure trial and error

The instructor draws the contrast crisply: model-free RL assumes the dynamics are unknown and doesn't even attempt to learn them — it just reacts. Model-based methods either get the model handed to them (explicit physics) or learn it from real data and then design a controller against it. When the physics is clean and known, classical control with a known model is breathtaking — this is how Apollo flew to the Moon and how legged robots do backflips. When the physics is unknowable (contact, deformable objects, a changing floor), you must learn the model, or skip it entirely.

Why the choice matters so much. A model is leverage: with a good one, a single real-world interaction teaches you about many imagined futures, so you need far less data. But a wrong model is worse than none — you'll plan confidently toward disaster. The art of model-based RL is learning a model accurate enough to plan with, while knowing exactly where it can't be trusted.

Let's feel that leverage directly. The lab pits two learners against each other on the same task: a model-free learner that must visit every state to learn its value, versus a model-based learner that builds a one-step map of the world and then propagates value through it. With the same handful of real transitions, the model-based learner figures out the right move from far more states.

What is the defining assumption of model-free RL?

Chapter 5: High-Level Plans, Low-Level Skills

Recall Moravec's ladder from Chapter 0: low-level motor skills sit at the bottom (ancient, hard for machines), high-level planning and language near the top (recent, easy for machines). That same split structures how a real robot is built. Intelligent behavior is almost never one flat policy from pixels to torques — it is a hierarchy.

At the top sits the high-level plan: "to make a salad, first grab the bowl, then chop the lettuce, then toss." This is symbolic, slow, and abstract — the domain where language models now shine (the instructor cites systems that use a large language model to lay out the steps). At the bottom sit the low-level skills: the actual joint torques that reach for the bowl and close the gripper without crushing it. Fast, continuous, reactive — the part that's genuinely hard.

High-level plan
Pick the next subgoal: "go to the bowl." Slow, abstract, symbolic. Runs maybe once a second.
↓ hands a subgoal down to…
Low-level skill
Produce the torques that actually reach the subgoal. Fast, continuous, reactive. Runs ~50 times a second.
↻ subgoal reached → ask the planner for the next one
Why split at all? Searching directly for a sequence of low-level torques to make a salad is hopeless — the search space explodes with every step. But choosing among a handful of subgoals is easy, and reaching one subgoal with a reusable skill is tractable. The hierarchy turns one impossible search into two easy ones. This is also why the same low-level "reach" skill can be reused across hundreds of high-level tasks.

The lecture's deeper point is that these levels can't be designed in isolation. Classical robotics built perception, planning, and control as separate modules that barely talked to each other — and errors at one interface got amplified by the next. The instructor's striking example: a human teleoperator succeeds where an autonomous robot fails on identical hardware, precisely because the human runs perception, planning, control, and actuation as one tightly coupled closed loop. The same lesson appears in drone racing: it took a team over seven years to beat the human champion, and even then only on one known track. Humans win by coupling the levels; robot learning's promise is to learn that coupling instead of hand-designing it.

Flat search vs. hierarchy — reach a goal behind a wall

A robot (warm) must reach the goal (teal) but a wall blocks the straight path. Flat mode steers directly at the goal and jams against the wall. Hierarchy mode picks a subgoal (the gap, a purple waypoint) first, then a simple reach skill drives to it — one hard problem split into two easy ones.

Ready.
Why decompose a robot's behavior into a high-level plan over subgoals plus low-level skills, rather than one flat policy?

Chapter 6: Where We Are Today — and Where We Fail

The lecture spends its middle showing real systems, so the survey isn't abstract. It's worth knowing the gallery, because it tells you which ideas already work in the wild and which are still aspirational.

What already works

SystemRecipeRung
DM Control Soccer; Gran Turismo Sophy (beats human drivers, no collisions)Deep RL in simulation + distributed training + careful reward designModel-free RL
Eureka (dexterous pen-spinning)A language model writes the reward functionReward design via LLM
DeepMind 1-v-1 soccer robots; DATT trajectory trackingTrain in sim, deploy on real hardware (Sim2Real) + online adaptationSim2Real
RoboCook (best-systems paper)Learn a structured world model of dough/tools, plan in itModel-based RL
Rope-whipping to a target; DNN dynamics + sampling-based controlCollect real data, learn a "delta" dynamics model, planModel-based RL
Diffusion policy; Mobile ALOHACollect human teleoperation demos, imitation-learn the policyImitation

Notice the spread: every rung of the Chapter 3 ladder has a flagship success. NVIDIA's Isaac Gym (massively parallel simulation) and data-driven safety filters round out the toolkit — the safety filter sits on top of any policy and vetoes actions that would break hardware, because, as Lecture 1 put it, physics doesn't forgive.

Where it still fails — and why that's the interesting part

Then the instructor shows the bloopers: robots fumbling tasks "that seem very simple for humans." The 2015 DARPA Robotics Challenge is full of humanoids toppling over while opening a door. Even Mobile ALOHA, which can do beautiful kitchen work under teleoperation, fumbles when running autonomously.

This is Moravec's paradox biting again. The failures cluster exactly where Chapter 0 predicted: the "easy" things — perception and dexterous mobility in an unstructured world — are precisely where robots fall down, while the "hard" things — planning, language, game-playing — are nearly solved. The gap between teleoperated success and autonomous failure tells you the bottleneck is not the hardware. It is the algorithm that must close the perception-to-action loop without a human in it.

The instructor frames the open problem honestly with the four pillars from Lecture 1 — algorithm, data, computation, hardware — and asks: how far are we from embodied intelligence in the real physical world? Robot learning has made far more progress at improving each module (better perception, better control) than at unifying them into one seamless brain. Closing that gap — getting perception, planning, and control to co-adapt the way they do in a crow tracking a target or a person placing their feet on rough ground — is the real frontier, and the reason the field is wide open for you.

Robots today nail chess-like planning but fumble tasks "that seem very simple for humans" like dexterous manipulation. What does this pattern confirm?

Chapter 7: Showcase — The Robot-Learning Bench

Time to put the tour in one place. A robot must reach a sequence of goals in a world with an unknown push (a "wind"). You hold the dials that map onto the whole survey, and you can watch one method outclimb another in real time.

The robot-learning bench — climb the ladder against the wind

Press Run. The robot (warm) chases goals (teal dots) while an invisible wind pushes it. Switch the method and crank the wind: the imitation heuristic and the reactive model-free policy both sag as the wind rises, while the model-based agent learns the wind and leans into it. Watch the return climb.

Wind0.40
Ready. Method: model-based.

The instructive sweep is to set the wind high and step through the three methods. Imitation drifts because its straight-line "expert" never anticipated a current; model-free fights the wind reactively but with a steady-state offset; model-based, which estimates the push and cancels it, sails to the goals with the highest return. That progression — copy, react, model — is the ladder you climbed in Chapter 3, made visible.

Read it as the whole course. Each method here is a stand-in for weeks of material: imitation (Lectures 5–6), model-free RL (the largest block), model-based RL (the guest-lecture block), and the online adaptation that lets the model-based agent track the wind (a specialized-topics lecture). Break the bench, and you're stress-testing the field.

Chapter 8: The Map of the Whole Course

You now have the aerial view. Lecture 1 told you what robot learning is and why it's hard; this lecture showed you the landscape of methods that attack it. Here is how the topic groups hang together — the same ladder you climbed, now labelled as the syllabus.

1–2 · Foundations
What/why robot learning; a deep-learning refresher (paradigms, architectures, optimization).
↓ borrow a human's answers
3 · Imitation Learning
Map state to action by copying demos; fight compounding error; diffusion policy.
↓ learn from reward by trial and error
4 · Model-Free RL
Value/policy iteration, Q-learning, policy gradients (REINFORCE), actor-critic.
↓ learn a world model and plan in it
5 · Model-Based RL
Known-model control (LQR, MPC); learned dynamics (CEM, MPPI, Dreamer).
↓ squeeze a frozen dataset
6 · Offline Data
Offline RL (no expert needed) and inverse RL (recover the reward).
↓ decide what to try; specialize
7–8 · Bandits & Frontiers
Exploration, preference learning; Sim2Real, safe RL, adaptation, LLMs/VLMs in robotics.
Cheat sheet — the overview you now own.
  • Why a brain = to produce action (Wolpert's sea squirt); intelligence exists for movement, and Moravec's paradox says sensorimotor skill is the hard core.
  • The loop = agent observes state, acts, gets reward and next state, repeats; the action changes the next state.
  • Reward hypothesis = every goal = maximizing the expected cumulative discounted reward (the return).
  • A policy = a function from state to action, a = π(state); it compresses a high-dimensional observation into a low-dimensional action.
  • The ladder = imitation → model-free RL → model-based RL → offline RL, ordered by how much help you're given.
  • Known vs learned model = known dynamics → classical control; unknown → learn a model (model-based) or skip it (model-free).
  • Hierarchy = high-level plan over subgoals + reusable low-level skills; splits one impossible search into two easy ones.

Where to go next on this site

You came in from Lecture 1 — What Is Robot Learning?. To turn each thread of this overview into full understanding, these companion Gleams expand the rungs:

The test of this lesson. Open the Lecture 2 slides. You should now be able to explain, from memory: why a brain exists for movement, what the agent–environment loop and the reward hypothesis are, what a policy is as a function with concrete shapes, the four-rung ladder of methods and what distinguishes each, the known-versus-learned-model fault line, and why behavior is built as a hierarchy. If you can, you're ready to start climbing the ladder for real.

"We have a brain for one reason and one reason only — to produce adaptable and complex movements." — Daniel Wolpert