Skip to content
StackDecode
AI & ML Atlas
Reinforcement LearningtechniqueAnimated walkthrough

Generalised Advantage Estimation (GAE)

Estimates advantages as a decaying sum of TD errors, trading off bias and variance.

The idea

Each step's TD error δₜ = rₜ + γV(sₜ₊₁) − V(sₜ) is a noisy one-step advantage. GAE sums them with weights (γλ)ᵏ: λ = 0 gives the low-variance, biased TD error; λ = 1 gives the unbiased but noisy Monte Carlo advantage. Values like 0.95 work well in practice.

Âₜ = Σₖ (γλ)ᵏ δₜ₊ₖ

Watch it run

The pipeline lights up one step at a time. Use the controls to pause or step through it.

  1. 1Compute δₜ for every step.
  2. 2Work backwards: Âₜ = δₜ + γλ·Âₜ₊₁.
  3. 3Use  in the policy gradient.
  4. 4Also use  + V as the critic's target.

Âₜ = Σₖ (γλ)ᵏ δₜ₊ₖ

1/4

Step by step

  1. 1Compute δₜ for every step.
  2. 2Work backwards: Âₜ = δₜ + γλ·Âₜ₊₁.
  3. 3Use  in the policy gradient.
  4. 4Also use  + V as the critic's target.

Where it is used

Standard in PPO and TRPO.

Watch out for

λ and γ interact and need tuning.

Related