Key Moments

Stanford AA203 Optimal and Learning-Based Control | Spring 2026 | Lecture 14: Intro to IL and RL

Stanford OnlineStanford Online
Education6 min read74 min video
Aug 13, 2026|407 views|11|1
Save to Pod

Want to know something specific about what's covered?

We've already dissected every moment. Ask and we will deliver (with timestamps).

TL;DR

Imitation learning mimics expert behavior, but is capped by expert performance. Reinforcement learning learns through trial-and-error, discovering novel strategies, but faces challenges like delayed rewards and non-IID data.

Key Insights

1

Imitation learning is fundamentally different from plain supervised learning because autonomous system deployment involves compounding errors over time, leading to distribution shifts not present in standard supervised learning.

2

Reinforcement learning aims to maximize expected discounted future rewards, with value functions (state-value V(x) and action-state Q(x,u)) being central to estimating long-term performance and guiding decision-making.

3

Model-based reinforcement learning algorithms either estimate the system dynamics or use known dynamics, while model-free algorithms learn a policy without explicitly modeling the environment's dynamics.

4

Behavior cloning, a type of imitation learning, directly learns a policy mapping states to controls by mimicking expert demonstrations, with early examples dating back to the late 1980s for learning to drive.

5

Inverse reinforcement learning aims to recover the reward function that an expert is optimizing, offering potentially more generalizable representations than behavior cloning, especially for complex tasks like autonomous driving where defining good driving is difficult.

6

Modern autonomy stacks often use a scaffolded training pipeline, combining supervised learning, imitation learning (like SFT), and reinforcement learning for different stages of development to optimize performance and align with human values.

Limitations of traditional adaptive control methods

The lecture begins by recapping learning-based control, which relaxes the assumption of knowing system dynamics exactly. Classical approaches like system identification (CIS ID) and adaptive control (e.g., Model Reference Adaptive Control - MRAC) were discussed. CIS ID involves collecting data to approximate system dynamics, while MRAC uses a coupled system of a controller, adaptive component, and plant, aiming for stability via Lyapunov analysis to track a reference signal. However, the analysis of MRAC often relies on simplifying assumptions about control law and adaptive component design, and issues like parameter identifiability can arise if the reference signal is too simple or too complex. The lecture briefly touches on Model Identification Adaptive Control (MIAC), which uses system identification as an inner loop for control, allowing for more flexibility but posing challenges in guaranteeing stability due to reliance on parameter estimation. These methods primarily aim to relax assumptions about known system dynamics.

The rise of imitation learning and reinforcement learning

