Reinforcement learning

Aπ(s,a)=Qπ(s,a)−Vπ(s)A^\pi(s, a) = Q^\pi(s, a) - V^\pi(s) Advantage A

A(s, a) = Q − V: how much better action a is than the policy’s average action in state s.

In ML papers

The advantage Aπ(s,a)=Qπ(s,a)−Vπ(s)A^\pi(s, a) = Q^\pi(s, a) - V^\pi(s) measures how much better taking action aa is than what the policy does on average from ss. Positive means better than usual, negative worse.

Policy-gradient methods weight ∇θlog⁡πθ(at∣st)\nabla_\theta \log \pi_\theta(a_t \mid s_t) by an estimate A^t\hat{A}_t instead of the raw return, which gives the same expected gradient with less variance. PPO (Schulman et al. 2017) uses A^t\hat{A}_t from generalized advantage estimation, GAE (Schulman et al. 2016), which mixes temporal-difference errors δt\delta_t with a weight λ\lambda.

Other meanings, by context

How to type it

LaTeXShows
A^\pi(s, a)Aπ(s,a)A^\pi(s, a)
\hat{A}_t estimated at step tA^t\hat{A}_t

A worked example

Q(s,a)=7, V(s)=5  ⇒  A(s,a)=2Q(s, a) = 7,\ V(s) = 5 \;\Rightarrow\; A(s, a) = 2

Action aa is worth 2 more than the policy's average from this state, so the update makes it more likely.

Common confusions

Equations that use it

Related

Qπ(s,a)=Eπ[Gt∣st=s,at=a]Q^\pi(s, a) = \mathbb{E}_\pi\left[G_t \mid s_t = s, a_t = a\right]Action-value function QVπ(s)=Eπ[Gt∣st=s]V^\pi(s) = \mathbb{E}_\pi\left[G_t \mid s_t = s\right]Value function Vy^\hat{y}Hat (estimate)J(θ)=Eτ∼πθ[R(τ)]J(\theta) = \mathbb{E}_{\tau \sim \pi_\theta}\left[R(\tau)\right]Objective J

Decode this example →