Learning objectives
- Tell evaluation from improvement.
- Compare with value iteration.
The idea
Policy iteration alternates between evaluating the current policy (solving V^π) and improving it greedily.
Explanation
It ends in a finite number of iterations because the number of deterministic policies is finite. Each iteration costs more than a single value-iteration sweep but fewer iterations are needed.
Equations
\pi\xrightarrow{\text{evaluate}}V^\pi\xrightarrow{\text{improve}}\pi'(s)=\arg\max_a\sum_{s'}P(s'|s,a)[R+\gamma V^\pi(s')]When the policy no longer changes it is optimal.
Worked example
In "value iteration vs policy iteration" the final policies usually match while count and cost differ.
Common mistakes
An incomplete evaluation gives a misleading policy.
Summary
Policy iteration: evaluate then improve until the policy is stable.
Related experiments
Assessment questions
References
- Sutton, R. S.; Barto, A. G. (1998). Reinforcement learning: an introduction (first-edition record; the second edition is free at the author's page). IEEE Transactions on Neural Networks 9(5):1054. doi:10.1109/tnn.1998.712192
