Definition. Value function [sutton2018reinforcement, Section 3.5] [ftip-0031]

For a policy \(\pi \), the value function and action-value function are

\[ V^\pi (h)=\mathbb E_\pi [G_t\mid \mathsf H_t=h], \qquad Q^\pi (h,a)=\mathbb E_\pi [G_t\mid \mathsf H_t=h,A_t=a], \]

whenever the conditional expectations exist. Both quantities depend on the reward, transition law, horizon, discount, and the policy followed after the conditioned decision.