Actor-Critic Methods

REINFORCE uses raw returns, and raw returns can be noisy. Some trajectories start in lucky states. Others start in difficult states. A high return does not always mean the chosen action was especially good; it may mean the situation was already easy.

Actor-critic methods add a second learner. The actor is the policy πθ\pi_\theta that chooses actions. The critic estimates how good a state usually is, often as Vw(s)V_w(s). The critic acts like a baseline, so the actor can ask a fairer question: was this action better or worse than expected?

Actor-critic architecture diagram showing an actor policy choosing actions and a critic estimating value to guide policy updates.
Actor-critic methods pair a policy that acts with a value estimator that judges how good the situation is.
Comparison of A2C and A3C actor-critic training approaches.
A2C and A3C both pair actors with critics, but differ in how they coordinate experience and updates.

Actor-critic

Judge the action relative to what was expected

Choose a situation. The critic's baseline controls for whether the state was already easy or hard.

AtA_t≈GtG_t-Vw(st)V_w(s_t)

Return Gt

4

Critic V(st)

1

Advantage At

+3

The raw return is lower, but the action helped a lot relative to a difficult state.
The actor changes the policy. The critic estimates V(s), a baseline for judging whether the sampled action helped.

The simple actor-critic advantage estimate is

AtA_t ≈ Gt−Vw(st)G_t - V_w(s_t)

If At>0A_t>0, the sampled action did better than the critic expected for that state, so the actor should make it more likely. If At<0A_t<0, the sampled action did worse than expected, so the actor should make it less likely.

This connects back to the value-function chapter: GtG_t is a sample of Qπ(st,at)Q^\pi(s_t,a_t), and Vπ(st)V^\pi(s_t) is the expected return from the state before choosing the particular action. Their difference is 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).

ℹ

Where GAE Fits

Generalized Advantage Estimation smooths this feedback over time. Its parameter λ\lambda controls memory: λ≈0\lambda\approx 0 uses short, steadier feedback; λ≈1\lambda\approx 1 uses longer credit assignment with more variance.

Was it more difficult to remember today's breakfast or your breakfast two weeks ago? Credit assignment has the same shape. The farther back a consequence stretches, the harder it is to decide which action deserves credit.

Memory decay is controlled by λ\lambda. Higher λ\lambda means the advantage estimate keeps more context from later timesteps, but it also admits more variance. Lower λ\lambda means shorter memory, steadier updates, and more bias toward immediate feedback.

In A2C, the critic can give a single snapshot of how good a state is. But sometimes feedback should stretch across multiple timesteps. Generalized Advantage Estimation, or GAE, smooths that feedback by blending short- and long-term memory.

TD error

What surprised the critic?

GAE starts from a one-step critic surprise, then lets that surprise echo forward through time.

=+-

Critic surprise

what changed after acting

The temporal-difference error measures how surprised the critic was once it saw the reward and the next state.

Pieces

δt compares what actually arrived with what the critic expected before acting.

GAE starts with the critic's one-step surprise:

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

Here V(st)V(s_t) is what we thought this state was worth before acting, rtr_t is the actual reward received now, and γV(st+1)\gamma V(s_{t+1}) is what we expect the future to be worth. Then GAE averages recent surprises, weighted by memory decay:

AtGAE=δt+(γλ)δt+1+(γλ)2δt+2+⋯A_t^{GAE}=\delta_t+(\gamma\lambda)\delta_{t+1}+(\gamma\lambda)^2\delta_{t+2}+\cdots

Generalized Advantage Estimation

Memory decay controls how far feedback stretches

Was it easier to remember today's breakfast or your breakfast two weeks ago? GAE uses lambda as a memory knob for recent critic surprises.

0.75
short memorylong memory

Weighted recent plays

AtGAE = 2.66

now
1.00
+2.4
next
0.71
-0.57
2 steps
0.51
+0.8122499999999999
3 steps
0.36
+0.3255345703124999
4 steps
0.26
-0.3092578417968748

Context kept

75%

Variance

higher

Bias

medium

Low lambda

Steady, but forgetful. It mostly trusts short-term critic surprises.

High lambda

Captures distant consequences, but adds noise from longer rollouts.

Higher λ keeps more long-term context, but also lets more noisy future evidence into the advantage estimate.

AtA_t measures how much better or worse an action was compared to what the policy expected at that state. If At>0A_t>0, the action was better than expected. If At<0A_t<0, it was worse than expected.

The tuning question is bias versus variance. As λ→1\lambda\to 1, GAE captures longer-term consequences, but adds noise. As λ→0\lambda\to 0, GAE is steadier and lower variance, but more forgetful. GAE lets us blend the two smoothly.

Checkpoint

Why does subtracting a critic baseline Vw(st)V_w(s_t) help policy learning?