5.1.4 · D5Reinforcement Learning Foundations

Question bank — State-value and action-value functions

1,899 words9 min readBack to topic

This is a conceptual stress-test for the parent topic on $V^\pi$ and $Q^\pi$. No heavy arithmetic here — every item targets a misconception, a boundary case, or a why. Cover the reveal, say your answer out loud with a reason, then check.

Before we start, the symbols every item below leans on — pinned here so you never meet them undefined:

Three pictures to keep in mind

Most of the traps below dissolve the moment you see the mechanism. These three figures are the visual backbone for the whole bank — glance back at them whenever an item feels slippery.

Figure 1 — the averaging fan. is not a new quantity; it is the centre of gravity of the action-values, pulled toward whichever action the policy favours.

Figure — State-value and action-value functions

Figure 2 — unfolding a trajectory to split the Bellman backup. The single identity is what lets the expectation split into "reward now" plus "discounted value of where I land".

Figure — State-value and action-value functions

Figure 3 — why contracts. Each Bellman sweep multiplies the error between your estimate and the truth by at most ; the gap shrinks geometrically to zero — the fixed-point (Banach) picture.

Figure — State-value and action-value functions

True or false — justify

can be larger than the largest in that state.
False. is a probability-weighted average of the values (see Figure 1), and an average never exceeds its maximum term — so always.
If a policy is deterministic (picks one action with probability 1), then .
True. The averaging sum collapses to the single term with weight 1, so and that one coincide — the fan of Figure 1 shrinks to a single arrow.
only makes sense for actions that actually takes in .
False. is defined for every action — you force action for one step and then follow ; that's exactly why lets us compare "off-policy" alternatives during improvement.
Two different policies can share the same at a state .
True. Value only measures expected return; two policies that differ elsewhere but funnel state into equally-rewarding futures give the same number there.
A state with reward on the very next step must have a high .
False. If every path after that reward drags you into large penalties, the discounted sum can still be low — value is about the whole future, not one step.
With , equals the expected immediate reward only.
True. Every future term carries a factor for , so only survives; the agent becomes purely myopic.
With in an episode that never terminates, is guaranteed finite.
False. An infinite sum of undiscounted rewards can diverge; (or guaranteed termination) is what keeps the geometric series bounded.
The Bellman equation is an assumption we impose on value functions.
False. It's a consequence — any correctly-defined automatically satisfies it, because splitting (Figure 2) and taking expectations is just algebra plus the Markov property.
can be negative even when all rewards are non-negative.
False. A weighted sum of non-negative rewards (all with non-negative weights ) can't be negative; you need at least one negative reward somewhere reachable.

Spot the error

"" — what's wrong?
The action-averaging is missing. must sum over actions weighted by first (the fan of Figure 1); as written it fixes a single , which is actually , not .
"To get from , use ." — what's missing?
The expectation over the environment. Rewards and next states are random, so you need ; a single only works if the transition is deterministic.
"Since has the highest Q-value, equals ." — why wrong?
Only if the policy picks with probability 1. A stochastic policy blends in the worse actions too, so whenever ever chooses something else.
"The goal state has huge value because you get there." — why wrong?
A terminal goal has : no future reward flows from it. The shows up in the value of the states that lead into the goal, via the term of their Bellman backup.
"Value functions store the actual reward sequence you'll receive." — why wrong?
They store an expectation, a single averaged number over all possible random futures — not any specific realised trajectory.
" are Q-values." — why wrong?
are probabilities of choosing actions (they sum to 1 over ); are expected returns (unbounded reals). They multiply together in , but they are different objects.

Why questions

Why does carry more information than at the same state?
resolves the value per action (each arrow in Figure 1), whereas has already averaged those away; you can recover from (average over ) but not from without the transition model.
Why is the Markov property essential to the Bellman derivation?
It lets us write — the future depends only on where you are (), not on the history of how you got there (see the Markov definition above), so the recursion (Figure 2) closes.
Why do we call solving Bellman equations "bootstrapping"?
Each value is defined using other values ( in terms of ), so we update estimates from estimates rather than waiting for full returns — the idea behind TD learning.
Why does the per-step reward in Gridworld push values below zero near the goal?
Each step costs and only the terminal goal contributes ; so states are penalised by the (discounted) number of steps still needed to arrive.
Why can we compute exactly by iterating the Bellman equation?
It's a fixed-point equation with a -contraction (Figure 3), so repeated application converges to the unique solution — this is exactly policy evaluation.
Why does a smaller make an agent "short-sighted"?
Distant rewards get multiplied by , which decays fast for small , so they barely register and the value is dominated by near-term rewards.
Why is tied to a specific rather than being a property of the state alone?
The future reward you collect from depends entirely on which actions you'll take; change the policy and the same state's expected return changes — the optimal case is treated in optimal value functions.
Why does guarantee convergence, not just help it?
Two consecutive estimates can never differ by more than times their previous difference (Figure 3); a factor below 1 forces the error to shrink each sweep, so any starting guess is dragged to the unique fixed point.
Why can Monte-Carlo prediction estimate without knowing ?
It averages actual observed returns from complete episodes, so the environment's randomness is sampled rather than modelled — no transition table needed.

Edge cases

What is of a terminal (absorbing, zero-reward) state?
Exactly — there is no future reward to accumulate, and it anchors every backward Bellman computation.
If a state has only one available action, how do and relate?
They are equal: the single action carries all the probability mass, so the action-averaging sum has just one term.
With but the environment guaranteed to terminate in finite steps, is well-defined?
Yes — the return is a finite sum, so it converges even without discounting; divergence only threatens infinite-horizon undiscounted problems.
For a deterministic environment, does the in the formula still apply?
Yes, but it collapses to a single term because exactly one has probability 1 and the rest are 0 — the sum is still correct, just trivial.
If two actions have identical , does the choice between them change ?
No — any split of probability between equal-valued actions gives the same weighted average, so is unchanged regardless of how mixes them.
How large can the gap between a state and its deterministic successor be?
From the backup , subtract to get ; now take absolute values and apply the triangle inequality , giving . So a big one-step reward or a small allows a big jump, while with modest keeps neighbours close.
Can and for a neighbour differ by more than the immediate reward alone?
Yes — the extra slack is the term from that triangle-inequality bound; only when does the gap reduce to exactly the immediate reward .
Recall Quick self-check

Cover every answer above and re-derive the reason — if you can only recall "true/false" you have not learned the item.