Policy improvement theorem for stochastic policies
ProvedSuttonBartoRL.DP.policy_improvement_theorem_stochasticdynamic-programmingp2o-batch-b23bp2o-gran-per-chapterp2o-plan-bookp2o-v1reinforcement-learning
Let and be stochastic policies of a finite MDP with discount , and write
If for all , then
and at every state where , also .
This is the form of the theorem used for -greedy improvement in Chapter 5 and for stochastic greedy policies that split probability among tied actions.
Formalization Note The book asserts only that the theorem "carries through as stated for the stochastic case" (p. 79). The reading of as the -average of is the one the book itself uses in (5.2), p. 101.
Preamble
import Mathlib import Definitions.Def_SuttonBartoRL_DP_MDP import Definitions.Def_SuttonBartoRL_DP_ValueFunctions
Formal statement
namespace SuttonBartoRL.DP
/-- Policy improvement theorem for stochastic policies, Sutton & Barto (2018), p. 79 ("carries
through as stated for the stochastic case"), with `q_π(s, π'(s)) = Σ_a π'(a | s) q_π(s, a)` as in
(5.2), p. 101: if `Σ_a π'(a | s) q_π(s, a) ≥ v_π(s)` for all `s`, then `v_{π'}(s) ≥ v_π(s)` for all
`s`, strictly at every state where the hypothesis is strict. -/
theorem policy_improvement_theorem_stochastic {S A : Type} [Fintype S] [DecidableEq S]
[Fintype A] (M : MDP S A) (γ : ℝ) (hγ0 : 0 ≤ γ) (hγ1 : γ < 1) (π π' : Policy S A)
(h47 : ∀ s, stateValue M γ π s ≤ ∑ a, π'.prob s a * actionValue M γ π s a) :
(∀ s, stateValue M γ π s ≤ stateValue M γ π' s) ∧
(∀ s, stateValue M γ π s < ∑ a, π'.prob s a * actionValue M γ π s a →
stateValue M γ π s < stateValue M γ π' s) := by sorry
end SuttonBartoRL.DP
Source
Sutton & Barto, Reinforcement Learning: An Introduction, 2nd ed., MIT Press (2018), ISBN 9780262039246, §4.2, p. 79 ("carries through as stated for the stochastic case"); reading of q_π(s, π′(s)) from (5.2), p. 101
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.