Skip to content
Lambdian

Q-value (action value)

The expected total future reward of taking an action in a state and then following the policy.

Qπ(s,a)=E[∑k≥0γkrt+k+1 ∣ st=s, at=a]Q^\pi(s,a) = \mathbb{E}\Big[\sum_{k\ge0}\gamma^k r_{t+k+1}\ \Big|\ s_t = s,\ a_t = a\Big]

Knowing QQ lets an agent act without a model of the world: pick arg⁡max⁡aQ(s,a)\arg\max_a Q(s,a). Q-learning estimates the optimal Q∗Q^\ast from experience with the update Q(s,a)←Q(s,a)+α[r+γmax⁡a′Q(s′,a′)−Q(s,a)]Q(s,a) \leftarrow Q(s,a) + \alpha[r + \gamma\max_{a'}Q(s',a') - Q(s,a)]; DQN does the same with a neural network.

See it in action