Glossary · Reinforcement learning

Value function

Also called critic, V(s), advantage, GAE

An estimate of how much future reward the agent can expect from a given state. The advantage says whether an action did better or worse than that.

The value of a state is the expected return from that state if the agent follows its policy:

Vπ(s)=Eπ ⁣[∑k=0∞γkrt+k  |  st=s]V^\pi(s) = \mathbb{E}_\pi\!\left[\sum_{k=0}^{\infty} \gamma^k r_{t+k} \;\middle|\; s_t = s\right]

It obeys a simple recursion, the Bellman equation: the value now is the reward now plus the discounted value of where you end up.

Vπ(s)=E[r+γVπ(s′)]V^\pi(s) = \mathbb{E}\left[r + \gamma V^\pi(s')\right]

In deep RL a neural network called the critic learns V(s)V(s) by regression on the returns it observes.

Advantage

The value function makes learning far less noisy. Instead of asking “was this episode good?”, the learner asks “did this action do better than expected?” That difference is the advantage:

A(st,at)=rt+γV(st+1)⏟what happened−V(st)⏟what was expected=δtA(s_t, a_t) = \underbrace{r_t + \gamma V(s_{t+1})}_{\text{what happened}} - \underbrace{V(s_t)}_{\text{what was expected}} = \delta_t

A positive advantage makes the action more likely; a negative one makes it less likely.

Generalised advantage estimation

The one-step δt\delta_t relies heavily on the critic, which may be wrong. Summing actual rewards over many steps relies less on the critic but is noisier. GAE (Schulman et al. 2016) blends the two with a parameter λ\lambda:

A^t=∑l=0∞(γλ)l δt+l\hat{A}_t = \sum_{l=0}^{\infty} (\gamma\lambda)^l \, \delta_{t+l}

With λ=0\lambda = 0 it is the one-step estimate; with λ=1\lambda = 1 it is the full return minus the baseline.

In this project

We use γ=0.99\gamma = 0.99 and λ=0.95\lambda = 0.95. The critic is a separate 2 × 256 MLP with the same inputs as the actor.

The critic is also a window into what the fighter expects. In the torque and neuron post it is drawn as a “forecast” line: 555 while the student distill9-196.6M stands, below half 40 ms after a 900 N push, down to −92 a second later, while the body only hits the floor 1.94 s after the push.

Related terms

Used in

← All terms