Log inStart free
LESSON 17.15 · 5 STAGES · 2 CONTROLS · 3 CHECKSPRO · PREVIEW

Soft actor-critic (SAC)

Watch a robot learn with random actions that a temperature keeps wide.


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

Go Pro · $8.25/mo
EXPLAINER · 17.15 · CONTROL BAYRETURN FROM START −2.24 · MEAN ACTION
01
Stage 1 of 5 · Sample an action
The actor gives a mean and a spread for each action part. tanh squashes each sample into the box.
Explain it simply

A soft actor does not pick one action. At spot P it gives a mean, the blue dot on the right, and a spread sigma, the dashed box. Each teal dot is one sample around the mean, squashed into the box. Here sigma is 0.26 and 0.22 before the squash.

A 2 m square with a target near the top right. The solid path uses the mean action and ends 0.01 m from the target. On the right, 24 sampled actions at spot P around the mean action.

robot, path, sampled actionsmean action, density, Qtemperature α, entropy pullcritic's pull
−1−10011targetstartPspreadmeanthe arenaaₓaᵧactions at P−1−111−1−10011targetstartPspreadmeanthe arenaaₓaᵧactions at P−1−111
Toy: the 17.C3 point robot, 8,000 training steps, seed 1
STAGE 1 / 5
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
a=tanh⁡(m(s)+σ(s) ε)\sy{a}{data}{a} = \tanh(\sy{m}{out}{m}(s) + \sy{sd}{out}{\sigma}(s)\,\varepsilon)
m=(0.97,0.86), σ=(0.26,0.22)m = (0.97, 0.86),\ \sigma = (0.26, 0.22)

A sample adds scaled noise to the mean, then tanh squashes it.

Common mix-ups

MYTHThe trained SAC robot keeps acting at random.

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

Predict, then reveal
3 CHECKS · PRO
Q01If α is fixed at 0, does the spread at spot P grow or shrink in training?

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 2 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.