TL;DR
An actor-critic method keeps two learned pieces. The actor is a policy that chooses actions. The critic is a value estimate that says how good the situation is. After each step, the critic's surprise, the difference between what happened and what it expected, tells the actor whether the action it took was better or worse than average. Because this update happens step by step, the agent learns while it runs rather than waiting for the final outcome.
Where you'll see it: the training loops behind many game-playing and robot-control agents, and the value-plus-policy setup used in reinforcement learning from human feedback for language models.
Intuition
An actor with a coach
Picture a basketball player taking shots. The player (the actor) decides how to shoot. A coach (the critic) watches and keeps a running estimate of how likely a possession is to score from each position on the court. After a shot, the coach does not wait for the whole game to see whether the team won. The coach compares the shot's result with what was expected from that spot and says: that was better than I thought, or worse. The player then adjusts the next shot in the same direction.
That is the whole method. The actor learns which actions to favour. The critic provides a yardstick so the actor can tell a good action from a lucky one.
Why the coach is needed
A plain policy gradient method scores each action by the total reward that followed it. Over a long episode that total is a sum of many random rewards, so its value swings a lot from run to run. The gradient estimate is then noisy, and learning is slow and unstable.
The critic fixes this by replacing the noisy total with a local estimate. Subtracting what the critic expected from the actual outcome gives an estimate of the advantage of the action, and it is available one step at a time. The price is that the critic is itself learned and can be wrong, which introduces a different kind of error. Most of the design choices in actor-critic methods are about trading these two errors against each other.
flowchart LR E[Environment] -->|state, reward| C[Critic: value estimate] C -->|TD error| A[Actor: policy] A -->|action| E C -->|TD error| C
The math
Setup
The actor is a policy with parameters . The critic is a value function with parameters . The discount factor says how much later rewards count relative to immediate ones. The actor aims to maximise the expected discounted return, which the policy gradient theorem writes as a gradient.
The TD error
After taking action in state , the agent observes reward and the next state . The temporal-difference error is
It compares a one-step estimate of the value (the reward just received plus the discounted value of where the agent landed) with the value the critic expected before the step. If the critic is exact, is an unbiased estimate of the advantage . This is the same quantity that temporal-difference learning uses to update values.
The two updates
Using the TD error as the advantage signal, one step of a basic actor-critic method updates both networks:
The actor update is gradient ascent on expected return. The direction increases the probability of the action taken, and the sign and size of decide whether to increase it (good surprise) or decrease it (bad surprise). The critic update is a regression step: it moves toward the target . The step sizes and are usually chosen so the critic learns faster than the actor, or at least not much slower.
Choosing the advantage estimate
The one-step TD error is the simplest choice. Two other forms are common:
- Monte Carlo advantage: , where is the full discounted return from step . It is unbiased but has high variance.
- Multi-step or GAE: a weighted blend of several TD errors. Generalized advantage estimation adds a single parameter that moves between the one-step and full-return extremes.
The lesson from the three choices is the same: more steps of real reward reduce bias from the critic and add variance from randomness in the environment, and vice versa.
Worked examples
At state the policy has two actions, left and right, with equal probability each. The logits are . The critic gives . The agent takes right, receives reward , and lands in a state where the critic says . Take , actor step size , critic step size .
- TD error: . The outcome was much better than the critic expected.
- For a softmax policy, .
- Actor step: . The new logits are .
- New probability of right: , up from .
- Critic step (tabular): . The critic moves toward the observed one-step target.
Interpretation: one good surprise nudged the policy toward the action that caused it, and raised the critic's estimate of the state. Both changes are small, which is the point; many such steps add up.
An episode visits states and then ends. Rewards are , , , with . The critic values are , , , and the terminal value is .
- Returns, computed backwards: , , .
- Monte Carlo advantages : , , .
- TD errors :
- The two estimates agree on the sign of every advantage. They differ in size: the TD errors are no larger and depend only on one step of reward, but they lean on the critic's values of and . If those values were wrong, the TD advantages would inherit those errors, while the Monte Carlo ones would not.
Interpretation: the Monte Carlo estimate is what the reward really was; the TD estimate is what the critic believes it was. Actor-critic methods accept some of the critic's belief in exchange for much less noise.
Tradeoffs and failure modes
| Situation | What goes wrong | Better choice |
|---|---|---|
| Long episodes, sparse reward | Plain policy gradient is extremely noisy | Actor-critic with a critic, or GAE to tune the bias-variance balance |
| The critic is poor early on | Its errors flow into the actor, which learns the wrong preferences | Warm up the critic, use a smaller actor step, or share early layers carefully |
| Actor and critic share a network | Loss terms with different scales interfere | Separate networks, or weight the losses with care |
| Agent needs to keep exploring | The policy becomes deterministic too early | Add an entropy bonus to the actor loss |
| Many parallel environments are available | Single-stream updates are slow and correlated | Synchronous batches (A2C) or asynchronous workers (A3C) |
| Updates must stay close to the old policy | A large step can wreck a good policy | Clipped or trust-region objectives, as in [[proximal-policy-optimization |
| Rewards arrive only at the end of very long episodes | One-step TD errors barely see the reward | Multi-step returns or [[generalized-advantage-estimation |
The main failure mode is an unstable feedback loop. The actor changes the data the critic sees, and the critic's changing estimates change the actor's gradient. Keeping the critic's learning rate reasonable, normalising advantages, and clipping updates are the usual remedies. The second failure mode is a biased critic that looks confident. Because the actor trusts the critic's advantages, a systematic error there is hard to notice from the reward curve alone.
History
The idea goes back to early work on learning control. Barto, Sutton and Anderson described an actor element and a critic element that learned to balance a pole in 1983, with the critic's prediction error guiding the actor. The name "actor-critic" comes from this kind of two-part design.
In 2000 Konda and Tsitsiklis gave a policy-gradient form of actor-critic with function approximation and a convergence analysis, which put the method on firmer theoretical ground.
Mnih and colleagues (2016) ran several actor-critic workers in parallel on separate copies of the environment, which they report had a stabilising effect on training and removed the need for an experience replay memory. Their asynchronous actor-critic method is known as A3C, and a synchronous variant, A2C, is also widely used. PPO uses the same actor-critic structure with clipped updates. The critic idea also appears in modern language-model training, where a learned value model judges partial outputs.
Check yourself
QuestionIn one update, the TD error is and the action's probability was . Does the actor's update make that action more or less likely, and why?Show answer
More likely. The update direction is scaled by . A positive TD error means the outcome was better than the critic expected, so the step increases the probability of the action taken. A negative TD error would decrease it.
QuestionCompute the TD error for one step where , , and . Is the action better or worse than the critic expected?Show answer
. The next state is valued higher than the current one, so the outcome looks better than expected, even though the reward was zero. This is why the critic's estimate of the next state matters: the TD error rewards moving into more valuable states, not only getting immediate reward.
QuestionWhy does a Monte Carlo advantage have higher variance than a one-step TD advantage, and what does the TD estimate depend on that the Monte Carlo one does not?Show answer
The Monte Carlo advantage uses the full sum of random rewards until the episode ends, and each of those rewards adds noise. The one-step TD advantage uses one reward and the critic's estimate of the next state. The TD estimate depends on the critic: if the critic's values are wrong, the TD advantage inherits that error. The Monte Carlo estimate does not depend on the critic, which is why it is unbiased.
QuestionAn agent's policy quickly becomes nearly deterministic and stops trying new actions, even though it has not found the best strategy. Which part of the actor-critic setup is the likely cause, and what is a standard fix?Show answer
The actor is being pushed hard toward whatever actions have looked good so far, and nothing rewards keeping options open. A critic that overestimates the value of the actions taken early can make this worse. A standard fix is an entropy bonus added to the actor loss, which rewards the policy for keeping its probabilities spread out, along with a smaller actor step size so the policy cannot collapse in a few updates.