Princeton Intro to Robotics (Fall 2026) | Lecture 20: Reinforcement learning
Overview
The lecture introduces model-free reinforcement learning for robotics, formalizes the problem as a Markov decision process, and derives the REINFORCE policy-gradient estimator, with PPO as a practical extension. It connects the theory to robotic practice: GPU-accelerated simulation, curriculum learning, carefully shaped rewards, and domain randomization support sim-to-real locomotion, while manipulation remains harder to simulate reliably.
Key takeaways
- The REINFORCE estimator uses sampled trajectories and ∇θ log πθ(Aₜ|Sₜ) weighted by reward, avoiding the need to know or differentiate through robot dynamics.
- RL can improve an imitation-learned manipulation policy when demonstrations provide a useful starting point but do not achieve the desired task success or throughput.
- Legged locomotion commonly combines PPO, GPU-parallel simulation, curriculum learning, dense reward shaping, and domain randomization to transfer policies to real robots.
- Domain randomization trains policies across varied simulated friction, mass, inertia, and collision settings so they are less vulnerable to sim-to-real mismatch.
- Manipulation remains more challenging to transfer from simulation than locomotion because object geometry, friction, contact, and deformable-object dynamics are harder to model.
Chapters
- Imitation learning trains policies from expert demonstrations, including behavioral cloning and DAgger data augmentation.
- Inverse reinforcement learning infers the reward an expert appears to optimize, then uses reinforcement learning to pursue it.
- Model-free methods learn a policy without explicitly predicting dynamics; model-based methods use a dynamics model.
- Imitation learning is bounded by the expert's capabilities, so a policy generally cannot outperform the demonstrations it copies.
- Teleoperation can collect manipulation demonstrations, but safely teleoperating a humanoid that must avoid falling is much harder.
- Reinforcement learning aims to discover strategies through interaction without requiring an expert to demonstrate every behavior.
- A simulated car receives higher rewards for approaching a parking goal and penalties for collisions.
- Early attempts produce erratic driving; after about 100,000 episodes the car begins to behave reasonably.
- The demonstrated policy reaches competent parking after roughly 310,000 episodes, illustrating the interaction demands of trial-and-error learning.
- DeepMind's Atari agents demonstrated reinforcement learning for video-game control, while AlphaGo defeated Lee Sedol in 2016 using a model-based approach.
- Sergey Levine and collaborators used Google's robot arm farm for real-world trial-and-error manipulation, including deformable objects.
- Work from Marco Hutter's group showed legged robots learning locomotion in simulation and transferring the learned policy to real terrain.
- Reinforcement learning can produce emergent behaviors that are not directly specified by human demonstrations.
- Unlike supervised learning with a fixed dataset, an RL agent's actions influence which observations and training data it encounters next.
- Credit assignment asks which earlier actions caused a later success or failure, even when the consequence appears much later.
- For manipulation, a common approach is to fine-tune an imitation-learned policy with RL to improve task success or factory throughput.
- Locomotion policies are often trained from scratch in simulation, while unsafe real-world trial and error makes simulation or safety measures essential.
- A Markov decision process specifies a state space, action space, transition dynamics, initial-state distribution, and reward function.
- The lecture uses reinforcement-learning notation: state Sₜ corresponds to control-theory state Xₜ, and action Aₜ corresponds to a control input.
- The objective is to maximize expected cumulative reward, often discounted by γ so that distant future rewards count less.
- Model-free methods learn the policy directly, while model-based methods attempt to learn or approximate the transition dynamics.
- A stochastic policy returns a distribution over actions for each state, from which the robot samples an action at runtime.
- Although an MDP has an optimal deterministic policy, stochastic policies can make policy-gradient algorithms easier to use.
- A POMDP represents uncertainty in sensing with an observation model that maps states to distributions over observations.
- Practical RL often treats observations, or a history of observations, as if they were the state, despite incomplete information.
- A policy-gradient algorithm parameterizes a policy πθ, collects experience, estimates the gradient of expected cumulative reward, and updates θ.
- High-reward trajectories should become more likely under the updated policy, while low-reward behavior should become less likely.
- The objective J(θ) is expected reward over trajectories generated by both the policy and the environment's dynamics.
- Numerical finite differences are impractical for neural policies with millions or more parameters because each parameter perturbation requires additional rollouts.
- A Monte Carlo estimate of J(θ) averages cumulative rewards across sampled trajectories.
- Finite differences would perturb each policy parameter and rerun the policy to measure its effect on reward.
- For a neural network with millions or billions of weights, the required number of perturbed-policy evaluations becomes infeasible.
- Policy-gradient methods instead use the log-probability trick to estimate gradients from ordinary sampled trajectories.
- The identity ∇θpθ(τ) = pθ(τ)∇θ log pθ(τ) rewrites the trajectory-probability gradient in a useful form.
- A trajectory probability factors into an initial-state probability, policy action probabilities, and environment transition probabilities.
- The initial-state and dynamics terms do not depend on θ, so their gradients vanish; only policy log-probabilities remain.
- This yields a Monte Carlo estimator based on ∇θ log πθ(Aₜ|Sₜ) multiplied by trajectory reward, without differentiating through unknown dynamics.
- REINFORCE samples N trajectories using the current policy, estimates the expected-reward gradient, and updates θ by a learning-rate-scaled step.
- The basic update can be unstable if the learning rate causes the policy to change too much at once.
- Proximal Policy Optimization, or PPO, limits overly large policy updates through clipping.
- PPO is a widely used policy-gradient method for robotic locomotion.
- Training legged robots through real-world trial and error would require repeated falls, so policy-gradient updates are performed in simulation.
- GPU-accelerated simulation enables thousands of parallel rollouts for estimating policy gradients.
- Curriculum learning progresses from flat ground to increasingly uneven terrain, making difficult skills easier to acquire.
- Dense reward shaping provides incremental feedback instead of only a sparse success signal, and carefully tuned reward terms help produce natural motion.
- Training randomizes simulated friction, mass, inertia, and collision parameters to reduce sensitivity to simulator inaccuracies.
- The aim is to make the policy robust across a range of simulated dynamics so that it can tolerate differences on the real robot.
- A reported training demonstration shows reasonable behavior after about 10 minutes and traversal of more complex terrain after roughly 20 minutes.
- The trained locomotion policy is deployed on a real robot without additional fine-tuning.
- Modern legged and humanoid systems use simulated policy-gradient training, often PPO, plus domain randomization for real-world deployment.
- An RL-trained whole-body controller can track planner waypoints, mirror a person's motion, or move a humanoid to satisfy gripper targets from a vision-language-action model.
- OpenAI's dexterous Rubik's Cube demonstration used a similar simulation-and-randomization pipeline.
- Manipulation is harder to transfer because object geometry, friction, contact dynamics, and deformable materials are more difficult to simulate than locomotion.
- Sutton and Barto's textbook is recommended for reinforcement-learning theory and algorithms.
- The lecture points students to a robotics reference-text chapter covering related material.
- Princeton course 435 is identified as a fuller introduction to reinforcement learning.
Transcript excerpt
0:10 All right, I think we can get started. [clears throat] So, yeah, I guess a couple of lectures ago I presented this taxonomy of robot learning. So, imitation learning, which is where we've spent most of our effort in the past few lectures. So, learning from expert demonstrations. We talked about behavioral cloning, we talked about dagger data augmentation in the the last lecture. And then yeah, I guess I also mentioned there's a different way of doing imitation learning, which is inverse reinforcement learning. So, first figure out the reward function that your expert is implicitly trying to optimize and then use reinforcement learning to optimize that objective. So, today we're going to start talking about RL, reinforcement learning. And broadly speaking, there are two kind of broad classes of approaches or problem statements when it comes to RL.
0:59 So, the first one is model-free and the second one is model-based. And here the the term model really refers to a dynamics model. So, are you predicting the consequences of the actions that your robot is going to take? If you're not doing that explicit prediction, then those methods are called model-free. If you are doing that explicit prediction, dynamics prediction, then those methods are are called model-based. So, the plan today is to talk primarily about model-free reinforcement learning, specifically like policy gradient methods. And then in the next lecture I'll talk a bit about world models. And yeah, I guess before diving into these I should mention that these are entire courses by themselves. In fact, the last slide on this presentation is going to be other courses and textbooks that you can read.
1:45 But yeah, I guess my goal is primarily to demonstrate how RL is used in robotics. So, I'll present some basic kind of RL
This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.
In this course
Related notes
Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Introduction to Robotics @ Princeton.