An action-value function, or Q-function, estimates the cumulative reward for taking an action in a state and then continuing under a policy. A Q-table stores one value for every state–action pair, allowing an agent to choose the action with the highest estimated quality. section 11.1.1
Frozen Lake agent
A Gym FrozenLake environment supplies discrete states and actions. Training updates a 16-by-4 Q-table over episodes; evaluation selects argmax(Q[state, :]) to navigate the lake.




