5.2.11 · D1Deep & Advanced RL

Foundations — Soft Actor-Critic (SAC)

1,836 words8 min readBack to topic

This page assumes you have seen nothing. We will name every letter and squiggle the Soft Actor-Critic (SAC) note throws at you, draw the picture behind it, and say why the topic can't live without it. Read top to bottom — each item is a brick for the next.


1. State, action, and the agent loop

Before any math, picture the game being played.

Figure — Soft Actor-Critic (SAC)

The action lives in a set called the action space . Its size = how many numbers the agent controls (a 6-joint arm ⇒ ). Remember this number — the temperature tuner uses it.


2. Policy — a cloud of choices, not one choice

A deterministic agent has a rule "in state , do action " — a single arrow. SAC instead uses a stochastic policy: a whole probability cloud over actions.

Figure — Soft Actor-Critic (SAC)

The subscript means "a policy whose shape is controlled by tunable numbers " (the weights of a neural network). Training = nudging so the cloud sits over good actions.


3. — turning "how likely" into "how surprising"

The letters appear everywhere in SAC. Let's earn them.

Figure — Soft Actor-Critic (SAC)

4. Entropy — average surprise = randomness

Now average that surprise over all the actions the policy might take.


5. Value, Q-value, and the discount

The agent cares not just about this reward but the whole future stream. Two bookkeepers track that.

The soft versions used by SAC just glue the entropy bonus onto : The extra is precisely the entropy term from §4 pulled inside the average. That is why SAC's values are called soft.


6. Temperature — the exploration knob


7. The tanh squash and — bounding and re-plumbing samples

Real actuators saturate: a torque can't be infinite. SAC keeps actions inside with the tanh function.


Prerequisite map

state s and action a

policy pi as a cloud

log pi is surprise

entropy H is average surprise

value V and Q

discount gamma

Bellman recursion

soft values and soft Bellman

temperature alpha

tanh squash and epsilon noise

reparameterization trick

Soft Actor-Critic


Equipment checklist

Say each answer out loud before revealing — if any stalls, reread that section.

What does (with the prime) mean?
The next state, the snapshot right after the action lands.
What is in plain words?
The probability (density) of choosing action given state — a cloud over actions, not one arrow.
Read the bar aloud.
"given" — the thing after it is the condition we assume.
What is measuring?
The "surprise" of that action — near 0 for likely actions, large for rare ones.
What is entropy ?
The average surprise, — how spread-out / random the policy is.
Spike-shaped policy vs flat policy: which has higher entropy?
The flat one (many actions equally likely) has higher entropy.
What does compute?
The weighted average of the bracketed quantity over actions drawn from .
Difference between and ?
scores a state; scores a state after committing to a specific action first.
Why is needed and what range is it in?
To shrink far-future rewards so totals stay finite; , usually 0.99.
What does the temperature trade off?
Reward vs entropy — small ⇒ greedy, large ⇒ uniform exploration.
Why squash actions with ?
To keep actions bounded in like real actuators.
What does the reparameterization trick let us do?
Move randomness into fixed noise so gradients flow through the sampled action into .
What correction does tanh force on ?
Subtract for the change of variables.