LESSON 20.01 · 5 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Model-based RL and Dyna
Watch an agent learn a model of a maze and plan with simulated steps.
Pro lesson. Stage 1 is free to watch. Pro opens all 5 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 20.01 · DYNA MAZEEPISODE 2 · 199 REAL STEPS
01
Stage 1 of 5 · Real steps
Episode 2 takes 199 real steps. Model-free RL makes one Q update per real step.
Explain it simply
The agent starts at S and looks for the goal G. The teal cells show where it walked in episode 2, and a stronger shade means more visits. Each real step is one move in the true maze. A model-free agent learns only from these real steps.
The 9 by 6 maze with walls. Episode 2 took 199 real steps; shaded cells show the visits.
real steps, visitsmodel, planning stepsvalues, preferred movesopen cell
Toy: the 9 × 6 Dyna maze of Sutton and Barto, one seeded run of 30 episodes
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
Each real step moves Q toward the reward plus the best next value.
PRO LESSON · YOU WATCHED STAGE 1 OF 5
Unlock the full explainer
- 4 more stages and 3 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.