Seyed Masoud Hosseini · Overview · Study log · Weekly summaries · Ideas · Search · Transcript · RSS feed
Deep Reinforcement Learning · Lecture 40 of 99 · 19:19
Lecture 10, Part 1: Introduction to Model-Based Planning
Study guide
What this lecture covers
This opening part of Lecture 10 shifts the course from model-free methods to model-based reinforcement learning. Before covering how to learn a dynamics model, it asks a prior question: if you already know the transition dynamics of a system, how should you use that knowledge to choose actions? It surveys where known or easily-modeled dynamics arise in practice, formalizes planning and trajectory optimization as constrained optimization problems, and introduces the crucial distinction between open-loop and closed-loop planning.
This follows the first nine lectures on model-free methods (Q-learning and policy gradients), which deliberately avoided needing or learning a dynamics model, and sets up subsequent lectures on optimal control algorithms and learned dynamics models.
Key ideas
- Model-free versus model-based: prior lectures assumed the transition probabilities
p(s_{t+1} | s_t, a_t)were unknown and never attempted to learn or use them; today's lecture assumes they are fully known. - Where known dynamics come from: some domains (Atari, chess, Go) have dynamics specified by rules; some physical systems (a car's kinematics on a clean road) are easy to model by hand; simulators provide known dynamics as well; system identification fits unknown parameters of an otherwise known model structure.
- Optimal control, trajectory optimization, and planning: these overlapping terms describe selecting a sequence of states and actions to optimize an outcome; trajectory optimization typically uses smooth gradient-based optimization, planning often considers discrete branching possibilities, and optimal control is the general umbrella problem.
- Deterministic formulation: minimize the sum of costs (or maximize rewards) over a sequence of actions, subject to each successive state being exactly determined by the dynamics function applied to the previous state and action.
- Stochastic formulation: define a distribution over state sequences given an action sequence and maximize expected reward under it, but this "open-loop" formulation can be badly suboptimal.
- Open-loop versus closed-loop planning: open-loop planning commits to a full action sequence in advance without observing future states; closed-loop planning (a policy) lets the agent observe each new state before choosing the next action, which matters whenever new information will be revealed over time.
- Local versus global policies: reinforcement learning typically learns expressive global policies (like neural networks), but many optimal-control applications use much simpler local policies, such as a time-varying linear feedback controller around a planned trajectory.
Walkthrough
From model-free to model-based RL (1:07)
The lecture recaps the reinforcement learning objective and trajectory distribution used throughout the course, and highlights that all prior algorithms managed to avoid ever needing to know or predict transition probabilities directly. Today's question is the reverse: what becomes possible if you do know the dynamics?
Where known dynamics come from (3:45)
The lecture lists settings where dynamics are known outright (games with fixed rules), easy to model by hand (simple physical kinematics), available via simulation, or partially known with unknown parameters that can be fit through system identification. It notes that knowing the dynamics opens up a range of powerful algorithms unavailable in the model-free setting.
Formulating planning as optimization (6:41)
With known dynamics but no policy, the problem becomes selecting an action sequence directly. The lecture distinguishes trajectory optimization, planning, and optimal control as closely related framings of this problem, then writes the deterministic case as a constrained optimization: minimize total cost over an action sequence subject to the state transitions given by the (known) dynamics function.
Deterministic versus stochastic planning (11:56)
In the deterministic case, an agent observes the current state and computes an optimal action sequence in one shot. Extending this naively to stochastic dynamics, by maximizing expected reward over a distribution of state sequences given a fixed action sequence, can be badly suboptimal whenever the environment will reveal useful information partway through, illustrated with the example of committing to exam answers before seeing the questions.
Open-loop versus closed-loop planning (15:23)
The lecture defines open-loop planning as committing to a full action sequence without observing intermediate states, and closed-loop planning as choosing each action based on the newly observed state, closing the loop between perception and control. Open-loop planning can be optimal in simple deterministic settings but is generally suboptimal in stochastic ones.
Closed-loop policies, global and local (16:45)
Closed-loop planning amounts to choosing a policy pi(a_t | s_t), with the same objective as standard reinforcement learning. The lecture notes that policies don't need to be as expressive as neural networks: many optimal control applications, like guiding a rocket's trajectory, use simple local policies such as time-varying linear feedback controllers that correct small deviations from a planned trajectory.
Before you watch
- Be comfortable with the reinforcement learning objective and trajectory distribution notation used throughout the course, since the lecture recaps but does not re-derive them.
- Recall that Q-learning was framed earlier specifically to avoid needing transition probabilities; this lecture explicitly revisits that choice.
Check your understanding
- What are three different practical settings where transition dynamics are known or easy to obtain?
- How does the deterministic planning optimization problem differ in formulation from the stochastic one?
- Why can naive stochastic open-loop planning be badly suboptimal, and what does the exam example illustrate about this?
- What is the difference between a global policy and a local, time-varying linear policy, and when might the latter be preferable?
Vocabulary
- model-based (adjective)
- Using a known or learned model of how the environment changes, instead of learning purely from trial and error.
Model-based methods plan using known dynamics. - model-free (adjective)
- Learning directly from experience without building a model of the environment.
Q-learning and policy gradients are model-free methods. - dynamics (noun)
- The rules describing how a system's state changes over time given an action.
The dynamics of a car on a road can be modeled by hand. - system identification (phrase)
- Fitting the unknown numerical parameters of an otherwise known physical model.
System identification finds the mass and friction of a robot. - simulator (noun)
- A computer program that mimics a real system's behavior.
A simulator provides known dynamics for training. - trajectory optimization (phrase)
- Finding the best sequence of states and actions using smooth optimization.
Trajectory optimization uses gradients to refine a plan. - optimal control (phrase)
- The general field of choosing actions over time to achieve the best outcome.
Optimal control is the umbrella term covering planning methods. - cost function (phrase)
- A function that measures how bad an outcome is, to be minimized.
We minimize the sum of costs over the action sequence. - constraint (noun)
- A rule that a solution must satisfy.
The state transitions act as a constraint in the optimization. - open-loop (adjective)
- Committing to a full plan in advance without reacting to new information.
Open-loop planning decides every action before observing outcomes. - closed-loop (adjective)
- Adjusting actions based on newly observed information as it becomes available.
A closed-loop policy reacts to each new state. - commit (verb)
- To decide firmly on a plan of action in advance.
Open-loop planning commits to an action sequence up front. - reveal (verb)
- To show information that was previously unknown.
The environment can reveal new information partway through. - feedback controller (phrase)
- A control rule that adjusts actions based on the difference from a desired path.
A linear feedback controller corrects small deviations. - time-varying (adjective)
- Changing depending on which time step it is.
A time-varying controller uses different rules at each step. - local policy (phrase)
- A simple control rule valid only near a specific planned trajectory.
Local policies work well close to the planned path. - global policy (phrase)
- A policy that works well across the whole state space, not just near one trajectory.
Neural networks are typically used as global policies. - kinematics (noun)
- The mathematical description of motion, ignoring the forces that cause it.
A car's kinematics on a clean road are easy to model. - shift (course) (verb)
- To move focus from one topic to another.
The course shifts from model-free to model-based methods. - badly suboptimal (phrase)
- Far worse than the best possible result.
Naive open-loop planning can be badly suboptimal.
Chapters
- 0:00 Intro
- 1:07 Today's Lecture
- 1:53 Recap: the reinforcement learning objective
- 2:55 Recap: model-free reinforcement learning
- 3:45 What if we knew the transition dynamics?
- 6:41 Model-based reinforcement learning
- 9:12 The objective
- 10:53 The deterministic case
- 11:56 The stochastic open-loop case
- 15:23 Aside: terminology
- 16:45 The stochastic closed-loop case
← Lecture 9, Part 4: Natural Gradient and Trust Region Methods · Lecture 10, Part 2: Stochastic Optimization for Planning →
