Reinforcement learning

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 Q

Q(s, a) is the expected total reward from taking action a in state s, then following the policy.

In ML papers

Qπ(s,a)Q^\pi(s, a) is the action-value function: the expected Return G if you take action aa in state ss and follow the policy π\pi after that. It scores actions, so a greedy agent picks arg⁡max⁡aQ(s,a)\arg\max_a Q(s, a).

Q∗Q^* is the optimal action value. It satisfies the Bellman equation Q∗(s,a)=E[r+γmax⁡a′Q∗(s′,a′)]Q^*(s, a) = \mathbb{E}\left[r + \gamma \max_{a'} Q^*(s', a')\right], which Q-learning and DQN (Mnih et al. 2015) use as a regression target for a network QθQ_\theta.

Other meanings, by context

How to type it

LaTeXShows
Q^\pi(s, a)Qπ(s,a)Q^\pi(s, a)
Q^*(s, a) optimalQ∗(s,a)Q^*(s, a)
Q_\theta(s, a) a learned Q-networkQθ(s,a)Q_\theta(s, a)

A worked example

Q(s,left)=3, Q(s,right)=7  ⇒  arg⁡max⁡aQ(s,a)=rightQ(s, \text{left}) = 3,\ Q(s, \text{right}) = 7 \;\Rightarrow\; \arg\max_a Q(s, a) = \text{right}

A greedy policy takes the action with the higher Q-value.

Common confusions

Equations that use it

Related

Vπ(s)=Eπ[Gt∣st=s]V^\pi(s) = \mathbb{E}_\pi\left[G_t \mid s_t = s\right]Value function VAπ(s,a)=Qπ(s,a)−Vπ(s)A^\pi(s, a) = Q^\pi(s, a) - V^\pi(s)Advantage Aarg⁡max⁡θf(θ)\arg\max_{\theta} f(\theta)Argmaxθ∗\theta^*Star (optimal)

Decode this example →