Policy iteration (Prop. 7.2.2)
ProvedBertsekasDP.ssp_policy_iterationProposition 7.2.2 (policy iteration). Under Assumption 7.2.1, consider policy iteration: starting from an admissible stationary policy , alternately evaluate the current policy, solving , and improve it, choosing to attain
Then the generated policies improve monotonically and the algorithm terminates with an optimal policy:
Policy iteration is the alternative to value iteration that terminates finitely rather than in the limit: each iteration either strictly improves some state's cost or has already reached a solution of Bellman's equation, and there are only finitely many stationary policies. In practice it converges in very few iterations, at the price of solving a linear system per step.
Formalization Note The evaluations are given as fixed points of the corresponding policy operators, matching the linear system solved in practice. Reaching a with is exactly optimality by Prop. 7.2.1(b),(d).
import Mathlib import Definitions.Def_BertsekasSSPModel
namespace BertsekasDP
theorem ssp_policy_iteration {n : ℕ} {C : Type} [Fintype C]
(M : BertsekasSSPModel n C)
(hA : ∃ m : ℕ, 0 < m ∧ ∀ π, BertsekasSSPAdmissible M π →
∀ i, BertsekasSSPSurvival M π m i < 1)
(μ : ℕ → Fin n → C) (hadm : ∀ k i, μ k i ∈ M.U i)
(J : ℕ → Fin n → ℝ)
(heval : ∀ k, BertsekasSSPPolicyOp M (μ k) (J k) = J k)
(himp : ∀ k i,
M.g i (μ (k + 1) i) + ∑ j, M.p i (μ (k + 1) i) j * J k j =
BertsekasSSPBellmanOp M (J k) i) :
(∀ k i, J (k + 1) i ≤ J k i) ∧
(∃ k, BertsekasSSPBellmanOp M (J k) = J k) := by sorry
end BertsekasDPRead-back
What the Lean code literally says, in plain math · claude-fable-5
Let be a BertsekasSSPModel on states with finite control type , and assume : there is an such that every admissible policy sequence has -step survival mass strictly less than at every state. Suppose given:
- a sequence of stage policies () with for all ;
- a sequence of functions such that for every , — each is assumed to be a fixed point of the corresponding policy operator (nothing here forces it to be the unique one, though the given functions are the ones the conclusions speak about);
- the policy improvement hypothesis: for every and every state ,
i.e. the control exactly attains the Bellman minimum for at every state.
The conclusion is the conjunction of two claims:
- Monotonicity: for every and every state , (non-strict, pointwise).
- Finite arrival at a Bellman fixed point: there exists a such that (equality of functions).
Nothing is asserted about equaling any optimal value, about the policies stabilizing, or about what happens after such a . The proof is a placeholder.
Confirmed by the mission captain (proposal self-audit).