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

Actor–critic, A2C and A3C

Watch a critic's guesses train an actor on four cart-poles at once.


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.10 · ACTOR–CRITIC BAYROUND 52 · p(RIGHT) 0.70 · V(s) 19.0
01
Stage 1 of 6 · Actor and critic
In an actor–critic method, the actor gives the chance to push right. The critic guesses the return, V(s).
Explain it simply

Both heads read the same four numbers of the cart and pole. The actor's bar shows a 70 percent chance to push right. The critic's bar guesses how much reward is still to come, about 19 here. The critic never picks a push.

Worker 1's cart and pole. The actor gives the chance to push right, 0.70. The critic gives the value V of s, 19.0.

state, pushesweights, βloss, fallschance, value, target, advantage, entropy
actor and critic−2.4 m2.4 mrightworker 1, step 0 · weights of update 51statesactorwcriticvx−0.082−0.01−0.36ẋ−0.060−0.17−0.52θ0.2020.29−0.21θ̇0.5491.400.06bias v₀118.9actor: p(right)σ(w·s) = σ(0.84) = 0.70critic: V(s)v₀ + v·s = 19.00 to 100state s4 numbersactorσ(w·s)criticv₀ + v·sp(right)0.70V(s)19.0the push: rightits guesses train the actora guess, never a pushactor and critic−2.4 m2.4 mrightworker 1, step 0 · weights of update 51statesactorwcriticvx−0.082−0.01−0.36ẋ−0.060−0.17−0.52θ0.2020.29−0.21θ̇0.5491.400.06bias v₀118.9actor: p(right)σ(w·s) = σ(0.84) = 0.70critic: V(s)v₀ + v·s = 19.00 to 100state s4 numbersactorσ(w·s)criticv₀ + v·sp(right)0.70V(s)19.0the push: rightits guesses train the actora guess, never a push
Toy: the 17.C2 cart-pole, 4 workers × 5 steps, seed 1708
STAGE 1 / 6
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
p=σ(w⋅s),V(s)=v0+v⋅s\sy{p}{out}{p} = \sigma(\sy{w}{param}{w}\cdot\sy{s}{data}{s}),\quad \sy{V}{out}{V(s)} = \sy{v}{param}{v_0} + \sy{v}{param}{v}\cdot\sy{s}{data}{s}
p=σ(0.84)=0.70,  V(s)=19.0p = \sigma(0.84) = 0.70,\; V(s) = 19.0

The actor squashes w·s into a chance; the critic adds v₀ to v·s.

Common mix-ups

MYTHA3C learns better because its workers never wait.

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

Predict, then reveal
3 CHECKS · PRO
Q01With A2C and β at 0.3, from round 52 to round 400, do the advantage bars grow or shrink?

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.