Qπ(s,a)=Eπ[Gt∣st=s,at=a] 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) is the action-value function: the expected Return G if you take action a in state s and follow the policy π after that. It scores actions, so a greedy agent picks argmaxaQ(s,a).
Q∗ is the optimal action value. It satisfies the Bellman equation Q∗(s,a)=E[r+γmaxa′Q∗(s′,a′)], which Q-learning and DQN (Mnih et al. 2015) use as a regression target for a network Qθ.
Other meanings, by context
Attention. Outside RL, Q is the matrix of queries (Q, K, V (query, key, value)); Q can also be an orthogonal matrix in a QR decomposition.
How to type it
LaTeX
Shows
Q^\pi(s, a)
Qπ(s,a)
Q^*(s, a)optimal
Q∗(s,a)
Q_\theta(s, a)a learned Q-network
Qθ(s,a)
A worked example
Q(s,left)=3,Q(s,right)=7⇒argamaxQ(s,a)=right
A greedy policy takes the action with the higher Q-value.
Common confusions
Vπ(s) is the average of Qπ(s,a) over the policy's actions, and V∗(s)=maxaQ∗(s,a).