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.

Key takeaways
  • 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.
The core insight

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 πθ(a∣s)\pi_\theta(a\mid s) that maximizes the expected discounted return J(θ)=Eπθ[∑t=0∞γtrt]J(\theta) = \mathbb{E}_{\pi_\theta}\left[\sum_{t=0}^{\infty}\gamma^t r_t\right]. The policy gradient theorem states

∇θJ(θ)=Eπθ[∇θlog⁡πθ(at∣st) Qπθ(st,at)].\nabla_\theta J(\theta) = \mathbb{E}_{\pi_\theta}\Big[\nabla_\theta \log \pi_\theta(a_t\mid s_t)\, Q^{\pi_\theta}(s_t, a_t)\Big].

REINFORCE estimates Qπθ(st,at)Q^{\pi_\theta}(s_t,a_t) with the empirical Monte Carlo return Gt=∑k≥tγk−trkG_t = \sum_{k\ge t}\gamma^{k-t} r_k, an unbiased but extremely high-variance estimator (every future random reward contributes noise). Baselines and Variance Reduction shows that subtracting any state-dependent baseline b(st)b(s_t) leaves the gradient unbiased while shrinking its variance; the best baseline is close to Vπθ(st)V^{\pi_\theta}(s_t). 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 Vw(s)V_w(s) (or Qw(s,a)Q_w(s,a)) trained by TD learning to approximate the true value function. The actor is the policy πθ\pi_\theta, updated in the direction that increases the log-probability of actions the critic judges better than expected. The signal used is the TD error,

δt=rt+γVw(st+1)−Vw(st),\delta_t = r_t + \gamma V_w(s_{t+1}) - V_w(s_t),

which is an unbiased estimator of the advantage Aπ(st,at)=Qπ(st,at)−Vπ(st)A^{\pi}(s_t,a_t) = Q^{\pi}(s_t,a_t) - V^{\pi}(s_t) when Vw=VπV_w = V^\pi exactly. In practice VwV_w is only approximate, so δt\delta_t 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 δt\delta_t 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 sts_t; sample action at∼πθ(⋅∣st)a_t \sim \pi_\theta(\cdot \mid s_t). 2. Execute ata_t; observe reward rtr_t and next state st+1s_{t+1}. 3. Compute the TD error: δt=rt+γVw(st+1)−Vw(st)\delta_t = r_t + \gamma V_w(s_{t+1}) - V_w(s_t) (use δt=rt−Vw(st)\delta_t = r_t - V_w(s_t) if st+1s_{t+1} is terminal). 4. Update the critic: w←w+αw δt ∇wVw(st)w \leftarrow w + \alpha_w\, \delta_t\, \nabla_w V_w(s_t). 5. Update the actor: θ←θ+αθ γt δt ∇θlog⁡πθ(at∣st)\theta \leftarrow \theta + \alpha_\theta\, \gamma^t\, \delta_t\, \nabla_\theta \log \pi_\theta(a_t \mid s_t). 6. st←st+1s_t \leftarrow s_{t+1}; repeat until terminal. The γt\gamma^t 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.

Figure
Actor-critic data flow: one environment step
Environment s_t, r_t, s_{t+1} Actor π_θ(a|s) produces action a_t updates via ∇log π · δ Critic V_w(s) estimates value updates via TD(0) TD error δ_t r_t + γV(s')-V(s) a_t r_t, s_{t+1} V(s), V(s') δ_t → actor update δ_t → critic update

Complexity & correctness

Time complexity per step: O(fθ+fw)O(f_\theta + f_w), where fθf_\theta and fwf_w are the costs of one forward/backward pass through the actor and critic networks respectively. With tabular representations this is O(1)O(1) 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 O(H)O(H) steps (episode horizon HH) before performing any update at all — actor-critic updates continuously and online, which matters enormously for continuing (non-episodic) tasks where H=∞H = \infty and Monte Carlo methods cannot even be defined without truncation.

Space complexity: O(∣θ∣+∣w∣)O(|\theta| + |w|) for the two parameter vectors, plus O(1)O(1) additional state (no need to store a whole trajectory, unlike REINFORCE with Monte Carlo returns, which needs O(H)O(H) storage for rewards if returns are computed by backward accumulation, or can be computed online with a running return but still needs O(H)O(H) variance-inducing delay before any usable gradient signal appears).