The course transitions to imitation learning (IL) and reinforcement learning (RL), presented as key drivers of recent progress in robotics and autonomous systems, particularly through end-to-end approaches. These methods are increasingly leveraged in robot manipulation, autonomous driving (e.g., NVIDIA's AlphaDrive), and even in aligning large language models. Unlike classical methods that require a deep understanding of system dynamics (Option 1), IL and RL (Options 2 & 3) frame the problem of mapping states to actions as a learning problem. Imitation learning learns from demonstrations (state-action pairs), essentially mimicking an expert's behavior. Reinforcement learning, conversely, learns through trial and error by pairing states with a score or metric indicating the quality of an action, aiming to discover the most rewarding strategy without explicit guidance on correct actions.

Behavior cloning as a direct imitation learning approach

Behavior cloning (BC) is the most intuitive family within imitation learning. It directly trains a policy (pi) to map states (x) to controls (u) by minimizing the error between expert demonstrations and the learned policy's predictions. This is essentially framed as a supervised learning problem using state-control pairs collected from an expert. Early examples, like a 1980s CMU study that learned to drive a vehicle by mapping camera images to steering angles using a neural network, highlight the foundational concept. However, BC faces significant challenges. Unlike standard supervised learning, deploying autonomous systems means even small prediction errors can compound over time, leading the system into states outside the training data distribution. This 'distribution shift' or 'covariate shift' is a core difference, as the agent's actions actively influence the observed states, a factor absent in typical supervised learning tasks. Furthermore, physical systems have constraints, and the embodiment gap between simulation and real-world deployment can be substantial.

Inverse reinforcement learning for reward function recovery

Inverse reinforcement learning (IRL) offers an alternative to behavior cloning within imitation learning. Instead of directly mimicking the expert's actions, IRL aims to infer the underlying reward function that the expert was optimizing. This approach is useful when it's difficult to numerically specify a good reward function, such as defining 'good driving.' By observing expert demonstrations, IRL algorithms attempt to estimate a reward function that explains the expert's behavior. This recovered reward function can then be used to train a policy that optimizes for it. The advantage is that a well-defined reward function, like 'moving closer to the goal is good, moving closer to obstacles is bad,' can be more generalizable than a directly learned policy, especially when encountering novel scenarios or configurations.

Fundamentals of reinforcement learning: The agent-environment loop

Reinforcement learning is fundamentally a formalism for learning-based decision-making through experience. It operates on a basic loop: an agent (policy) observes a state, takes an action, and the environment responds with a new state and a scalar reward. This interaction generates trajectories (sequences of states, actions, and rewards). The agent uses these trajectories to improve its policy, learning through 'trial and error.' Key terminology includes: Policy (mapping from state to action, often a distribution), Environment (system dynamics, providing next state and reward), Reward (immediate measure of success), and Value Function (measure of long-term performance, predicting future rewards). Optionally, agents may use a Model (understanding of environment dynamics), distinguishing model-free from model-based RL.

The role of value functions and optimal control

Value functions are central to RL algorithms as they represent expected future performance. The state-value function, V(x), estimates the expected total discounted reward starting from state x and following a given policy. The action-state value function, Q(x, u), estimates the expected total discounted reward starting from state x, taking action u, and then following the policy. Q-functions are particularly practical for control because they allow for direct policy optimization: to choose the best action in a state, one can simply select the action that maximizes the Q-value for that state (argmax over Q). The ultimate goal is to find the optimal state-value function (V*) and action-state value function (Q*), which correspond to the policy that yields the maximum possible expected discounted future reward. These optimal functions provide a direct mechanism for choosing optimal actions.

Advantages and challenges of reinforcement learning

Reinforcement learning excels at discovering novel and unexpected solutions, unbound by the limitations of expert demonstrations seen in imitation learning. Famous examples include AlphaGo's Move 37 and the 'tunnel' strategy in Atari's Pong. RL is also highly effective for optimizing complex objectives, making it the de facto standard for robot locomotion on rough terrain, leveraging highly parallelizable simulators. However, RL faces unique challenges: it lacks a direct supervision signal, relying solely on rewards, which can be delayed (credit assignment problem). Crucially, RL data is not independent and identically distributed (non-IID) because actions influence future states, complicating learning stability. RL algorithms are often formulated within the framework of Markov Decision Processes (MDPs), requiring careful definition of states, actions, dynamics, rewards, and a discount factor.

Navigating the RL algorithm landscape

RL algorithms can be categorized as model-based (using or learning environment dynamics) or model-free (learning policy directly). Model-free methods include policy optimization (directly maximizing RL objective) and value-based methods (estimating optimal value functions to derive policy). Model-based methods either estimate dynamics and use them for policy improvement or leverage known dynamics. Choosing an algorithm involves trade-offs in sample efficiency (interactions needed), stability, assumptions about the environment (episodic vs. infinite horizon, discrete vs. continuous spaces), and the ease of representing policies versus models. For instance, balancing a pole might be easier to control directly (policy representation) than modeling its complex nonlinear dynamics. While less sample-efficient algorithms might be less stable, they can be advantageous if interaction experience is cheap (e.g., through simulation).

Common Questions

The main goal of adaptive control is to study and ensure the stability of a coupled system that includes the controller, an adaptive component, and the system dynamics, especially when system parameters are unknown.

Topics

Mentioned in this video

More from Stanford Online

View all 135 summaries

Ask anything from this episode.

Save it, chat with it, and connect it to Claude or ChatGPT. Get cited answers from the actual content — and build your own knowledge base of every podcast and video you care about.

Get Started Free