Unit 1 of 11 · about 4 hours · explain, implement

Known versus learned models, system identification and data collection

Every later planning step trusts a model. This unit fixes what the model is, how it is fitted, and which data earns that trust.

You'll be able to

  • Distinguish a known transition and reward model from a learned one, and state which data each claim rests on.
  • Fit a one-step dynamics and reward model by supervised regression on fixed interaction data, and report held-out one-step error with the collecting policy named.
  • Explain why a model fitted under one policy degrades under another, using data coverage.

Covers

Known versus learned transition and reward modelsSystem identification and data collection
1

Read

In this order, only the parts listed

0 of 3 done

  1. Lecture 15: Model-Based RL Part 1, Parts 1 and 2Berkeley CS 185/285 Deep Reinforcement Learning (Spring 2026) - Model-Based RL

    Part 1 (Can we learn a simulator: the notional learned-simulator loop) and Part 2 (Distributional shift in model-based RL: this policy matters, trust regions, confident places)

  2. Lecture 11: Model-Based RL, data and model slidesStanford CS224R Spring 2026 - Model-Based RL

    Slides 5 to 10: data coverage with D, learning the simulator by maximizing log likelihood, domain dependence

  3. Chapter 8, Section 8.1: Models and PlanningReinforcement Learning: An Introduction (2nd ed.) - Chapter 8

    Section 8.1, printed pp. 159 to 160: distribution versus sample models, and what planning may assume

    Read for vocabulary only. The authors post the full text free at incompleteideas.net; the URL above is the publisher page.

2

Focus on

  • A known model is given by the environment (rules, kinematics). A learned model is a supervised fit on transitions collected by some policy, and its promises end where that data ends.
  • The reward model is learned too. MBPO fits and together by maximum likelihood on the environment dataset.
  • System identification is regression, not control. Fit first, report held-out one-step error, and only then plan.
Common mistakes · 3
  • Calling simulator access a learned model. A planner that queries privileged state has no sampling error, so its success says nothing about learning.
  • Reporting training error only. A dynamics fit can memorize its training transitions and still drift off distribution; held-out error under the collecting policy is the minimum report.
  • Assuming the reward function is known. If the reward is fitted, its error enters every plan exactly like dynamics error.
3

Try it yourself

Closed-book, before checking anything

From a blank file, with np.random.default_rng(seed), draw 200 states , then 200 actions , then 200 noise values , and set plus the noise. Fit by least squares with no intercept. Over seeds 0 to 9 the weights land within about 0.03 of and the training MSE sits near the noise variance 0.0025 (0.0022 to 0.0028). Then report the MSE on 200 fresh transitions from the same policy before any planning claim. Run on CPU.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.What distinguishes a known model from a learned one in one sentence?Answer

    A known model is given independently of data, while a learned model is a supervised fit on transitions collected by some policy and is only trustworthy near that data.

  2. 2.Why must the collecting policy be named alongside a one-step error?Answer

    The error is measured under that policy's state distribution. A new policy visits new states where the same model can be far worse.

  3. 3.A model predicts well on average but the planner fails. Name two suspects before blaming the optimizer.Answer

    The planner visits states outside the training distribution, or the failures concentrate in decision-relevant regions that average error hides.

  4. 4.Does MBPO assume a known reward function?Answer

    No. It learns the reward together with the dynamics by maximum likelihood on the environment dataset.

You're done when

You can fit a one-step model on fixed data, quote its held-out error with the collecting policy named, and say which states would break it.

Only when you can do this without notes.

Leads to

Notes

Resources · 3 for this unit, 5 more in the section
  • Berkeley CS 185/285 Deep Reinforcement Learning (Spring 2026) - Model-Based RLUC Berkeley · primary

    Slides are public at https://rail.eecs.berkeley.edu/deeprlcourse/static/slides/lec-N.pdf; current videos are not, and the public Fall 2023 playlist numbers lectures differently. Study Lectures 15 and 16 (model-based RL: learned dynamics, open-loop and closed-loop planning, random shooting and CEM, MPC, model-based policy learning). There is no model-based homework, so build the planner yourself on a small environment with known dynamics first.

  • Reinforcement Learning: An Introduction (2nd ed.) - Chapter 8Richard Sutton and Andrew Barto · required

    The authors post the full second edition free at incompleteideas.net; cite the printed page numbers. Study Sections 8.1 to 8.3 (models, Dyna-Q, when the model is wrong) and Sections 8.8 to 8.11 (decision-time planning, rollout algorithms and Monte Carlo Tree Search). Reproduce the Dyna-Q versus Dyna-Q+ ranking on the blocking or shortcut maze.

  • Stanford CS224R Spring 2026 - Model-Based RLStanford University · support

    Use Lecture 11 (model-based RL) and its MBPO reading as a second treatment of model error, uncertainty and short model rollouts.

Also in this section

  • When to Trust Your Model: Model-Based Policy OptimizationJanner et al. · required

    Study the model-error analysis and short model-rollout design. Reproduce a reduced real-plus-imagined-data comparison and retain the horizon where model bias reverses the gain.

  • Deep Reinforcement Learning in a Handful of Trials using Probabilistic Dynamics Models (PETS)Chua et al. (NeurIPS 2018) · support

    Read the split between aleatoric uncertainty (probabilistic networks) and epistemic uncertainty (ensembles) and the trajectory-sampling planner. Implement an ensemble on a small task and show where the members disagree.

  • Mastering Diverse Domains through World ModelsDeepMind · depth

    Read DreamerV3 only after the small explicit dynamics and planning path passes. Trace representation, latent dynamics, imagination and actor-critic state, but do not make a large benchmark reproduction part of the exit gate.

  • Hands-on Modern RL - Model-Based and World-Model SectionsWalking Labs · support

    Use Sections 9.3 and 9.4 as concept maps for model-based RL, search and world models. No runnable dynamics or planner script exists, so reproduce its error-recursion numbers by hand and verify algorithm claims against the original papers. Pin commit 9231bab of walkinglabs/hands-on-modern-rl; its code/chapterNN folders do not follow the site chapter numbers.

  • Reinforcement Learning Control Laboratory - Model-Based StretchRoadmap-Final · support

    Add a learned-dynamics stretch with a known-dynamics sanity case, prediction and planning tests, horizon sweeps, model-exploitation failure and matched model-free comparison.