Log inStart free
LESSON 17.12 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

TRPO and trust regions

Watch TRPO limit how far each update moves the cart-pole policy.


Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.

Go Pro · $8.25/mo
EXPLAINER · 17.12 · TRUST REGION BAYUPDATE 10 · 1497 STEPS · MEAN LENGTH 93.6
01
Stage 1 of 6 · A batch
16 episodes give 1497 steps. Each step gets an advantage: its return minus the mean return.
Explain it simply

Every dot is one of the 1497 steps, placed by how likely the old policy was to push right. Blue dots have a return above b, the mean discounted return from a step, here 35.8. Red dots are below it. All dots sit on the diagonal, because the weights have not moved yet.

A scatter of 1497 steps from 16 episodes, all on the diagonal. The mean return is 35.76.

chances, A > 0, F, kept trialgradient, plain step, KL, A < 0natural step, δtrust region edge, the other direction
the batch: one dot per stepno change000.50.511p(right), old weightsp(right), new weightsthe step: F · x = gthe batch: one dot per stepno change000.50.511p(right), old weightsp(right), new weightsthe step: F · x = g
Toy: the 17.C2 cart-pole, 16 episodes per update, seed 1708
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
At=Gt−b,b=1M∑tGt\sy{A}{out}{A_t} = G_t - b,\quad b = \tfrac{1}{M}\textstyle\sum_t G_t
M=1497, b=35.76M = 1497,\ b = 35.76

A step's advantage is its return minus the batch's mean return.

Common mix-ups

MYTHA long step in the weights is a big policy change.

The fix, and 1 more mix-up with the diagram to show them, come with Pro.

Predict, then reveal
3 CHECKS · PRO
Q01With δ = 0.001, does the mean episode length reach 95 sooner or later than with δ = 0.01?

Make your guess, then test it in the diagram. All 3 checks come with Pro.

PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
  • 5 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.