State and prove the policy improvement theorem. If for every state , why does it follow that for every ? How does this justify greedy policy improvement in policy iteration?
Reinforcement learning, Dynamic programming
Level L3 Intermediate. Length Long. Nature Mat Mathematical.
What's being asked
Whether you can prove, by repeatedly unrolling one step of lookahead, that acting greedily with respect to a value function never makes a policy worse.
Key idea
Replace the first action by and keep following : this is no worse. Repeat the replacement at every later step. The chain closes the proof.
Steps
- Take a deterministic with for all . Recall .
- Start from . Here the first action comes from and the future value is still that of .
- Apply the assumption again inside the expectation: . So .
- Repeat this times to get .
- Let . With bounded rewards and , the term , and the sum becomes the full discounted return under . So for all .
- Apply this to policy iteration. The greedy policy satisfies , so the condition holds and is at least as good as .
- If is not strictly better in any state, then for all . That is the Bellman optimality equation, so is optimal. With finitely many deterministic policies, the loop stops at the optimum after finitely many rounds.
Common mistakes
- Assuming directly from greedy choice at one step. The unrolling is what extends it to all later steps.
- Mixing up , which uses after the first step, with , which uses throughout.
- Dropping the limit argument. The remainder vanishes only with (or episodes that end) and bounded rewards.
- Claiming greedy improvement needs the model. It only needs , which can come from the model or from data.
How long your answer should be
One page; 6–8 minutes.
Last checked on 4 December 2026.
Read this
Previous in Reinforcement learning: In RLHF, a reward model gives scores to the human-preferred answer and to the rejected one. Under the Bradley–Terry model, . Compute this probability, the loss , and the gradients with respect to and . What happens when the scores are the other way round, and why does the loss depend only on the difference?
Next in Reinforcement learning: What is the "deadly triad" in reinforcement learning? How do you show with a two-state example, with and , a single weight , and reward everywhere, that off-policy semi-gradient TD(0) can diverge when only the transition is updated?