Dynamic programming solves MDPs exactly when the model (, ) is known. Foundation for understanding all RL algorithms.
Policy Evaluation — compute for a given policy: Iterate: Converges to as .
Policy Improvement — make the policy greedy w.r.t. current value: Guaranteed to be at least as good as (policy improvement theorem).
Policy Iteration:
- Evaluate current policy (policy evaluation)
- Improve policy greedily (policy improvement)
- Repeat until convergence Always converges to optimal policy in finite steps.
Value Iteration: Combine evaluation and improvement in one step: This is iterating the Bellman optimality equation. Converges to .
Limitation: requires full knowledge of and , and iterates over all states — only works for small, discrete MDPs. Model-free methods (Q-Learning, Miscoral Difference Learning) remove these requirements.
See also: Bellman Equations, Value Functions, Markov Decision Process