Reinforcement Learning Lab

Eight reinforcement-learning labs: classical, deep, policy optimisation, bandits, planning and multi-agent, with experiments trained for real in your browser.

39interactive experiments

Actor-critic, A2C and GAE

Policy Optimization · policy

Learning objectives

  • Understand the critic's role.
  • See GAE as a bias–variance trade-off.

The idea

The actor is the policy and the critic a value estimate.

Explanation

Instead of the full return we use the advantage A = r + γV(s′) − V(s), lowering variance at the cost of some bias. GAE blends n-step advantages with a coefficient λ to tune that trade-off. A2C gathers the data from several synchronous environments; A3C does so asynchronously.

Equations

\hat A_t=\sum_{l=0}^{\infty}(\gamma\lambda)^l\delta_{t+l},\quad \delta_t=r_t+\gamma V(s_{t+1})-V(s_t)

λ=0 gives the one-step TD advantage, λ=1 gives the MC return minus a baseline.

Worked example

Compare A2C and PPO on CartPole: which is more stable under default parameters?

Common mistakes

A poor critic passes its error to the actor.

Forgetting to stop bootstrapping at termination.

Summary

The critic reduces gradient variance; GAE tunes the bias–variance trade-off.

Related experiments

Assessment questions

References

  1. Schulman, J.; Moritz, P.; Levine, S.; et al. (2016). High-dimensional continuous control using generalized advantage estimation. arXiv / ICLR 2016. doi:10.48550/arxiv.1506.02438
  2. Mnih, V.; Badia, A. P.; Mirza, M.; et al. (2016). Asynchronous methods for deep reinforcement learning. ICML 2016 (arXiv). doi:10.48550/arxiv.1602.01783