Back to Reinforcement Learning Mind Map
中文·English
🎮 Reinforcement LearningID: value-iteration-policy

Value vs Policy Iteration

价值迭代 vs 策略迭代
🎯Core Definition
Value Iteration (VI) iterates the Bellman optimality equation directly with synchronous sweeps over all states: Vk+1(s)=maxasP(ss,a)[r(s,a)+γVk(s)]V_{k+1}(s) = \max_a \sum_{s'} P(s'|s,a)\left[ r(s,a) + \gamma V_k(s') \right], where VkV_k is the estimate at round kk, maxa\max_a performs an implicit greedy improvement, and sP(ss,a)[]\sum_{s'} P(s'|s,a)[\cdot] is the transition-weighted expectation; each sweep is one step of evaluation plus one step of improvement — VI is policy iteration truncated to a single evaluation step. Because the Bellman operator is a γ\gamma-contraction (TVTUγVU\|TV - TU\|_\infty \le \gamma \|V - U\|_\infty), VkVV_k \to V^* is guaranteed; note intermediate VkV_k need not be the value function of any single policy — only the final greedy policy w.r.t. VkV_k is optimal. Policy Iteration (PI) alternates two steps: ① policy evaluation — iterate the current policy's value function Vπk(s)=sP(ss,πk(s))[r(s,πk(s))+γVπk(s)]V^{\pi_k}(s) = \sum_{s'} P(s'|s, \pi_k(s))\left[ r(s, \pi_k(s)) + \gamma V^{\pi_k}(s') \right] to convergence (or truncated by tolerance); ② policy improvement — greedy update πk+1(s)=argmaxasP(ss,a)[r(s,a)+γVπk(s)]\pi_{k+1}(s) = \arg\max_a \sum_{s'} P(s'|s,a)\left[ r(s,a) + \gamma V^{\pi_k}(s') \right].The improvement theorem guarantees Vπk+1VπkV^{\pi_{k+1}} \ge V^{\pi_k} monotonically, so PI terminates at the optimal policy on finite MDPs (≤ AS|A|^{|S|} rounds in theory, far fewer in practice).
💡Use Cases
tabular small-scale MDPs with known model P,RP, R (planning problems) — e.g. grid worlds and robot navigation; also the standard interview question distinguishing the two dynamic-programming schools (contrast with model-free DQN).
Key Problems Solved
naive policy search is exponential in AS|A|^{|S|}; PI turns search into polynomial-level iteration via evaluate-improve cycles, converging in tens of rounds with costlier but fewer iterations; VI is cheap per sweep (O(S2A)O(|S|^2|A|)) but needs more sweeps — both are different partitions of the same Bellman fixed-point iteration.
🎯5 High-Frequency Exam Points
1
Write the value iteration update and explain each term. Why does VI converge to V*?
2
What are the two steps of policy iteration? Why does the improvement theorem guarantee monotonic gains?
3
Compare VI vs PI in complexity and convergence speed. Why does PI need fewer rounds but cost more per round?
4
Is an intermediate Vk necessarily the value function of some policy? How is the final policy extracted?
5
Given a small grid-world MDP, manually run 1-2 sweeps of VI/PI to demonstrate the updates.
Updated 2026-08-12
🎯
Test Your Knowledge: Practice Questions for "Value vs Policy Iteration"
Single choice pitfall questions with instant feedback and mistake tracking.
🚀 Start Card Practice
Previous CardMDP & Bellman EquationsNext CardMC vs TD Learning

🔗 More Reinforcement Learning Knowledge Cards

Actor-CriticBehavioral CloningContextual BanditCoT & Reasoning RL