5.1.2 · D5Reinforcement Learning Foundations

Question bank — Markov Decision Processes (MDP)

1,391 words6 min readBack to topic

The pieces we lean on everywhere: a state (where you are), an action (what you choose), the transition probability (the dice the environment rolls), the reward (the number that says "good/bad"), the discount (how much a future reward is worth today), the value (expected total discounted reward if you start at and obey policy ), and the action-value (same, but you're forced to take first). Keep those seven meanings in your pocket.


True or false — justify

The Markov property means the agent has no memory of past states.
False. The environment's next state depends only on the current state–action pair; the agent may still record history — but only by folding it into the state so the state stays a complete summary.
If two different histories lead to the same state, the optimal action is identical in both.
True — that is exactly what "the state is a sufficient statistic" buys you. If the best action truly differed, the state was hiding information and should have been enriched.
A larger discount factor always yields a larger value .
False in general. With negative rewards along the way, a larger can lower value by weighting those penalties more; scales all future rewards, good and bad alike.
Setting makes the agent ignore the future entirely.
True. Then only, so equals the expected immediate reward — the agent becomes purely greedy for the next step.
is always allowed in the MDP definition.
False for infinite-horizon tasks; the definition requires so the geometric bound stays finite. is only safe when every episode is guaranteed to terminate.
Rewards must be non-negative for the theory to work.
False. Rewards can be any real number; convergence depends on boundedness () and , not on sign. Penalties are just negative rewards.
Every MDP has a unique optimal policy.
False. The optimal value is unique, but ties in mean several policies can all be optimal — they just achieve the same value.
holds for any policy, optimal or not.
True by definition: following from is taking first and then following , which is precisely what measures.
If , choosing either action keeps you optimal.
True at that state — both are actions. Optimality is about matching , and both actions deliver it.
A deterministic policy can be optimal even when transitions are stochastic.
True. Stochasticity lives in , the environment; there always exists a deterministic optimal policy for a finite MDP because we only need the single best action per state.

Spot the error

" — value equals reward plus discounted next value."
Missing the expectation/sum over . Because is random, the correct form is ; a single ignores every other possible outcome.
" — average the Q-values over the policy."
Wrong for the optimal value: it uses , not an average. . The averaging form is only for a fixed stochastic policy , not for .
"The Bellman optimality equation is linear, so we can solve it directly like Example 1."
The makes it non-linear. The policy-evaluation equation (fixed ) is linear and solvable by substitution; the optimality equation needs iteration (see 5.2.01-Dynamic-Programming-inRL).
" — the return starts at the current reward ."
Off by one. The return counts rewards received after time : . was the reward for arriving at and belongs to .
"To get we compute over next states."
You maximise over actions, not next states, and you need the whole expected return: , i.e. .
"Since gives each step, ."
It's a self-loop collecting forever, so at . The single reward gets amplified by the infinite geometric tail.
" is a reward, so bigger means better."
is a probability that sums to over ; it says how likely, not how good. Goodness lives in and downstream .

Why questions

Why do we take an expectation in ?
Because transitions (and possibly the policy) are random, so is a random variable. A single number must summarise all possible futures — the average return does exactly that.
Why does the discount factor guarantee a finite value even over an infinite horizon?
With and , the return is bounded by the geometric series , which converges. Without the sum could diverge.
Why is rather than an average over actions?
Because assumes you act optimally — you get to pick the single best action, not be forced into a mixture. Averaging would describe a suboptimal (or fixed) policy instead.
Why can we write — where did the infinite tail go?
The Markov property lets the entire future return from collapse into one symbol . This self-reference is the whole point of the Bellman equation: it turns an infinite sum into one recursive line.
Why encode goals as rewards rather than hard rules?
Numbers let the agent trade off competing objectives and uncertainty on a common scale, and let optimisation (max expected return) discover behaviour automatically. Hard rules can't express "somewhat good" or handle stochastic outcomes.
Why does stochasticity in "right succeeds 80%" lower the value versus the deterministic case?
A chance of staying put wastes a step and postpones the reward, so the discounted expected return shrinks. Uncertainty about reaching the goal always costs you discount factors.

Edge cases

What is of a terminal state whose only transition is a zero-reward self-loop?
. No reward ever arrives, so the state is worth nothing regardless of .
If every action from a state has identical , what does do there?
Any action is optimal — the set is the whole action set. The state is a "don't care"; all choices reach .
What happens to as ?
It blows up to . This is exactly why the definition forbids for non-terminating loops: the reward stream never stops, so total value diverges.
For a one-state MDP with a single self-loop of reward , what is ?
. It's the closed form for a reward collected forever, the simplest instance of the whole Bellman machinery.
If two states are indistinguishable to the agent (same observations) but require different actions, is it a valid MDP?
Not as stated — the "state" isn't Markov because it fails to summarise the true situation. You must enrich the state (add the distinguishing info) or you have a partially-observable problem, not an MDP.
What does the Bellman equation reduce to when transitions are deterministic?
The sum over collapses to a single term: , since for exactly one . This is why Example 1 back-substitutes so cleanly.
Recall Quick self-check

The optimality equation is non-linear because of what operator? ::: The over actions. equals for which action? ::: , the action the policy prescribes. Terminal zero-reward self-loop has what value? ::: .

See also: 5.1.03-Policy-and-Value-Functions, 5.1.04-Bellman-Equations, 5.4.01-Q-Learning, and the chain-theory prerequisite Markov-Chains.