Actor-Critic Methods
Imagine training a robot to walk, where every episode takes ten seconds. A full evaluation of "did it eventually succeed" only arrives after thousands of steps. A pure policy-gradient learner must wait for the whole episode. Then it must wonder which of a thousand actions actually caused the outcome. That is unbearably slow and noisy. Actor-critic methods solve this by introducing a second learner, a critic. The critic estimates value moment-to-moment. This lets the policy (the actor) update after every single step instead of every episode. This idea matters because nearly every practically successful deep reinforcement learning system is an actor-critic architecture. This includes game-playing agents, robotic control, and RLHF fine-tuning of language models. Pure REINFORCE-style policy gradient is elegant. But it suffers from high variance and slow, episodic learning. Pure value-based methods like Q-learning need discrete or easily-maximized action spaces. They struggle with continuous control. Actor-critic architectures sit at the intersection. A parameterized policy handles arbitrary (including continuous) action spaces. A learned value function supplies a low-variance, bootstrapped training signal. The big picture is a division of labor. The actor is a function from states to actions (or a distribution over actions). It is what actually behaves in the environment. The critic is a function from states (or state-action pairs) to expected return. It evaluates the actor's choices using Temporal-Difference Learning rather than waiting for the true return. The actor then nudges its parameters in the direction the critic says will improve performance. The critic itself updates using the classic TD bootstrap. Neither piece works alone. The actor needs the critic's low-variance evaluation. The critic needs the actor to generate the trajectories it learns from. This article builds the actor-critic framework from the ground up. It covers the exact gradient it estimates, and the one-step and multi-step update mechanics. It includes a full worked numeric trace, and the bias-variance tradeoff that governs every design decision. It traces the historical lineage from Witten and Barto's early adaptive critic work through modern deep actor-critic systems. It sets up two ideas covered elsewhere in detail — the advantage function and generalized advantage estimation. These are the natural refinements of what is built here.
- Actor-critic combines a policy (actor) with a learned value function (critic) that supplies a low-variance, per-step training signal.
- The critic uses Temporal-Difference Learning (bootstrapping) instead of waiting for full-episode returns.
- The actor performs gradient ascent on expected return, using the critic's TD error as an approximate advantage.
- This trades the near-unbiased but high-variance REINFORCE gradient for a biased but much lower-variance bootstrapped gradient.
- Building on Baselines and Variance Reduction, the critic acts as a state-dependent baseline that is itself learned online.
- The framework generalizes directly to The Advantage Function and Generalized Advantage Estimation, which control the bias-variance knob explicitly.
An actor-critic method updates a policy using a learned, bootstrapped estimate of how much better an action was than expected, instead of the noisy full-episode return.
The idea
A reinforcement learning agent seeks a policy that maximizes the expected discounted return . The policy gradient theorem states
REINFORCE estimates with the empirical Monte Carlo return , an unbiased but extremely high-variance estimator (every future random reward contributes noise). Baselines and Variance Reduction shows that subtracting any state-dependent baseline leaves the gradient unbiased while shrinking its variance; the best baseline is close to . An actor-critic method takes this one step further: instead of only subtracting a learned baseline from the Monte Carlo return, it replaces the Monte Carlo return itself with a bootstrapped estimate. The critic is a function approximator (or ) trained by TD learning to approximate the true value function. The actor is the policy , updated in the direction that increases the log-probability of actions the critic judges better than expected. The signal used is the TD error,
which is an unbiased estimator of the advantage when exactly. In practice is only approximate, so is a biased but low-variance advantage estimate — the central bias-variance tradeoff of the whole family. This is the direct predecessor of The Advantage Function as a formal object, and of Generalized Advantage Estimation, which interpolates between the one-step used here and the full Monte Carlo return.
How it works
The mechanism has two coupled update loops running at every timestep: the critic minimizes TD error via semi-gradient descent, and the actor performs gradient ascent on log-probability weighted by that same TD error.
Step by step, for the classic one-step (online) actor-critic: 1. Observe state ; sample action . 2. Execute ; observe reward and next state . 3. Compute the TD error: (use if is terminal). 4. Update the critic: . 5. Update the actor: . 6. ; repeat until terminal. The term is the discounting-by-time-step required by the exact policy gradient theorem; in practice many implementations drop it (a common, usually benign, approximation that shifts weight toward later-episode transitions but simplifies the algorithm and often improves empirical performance). ``` ActorCritic(env, alpha_theta, alpha_w, gamma, num_episodes): initialize actor parameters theta # policy network pi_theta(a|s) initialize critic parameters w # value network V_w(s) for episode in 1..num_episodes: s = env.reset() I = 1 # running discount factor gamma^t done = False while not done: a ~ pi_theta( . | s) # sample action from current policy s_next, r, done = env.step(a) if done: td_target = r else: td_target = r + gamma * V_w(s_next) delta = td_target - V_w(s) # TD error == 1-step advantage estimate
# critic update: semi-gradient TD(0) on the value function w = w + alpha_w delta grad_w( V_w(s) )
# actor update: policy gradient ascent scaled by the critic's signal theta = theta + alpha_theta I delta grad_theta( log pi_theta(a|s) ) I = gamma I s = s_next return theta, w ``` The corresponding architecture is two networks sharing an environment loop but not (necessarily) parameters, with the critic's scalar error feeding both its own update and the actor's update.
Complexity & correctness
Time complexity per step: , where and are the costs of one forward/backward pass through the actor and critic networks respectively. With tabular representations this is per update (a single table entry each). This is the same per-step cost as ordinary TD(0) or a single REINFORCE step evaluated online, and it is asymptotically cheaper per update than Monte Carlo policy gradient, which must wait steps (episode horizon ) before performing any update at all — actor-critic updates continuously and online, which matters enormously for continuing (non-episodic) tasks where and Monte Carlo methods cannot even be defined without truncation.
Space complexity: for the two parameter vectors, plus additional state (no need to store a whole trajectory, unlike REINFORCE with Monte Carlo returns, which needs storage for rewards if returns are computed by backward accumulation, or can be computed online with a running return but still needs variance-inducing delay before any usable gradient signal appears).
Correctness argument. Two claims must be justified: that the critic converges to (an approximation of) , and that the resulting actor update is a valid ascent direction for . Critic convergence. The critic update is exactly semi-gradient TD(0):
Under a fixed policy (i.e., treating as momentarily frozen), for linear function approximation and step sizes satisfying the Robbins–Monro conditions (, ), this converges to the TD fixed point satisfying the projected Bellman equation — the standard TD(0) convergence guarantee, exactly as used in Temporal-Difference Learning. In the actor-critic setting moves too, but on a slower timescale in the standard two-timescale analysis ( asymptotically), so the critic effectively tracks as if were quasi-static. This two-timescale stochastic approximation argument (Borkar's framework) is what makes the coupled system provably convergent under standard conditions, even though actor and critic update simultaneously. Actor ascent direction. Substitute for in the policy gradient theorem. Write , where collects the critic's approximation error. If exactly, and
using the baseline-subtraction identity from Baselines and Variance Reduction (since , subtracting never introduces bias). When , the actor update is biased by , which vanishes only in expectation if the critic error is uncorrelated with the score function — generally not exactly true, but small when the critic is a good approximator. This is the honest tradeoff: actor-critic sacrifices the zero-bias guarantee of REINFORCE for a large variance reduction, and the quality of that trade is entirely governed by critic accuracy.
Variance comparison, informally. REINFORCE's per-step gradient term has variance scaling with , which accumulates variance from every reward at every future timestep (roughly independent noisy terms for horizon , so variance can grow linearly or worse in ). The TD error depends on only one sampled reward and one bootstrapped estimate, so its variance is bounded independent of horizon (assuming bounded rewards and a stable critic) — this is precisely why actor-critic scales to long or infinite-horizon tasks where Monte Carlo REINFORCE becomes unusable.
Worked example
Consider a tiny 1-D corridor with 3 non-terminal states and a terminal state (goal). At each state the agent chooses "forward" (F) or "back" (B); forward always advances one state and gives reward (step cost); reaching ends the episode. Discount . Suppose the tabular critic currently holds
| state | |
|---|---|
| 1.0 | |
| 2.0 | |
| 3.0 | |
| (terminal) | 0.0 |
and the actor's current policy assigns .
Trace one transition: agent is at , samples , environment returns , next state (non-terminal).
Critic update (step size , tabular so for the entry):
Actor update (step size , softmax policy over ; for the logit of ):
Interpretation: the TD error is negative, meaning the actual outcome ( reward plus a discounted future value of ) was slightly worse than the critic's prior expectation of for being in — wait, actually , so yes, worse than expected — so the actor slightly decreases the log-probability of having chosen F in . Both updates move in the direction that corrects the critic's overestimate and discourages the action that led to a below-expectation outcome. Note the asymmetry with REINFORCE: this update happened immediately, using only one reward and one bootstrapped value, without waiting for the episode (which might still take many more steps) to finish.
Contrast with Monte Carlo REINFORCE on the same transition: REINFORCE would need the full return from onward, e.g., if the episode takes 2 more steps to terminate (, one more reward), the actual return is , and REINFORCE's (baseline-subtracted) update uses instead of — available only after the episode ends, and carrying the variance of however many random future rewards occur before termination.
Common pitfalls & traps
| Pitfall | Why it happens | Fix |
|---|---|---|
| Forgetting the discount factor in the actor update | The policy gradient theorem technically requires weighting by ; omitting it is a common but silent approximation | Either include it faithfully, or knowingly accept the "average-reward-like" approximation most deep-RL codebases use |
| Sharing actor/critic parameters carelessly | A shared trunk network can let the actor's gradient corrupt the critic's value estimates or vice versa | Use separate heads with careful loss weighting, or detach gradients appropriately |
| Using a stale or under-trained critic | Early in training is essentially random, so is a poor advantage estimate and actor updates are noisy or misleading | Warm up the critic, use smaller actor learning rate, or use a two-timescale schedule () |
| Bootstrapping across episode boundaries | Using for a terminal silently injects a nonzero, wrong value | Always mask bootstrap value to zero at terminal transitions |
| Ignoring the critic's own bias | Believing is an unbiased advantage estimate when | Track critic loss, consider Generalized Advantage Estimation to trade bias/variance explicitly |
| High correlation between actor and critic updates causing instability | Both networks chase a moving target simultaneously (non-stationarity) | Use target networks, smaller critic learning rate, or n-step returns to stabilize |
Pioneers & history
Origins · 1 minAndrew G. Barto and how this was discovered
Barto, together with Richard Sutton and Charles Anderson, introduced the original "adaptive critic" architecture in the early 1980s to solve the pole-balancing control problem, explicitly separating an action-selecting element (actor) from an adaptive critic that learned to predict reinforcement. This architecture predates most of modern reinforcement learning theory and directly inspired the policy-gradient and TD-learning frameworks used throughout the field today.
Where this matters
Actor-critic is the architectural backbone of essentially every modern deep reinforcement learning system that must handle continuous or high-dimensional action spaces. A3C/A2C (Asynchronous/synchronous Advantage Actor-Critic) popularized parallel actor-critic training across many environment copies for Atari and simple continuous-control benchmarks. DDPG, TD3, and SAC are actor-critic methods specialized for continuous control (robotics, simulated locomotion), each differing mainly in how the critic is trained and how the deterministic or stochastic actor is regularized. PPO, arguably the most widely deployed policy-optimization algorithm in industry, is an actor-critic method at its core, using a learned value function as a critic to compute advantages via Generalized Advantage Estimation before clipping the actor's update. Beyond simulated control and games, actor-critic ideas underlie RLHF (reinforcement learning from human feedback), the technique used to align large language models: the "actor" is the language-model policy generating tokens, and the "critic" is a learned value model estimating expected downstream reward (often derived from a human-preference reward model), with PPO-style actor-critic updates driving the fine-tuning. Recommendation systems, autonomous driving stacks, resource allocation in data centers, and financial trading agents that use policy optimization typically rely on some actor-critic variant, because it is the only architecture that simultaneously supports arbitrary action spaces, online per-step learning, and (with the right critic design) tractable variance.
Ask the tutor: How does Generalized Advantage Estimation interpolate between the one-step TD error used here and the full Monte Carlo return?
Is actor-critic the same thing as A2C/A3C/PPO?
No — actor-critic is the general architecture (a policy plus a learned value function trained jointly), while A2C, A3C, PPO, DDPG, TD3, and SAC are specific algorithms within that architecture. They differ in how they parallelize rollouts, how they compute the advantage estimate (one-step TD error, n-step returns, or Generalized Advantage Estimation), how aggressively they clip or constrain policy updates, and whether the actor is stochastic or deterministic. Understanding plain one-step actor-critic first makes each of these variants legible as a specific design choice layered on the same core update.
Why not just use the critic alone, like Q-learning, and skip the actor?
Critic-only methods like Q-learning require finding at every step, which is trivial for small discrete action sets but intractable or undefined for continuous or very large action spaces (robotic torques, continuous steering angles). An explicit actor network directly outputs actions (or a distribution over them) without any inner maximization, so actor-critic scales naturally to continuous control where Q-learning alone cannot easily be applied.
Why not use the actor alone with Monte Carlo returns, like plain REINFORCE?
You can, and it is unbiased, but the gradient variance is typically very high because a single scalar return summarizes an entire stochastic trajectory. This makes learning slow and sample-inefficient, and it forces the agent to wait for full episodes to end before any parameter update occurs at all, which is impossible in continuing (non-episodic) tasks. The critic fixes both problems by providing an immediate, bootstrapped, much lower-variance training signal.
How does the critic relate to the baseline discussed in variance reduction?
The baseline in Baselines and Variance Reduction is any state-dependent function subtracted from the return to reduce variance without introducing bias; the ideal baseline is . An actor-critic's critic is a learned approximation of exactly that ideal baseline, but used more aggressively — rather than only subtracting it from a Monte Carlo return, actor-critic uses it to bootstrap the target itself, replacing with . This is a strictly larger intervention than baseline subtraction alone, trading additional bias for a further variance reduction.
What is the difference between a state-value critic V(s) and an action-value critic Q(s,a)?
A -critic estimates the expected return from a state under the current policy, requiring the TD error to implicitly average over the actor's action distribution; a -critic estimates the expected return from a specific state-action pair, letting the actor use directly as the advantage or even alone (as in DDPG-style deterministic actor-critic). -critics are more expressive but often noisier and require an extra baseline subtraction to control variance, while -critics are simpler and pair naturally with the on-policy TD error used in this article.
Does actor-critic still work with function approximation, or only tabular settings?
It works with function approximation, and in fact almost all practical uses are deep-network actor-critic, but the theoretical guarantees weaken. Tabular or linear critics have solid convergence theory under standard stochastic-approximation conditions; nonlinear (deep) critics lose those guarantees and can diverge, especially when combined with bootstrapping and off-policy data (the "deadly triad" also relevant to Temporal-Difference Learning). In practice, techniques like target networks, gradient clipping, and small learning rates are used to keep deep actor-critic training stable despite the lack of formal convergence proofs.
What is the practical failure mode when the critic learns much faster or slower than the actor?
If the critic updates far too slowly relative to the actor, the actor is chasing a moving, inaccurate value estimate and its updates become effectively noise, similar to using an untrained baseline. If the critic updates far too fast and perfectly tracks a rapidly-changing policy, the two-timescale intuition (critic on the fast timescale, actor on the slow timescale) that underlies convergence proofs is exactly what you want, but if the actor accidentally moves faster (e.g., a much larger learning rate), the whole system can oscillate or diverge because the critic is always evaluating a policy that has already changed by the time the value estimate is used.