Skip to content
StackDecode
AI & ML Atlas
Reinforcement LearningalgorithmAnimated walkthrough

Soft Actor-Critic (SAC)

Off-policy actor-critic that maximises reward plus the policy's entropy.

The idea

SAC rewards the agent for being random where it does not cost reward. The entropy bonus encourages exploration, stops the policy from collapsing early and makes learning robust. It uses a stochastic actor, twin critics and an automatically tuned temperature.

J(π) = E[Σ r + α·H(π(·|s))]

Watch it run

The pipeline lights up one step at a time. Use the controls to pause or step through it.

  1. 1Sample actions from the stochastic policy and store transitions.
  2. 2Update the twin critics toward r + γ(min Q′ − α·log π).
  3. 3Update the policy to maximise Q − α·log π.
  4. 4Adjust α so entropy tracks a target.

J(π) = E[Σ r + α·H(π(·|s))]

1/4

Step by step

  1. 1Sample actions from the stochastic policy and store transitions.
  2. 2Update the twin critics toward r + γ(min Q′ − α·log π).
  3. 3Update the policy to maximise Q − α·log π.
  4. 4Adjust α so entropy tracks a target.

Where it is used

State-of-the-art sample-efficient continuous control.

Watch out for

Needs more computation per step.

Related