Generalized Policy Iteration
Imagine improving a route planner while it is still learning how long each road really takes. Generalized Policy Iteration (GPI) is the idea that an agent can continually refine its estimates of what is valuable and its choices of what to do, with each process pushing the other forward.
Two processes that cooperateGPI combines two core operations:
- Policy evaluation: estimate the return produced by the current policy. In a known environment model, this means using transition probabilities and rewards to calculate state values, such as Vπ(s).
- Policy improvement: change the policy to prefer actions that look better under those current value estimates. A greedy improvement chooses the action with the largest expected immediate reward plus value of its next state.
In textbook policy iteration, evaluation is completed before improvement begins. GPI is broader: evaluation and improvement can be partial, approximate, and interleaved. Update a value estimate a little, improve the policy a little, then repeat. The two are not separate stages so much as competing pressures: evaluation makes values match the policy; improvement makes the policy greedy with respect to the values.
Why this reaches good behaviourWhen these pressures settle, the policy is greedy with respect to its own value function. That is the Bellman optimality condition, so the result is an optimal policy in the tabular, model-known setting. Value iteration is an extreme GPI style: it performs only a single evaluation backup before improving implicitly. Modified policy iteration sits between value iteration and full policy iteration, doing several evaluation sweeps per improvement.
Why it matters in reward learningGPI explains the engine behind much of reinforcement learning: behaviour determines which outcomes are experienced, while those outcomes revise the values used to choose future behaviour. In a gridworld, an agent might initially value a long safe route; partial updates reveal a shortcut, and policy improvement shifts traffic toward it. If evaluation is inaccurate or improvement is too aggressive, a policy can chase misleading estimates instead. Algorithms such as DQN retain this basic evaluation–improvement relationship, even though neural networks, sampled experience, and unstable moving targets make convergence far less clean than in dynamic programming.
Generalized Policy Iteration (GPI) is the repeated, interleaved process of policy evaluation—estimating how good a policy is—and policy improvement—updating it to choose better actions from those estimates. The two processes need not finish before the other begins. GPI matters because their mutual feedback drives policies toward optimal behavior and underlies dynamic-programming and many reinforcement-learning algorithms.
Imagine learning a new board game. You try a strategy, notice which choices usually lead to winning, then adjust your strategy to make more of those choices. You repeat this cycle: assess the current plan, improve it, and assess the new plan again.
Generalized Policy Iteration is the broad idea behind this kind of learning. A “policy” is simply a plan for what to do in each situation. The learner keeps comparing how well its current plan is likely to turn out, then revises the plan to favor better outcomes. It matters because good decision-making rarely appears in one leap; it grows through repeated feedback and refinement.