Log inStart free
LESSON 17.C2 · 5 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW

The policy-gradient lineage

Six policy-gradient methods train one cart-pole policy, side by side.


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/mo
EXPLAINER · 17.C2 · LINEAGE BAY4 EPISODES · 25, 21, 12, 11 STEPS
01
Stage 1 of 5 · One batch
Six methods train one policy, p(right) = σ(w·s), from w = 0. Update 1 plays the same 4 episodes for each method.
Explain it simply

The chips on top are the methods of the last six lessons. They all train the same pole-balancing policy. Each starts from zero weights, where left and right are equally likely. In update 1, every method sees the same 4 episodes. Only what each method does with them differs.

Six method chips. The cart-pole and 4 episodes as rows of steps, 25, 21, 12, 11 steps.

stepsweights, settings, KL limitgradients, the fall, KLΨ, curves
the weight Ψ of each stepthe size of each updateREINFORCElesson 17.08baselinelesson 17.09actor–criticlesson 17.10GAElesson 17.11TRPOlesson 17.12PPOlesson 17.13update 1, the same for every methodw = (0, 0, 0, 0)p(right) = 0.5125 steps221 steps312 steps411 stepspush rightpush leftthe pole fallsthe weight Ψ of each stepthe size of each updateREINFORCElesson 17.08baselinelesson 17.09actor–criticlesson 17.10GAElesson 17.11TRPOlesson 17.12PPOlesson 17.13update 1, the same for every methodw = (0, 0, 0, 0)p(right) = 0.5125 steps221 steps312 steps411 stepspush rightpush leftthe pole falls
Toy: cart-pole, p(right) = σ(w·s), 40 updates, 10 runs per curve
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
g^=1N∑episodes∑tΨt ∇log⁡π(at∣st)\hat g = \frac{1}{\sy{n}{param}{N}} \sum_{\text{episodes}} \sum_t \sy{psi}{out}{\Psi_t}\, \nabla \log \pi(\sy{a}{data}{a_t} \mid s_t)
N=4, T=25,21,12,11N = 4,\ T = 25, 21, 12, 11

Every method averages Ψ times the push's log-probability gradient.

Common mix-ups

MYTHEach newer method learns faster than the one before.

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

Predict, then reveal
3 CHECKS · PRO
Q01If α rises to 0.3, does the TRPO learning curve change?

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

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.