Correctness argument. Two claims must be justified: that the critic converges to (an approximation of) VπθV^{\pi_\theta}, and that the resulting actor update is a valid ascent direction for J(θ)J(\theta). Critic convergence. The critic update is exactly semi-gradient TD(0):

w←w+αw (rt+γVw(st+1)−Vw(st)) ∇wVw(st).w \leftarrow w + \alpha_w\,\big(r_t + \gamma V_w(s_{t+1}) - V_w(s_t)\big)\,\nabla_w V_w(s_t).

Under a fixed policy πθ\pi_\theta (i.e., treating θ\theta as momentarily frozen), for linear function approximation and step sizes satisfying the Robbins–Monro conditions (∑αw=∞\sum \alpha_w = \infty, ∑αw2<∞\sum \alpha_w^2 < \infty), this converges to the TD fixed point w∗w^* satisfying the projected Bellman equation — the standard TD(0) convergence guarantee, exactly as used in Temporal-Difference Learning. In the actor-critic setting θ\theta moves too, but on a slower timescale in the standard two-timescale analysis (αθ≪αw\alpha_\theta \ll \alpha_w asymptotically), so the critic effectively tracks VπθV^{\pi_\theta} as if θ\theta 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 δt\delta_t for Qπ(st,at)Q^\pi(s_t,a_t) in the policy gradient theorem. Write δt=Aπ(st,at)+ϵt\delta_t = A^\pi(s_t,a_t) + \epsilon_t, where ϵt=Vπ(st)−Vw(st)+γ(Vw(st+1)−Vπ(st+1))\epsilon_t = V^\pi(s_t) - V_w(s_t) + \gamma\big(V_w(s_{t+1}) - V^\pi(s_{t+1})\big) collects the critic's approximation error. If Vw=VπV_w = V^\pi exactly, ϵt=0\epsilon_t = 0 and

E[δt ∇θlog⁡πθ(at∣st)]=E[Aπ(st,at) ∇θlog⁡πθ(at∣st)]=∇θJ(θ),\mathbb{E}\big[\delta_t \,\nabla_\theta \log \pi_\theta(a_t\mid s_t)\big] = \mathbb{E}\big[A^\pi(s_t,a_t)\,\nabla_\theta \log \pi_\theta(a_t\mid s_t)\big] = \nabla_\theta J(\theta),

using the baseline-subtraction identity from Baselines and Variance Reduction (since Ea∼π[∇θlog⁡πθ(a∣s) Vπ(s)]=0\mathbb{E}_{a\sim\pi}[\nabla_\theta\log\pi_\theta(a|s)\, V^\pi(s)] = 0, subtracting Vπ(s)V^\pi(s) never introduces bias). When Vw≠VπV_w \ne V^\pi, the actor update is biased by E[ϵt∇θlog⁡πθ]\mathbb{E}[\epsilon_t \nabla_\theta \log\pi_\theta], 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 Var(Gt)\mathrm{Var}(G_t), which accumulates variance from every reward at every future timestep (roughly O(H)O(H) independent noisy terms for horizon HH, so variance can grow linearly or worse in HH). The TD error δt\delta_t 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 {s1,s2,s3}\{s_1, s_2, s_3\} and a terminal state s4s_4 (goal). At each state the agent chooses "forward" (F) or "back" (B); forward always advances one state and gives reward −1-1 (step cost); reaching s4s_4 ends the episode. Discount γ=0.9\gamma = 0.9. Suppose the tabular critic currently holds

stateVwV_w
s1s_11.0
s2s_22.0
s3s_33.0
s4s_4 (terminal)0.0

and the actor's current policy assigns πθ(F∣s2)=0.7\pi_\theta(F\mid s_2) = 0.7.

Trace one transition: agent is at s2s_2, samples a=Fa = F, environment returns r=−1r = -1, next state s3s_3 (non-terminal).

δ=r+γVw(s3)−Vw(s2)=−1+0.9(3.0)−2.0=−1+2.7−2.0=−0.3.\delta = r + \gamma V_w(s_3) - V_w(s_2) = -1 + 0.9(3.0) - 2.0 = -1 + 2.7 - 2.0 = -0.3.

Critic update (step size αw=0.1\alpha_w = 0.1, tabular so ∇wVw(s2)=1\nabla_w V_w(s_2) = 1 for the s2s_2 entry):

