SAC
PPO and TRPO optimize for expected return, but a policy that chases return too aggressively can get overconfident and stop exploring. Soft Actor-Critic, or SAC, changes the learning problem: the agent is rewarded not only for high return, but also for keeping its action distribution usefully stochastic.
SAC adds an entropy term to the objective. Entropy encourages diverse actions, so exploration becomes part of what the agent is trying to optimize instead of something bolted on from outside.
Objective function
Here is the entropy of the policy, and controls the exploration-exploitation tradeoff. High means the agent values exploration more. Low lets the policy become greedier and more deterministic.
Equation walkthrough
SAC rewards return and useful randomness
Click each term to see how SAC modifies the usual expected-return objective.
Policy entropy
how many options stay alive
Entropy is high when the policy spreads probability across multiple actions instead of collapsing onto one choice.
Terms
Entropy lab
Alpha decides how much SAC values exploration
Move alpha to see the same action values become either greedy or deliberately stochastic.
entropy
69%
top action prob
68%
data mood
mixed
The critic in SAC learns a soft Bellman function:
Subtracting encourages policies that keep options open. Instead of maximizing just return, the critic values return minus overconfidence. This soft backup averages over possible future actions, which tends to create smoother value landscapes and easier optimization.
Equation walkthrough
The soft Bellman backup values uncertainty
Click through the backup to see why SAC critic targets are smoother than max-only targets.
Entropy bonus
penalize overconfidence
Because log probabilities are negative, this term rewards policies that keep options open. The critic values return minus overconfidence.
Terms
SAC is still an actor-critic method, but the moving pieces are richer:
Actor policy: outputs stochastic actions.
Critic 1 and Critic 2: estimate soft Q-values. Double critics reduce overestimation.
Target networks: provide stable learning targets.
Replay buffer: stores past experiences for off-policy updates.
SAC system map
SAC learns from stochastic actions and remembered experience
Click a component to see its role in the actor-critic system.
Replay buffer
(s, a, r, s')
Stores past experience, which lets SAC learn off-policy from remembered transitions collected by older policies.
Instead of fixing , SAC can learn it automatically. The goal is to keep entropy near a target level .
Temperature loss
If the agent is too predictable, increases, pushing the policy toward more exploration. If the agent is too random, decreases, allowing more exploitation.
Equation walkthrough
SAC can learn alpha automatically
The temperature loss nudges alpha so policy entropy stays near a target level.
Adjustable temperature
exploration pressure
Increasing alpha makes future policy updates care more about entropy; decreasing alpha lets reward dominate.
Terms
PPO learns from what it just did. SAC learns from what it remembers.
PPO is on-policy: it assumes the trajectories were generated by the current policy. SAC is off-policy: it can safely learn from past policies' experiences stored in a replay buffer.
On-policy vs off-policy
PPO learns from now; SAC learns from memory
Switch algorithms to see which experience remains useful for updates.
policy type
off-policy
data reuse
high
exploration
persistent
| Property | PPO | SAC |
|---|---|---|
| Type | On-policy | Off-policy |
| Objective | Clipped surrogate | Soft Q plus entropy |
| Exploration | Limited by current rollout behavior | Persistent and entropy-driven |
| Data reuse | Low | High |
| Typical use | RLHF, NLP, games | Robotics, continuous control |
| Exploration control | Usually fixed or externally scheduled | Can be learned with adaptive |
What does soft mean?
Soft means we do not assume the agent always takes the single best action. Instead, we average over good actions and reward uncertainty. The policy is expected to act well on average, while still preserving randomness where it is useful.
Hard vs soft RL
Click an aspect to compare the two assumptions
Choose a row label, then compare what that idea means under deterministic hard RL versus stochastic SAC-style soft RL.
Aspects
Deterministic / hard RL
Deterministic or nearly deterministic
Stochastic / soft RL
Stochastic by design
Policy type
Hard RL often tries to collapse onto a best action. SAC keeps a probability distribution alive as part of the policy.
What is the main role of the entropy term in SAC?