Vw(s2)←2.0+0.1×(−0.3)×1=1.97.V_w(s_2) \leftarrow 2.0 + 0.1 \times (-0.3) \times 1 = 1.97.

Actor update (step size αθ=0.05\alpha_\theta = 0.05, softmax policy over {F,B}\{F,B\}; ∇θlog⁡πθ(F∣s2)=1−πθ(F∣s2)=0.3\nabla_\theta \log \pi_\theta(F\mid s_2) = 1 - \pi_\theta(F\mid s_2) = 0.3 for the logit of FF):

θF←θF+0.05×(−0.3)×0.3=θF−0.0045.\theta_F \leftarrow \theta_F + 0.05 \times (-0.3) \times 0.3 = \theta_F - 0.0045.

Interpretation: the TD error is negative, meaning the actual outcome (−1-1 reward plus a discounted future value of 2.72.7) was slightly worse than the critic's prior expectation of 2.02.0 for being in s2s_2 — wait, actually −1+2.7=1.7<2.0-1+2.7 = 1.7 < 2.0, so yes, worse than expected — so the actor slightly decreases the log-probability of having chosen F in s2s_2. 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 s2s_2 onward, e.g., if the episode takes 2 more steps to terminate (s3→s4s_3 \to s_4, one more −1-1 reward), the actual return is G=−1+γ(−1)=−1.9G = -1 + \gamma(-1) = -1.9, and REINFORCE's (baseline-subtracted) update uses G−b(s2)G - b(s_2) instead of δ\delta — available only after the episode ends, and carrying the variance of however many random future rewards occur before termination.

Common pitfalls & traps

PitfallWhy it happensFix
Forgetting the γt\gamma^t discount factor in the actor updateThe policy gradient theorem technically requires weighting by γt\gamma^t; omitting it is a common but silent approximationEither include it faithfully, or knowingly accept the "average-reward-like" approximation most deep-RL codebases use
Sharing actor/critic parameters carelesslyA shared trunk network can let the actor's gradient corrupt the critic's value estimates or vice versaUse separate heads with careful loss weighting, or detach gradients appropriately
Using a stale or under-trained criticEarly in training VwV_w is essentially random, so δt\delta_t is a poor advantage estimate and actor updates are noisy or misleadingWarm up the critic, use smaller actor learning rate, or use a two-timescale schedule (αw≫αθ\alpha_w \gg \alpha_\theta)
Bootstrapping across episode boundariesUsing Vw(st+1)V_w(s_{t+1}) for a terminal st+1s_{t+1} silently injects a nonzero, wrong valueAlways mask bootstrap value to zero at terminal transitions
Ignoring the critic's own biasBelieving δt\delta_t is an unbiased advantage estimate when Vw≠VπV_w \ne V^\piTrack critic loss, consider Generalized Advantage Estimation to trade bias/variance explicitly
High correlation between actor and critic updates causing instabilityBoth 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
AG
Andrew G. Barto
born 1948 · University of Massachusetts Amherst, co-developer of the actor-critic architecture and modern reinforcement learning theory

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.

History
1983
— Barto, Sutton, and Anderson publish the original actor-critic architecture for pole-balancing (adaptive heuristic critic).
1988
— Sutton formalizes Temporal-Difference learning, giving the critic side a rigorous convergence theory.
1999-2000
— Sutton, McAllester, Singh, and Mansour prove the policy gradient theorem, giving actor-critic a formal unbiasedness foundation.
2016
— Mnih et al. introduce A3C (Asynchronous Advantage Actor-Critic), scaling actor-critic to deep neural networks and parallel workers.
2017-2018
— PPO, SAC, and DDPG establish actor-critic as the dominant paradigm for continuous control and later, large-scale RLHF fine-tuning.

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 arg⁡max⁡aQ(s,a)\arg\max_a Q(s,a) 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 Vπ(s)V^\pi(s). 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 GtG_t with rt+γVw(st+1)r_t + \gamma V_w(s_{t+1}). 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 VV-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 QQ-critic estimates the expected return from a specific state-action pair, letting the actor use Q(s,a)−V(s)Q(s,a) - V(s) directly as the advantage or even Q(s,a)Q(s,a) alone (as in DDPG-style deterministic actor-critic). QQ-critics are more expressive but often noisier and require an extra baseline subtraction to control variance, while VV-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.

Before this

Where this leads