Theorem 4.1 — improvement bound for the conservative update
ProvedApproxOptRL.CPI.conservative_update_improvementConsider a finite MDP with nonempty state set , nonempty action set , transition probabilities , rewards with , and discount factor ; let be a state distribution and let , be policies.
Let be the policy advantage of with respect to and , and let
For the update rule (4.1), , and for all :
The first term is the first-order gain and the second a penalty for the state distribution of differing from . For small the bound guarantees improvement whenever the policy advantage is positive; it is the step on which conservative policy iteration rests.
Formalization Note is a quantity local to this theorem (the maximum over all states, written as Finset.sup'), unrelated to the accuracy of a greedy chooser. The denominator is positive under , .
import Mathlib import Definitions.Def_FoundationsML_ReinforcementLearning_IsTransitionKernel import Definitions.Def_FoundationsML_ReinforcementLearning_IsPolicy import Definitions.Def_ApproxOptRL_Shared_Model import Definitions.Def_ApproxOptRL_CPI_PolicyAdvantage open ApproxOptRL.Shared open FoundationsML.ReinforcementLearning
namespace ApproxOptRL.CPI
/-- **Theorem 4.1** (Kakade–Langford, ICML 2002, p. 4; proof p. 8). Let `𝔸 = 𝔸_{π,μ}(π')` be
the policy advantage of `π'` with respect to `π` and `μ`, and let
`ε = max_s |E_{a ∼ π'(a;s)}[A_π(s, a)]|`. For the update rule (4.1),
`π_new = (1 - α) π + α π'`, and for all `α ∈ [0, 1]`:
`η_μ(π_new) - η_μ(π) ≥ (α/(1-γ)) (𝔸 - 2αγε/(1 - γ(1 - α)))`.
Here `ε` is a quantity local to this theorem (not the accuracy of a greedy chooser).
Standing assumptions of the paper's §2: finite nonempty `S`, `A`; transition kernel `P`;
rewards in `[0, R]`; `0 ≤ γ < 1`; `μ` a state distribution. -/
theorem conservative_update_improvement {S A : Type} [Fintype S] [Fintype A] [DecidableEq S]
[Nonempty S] [Nonempty A]
(P : S → A → S → ℝ) (hP : IsTransitionKernel P)
(r : S → A → ℝ) (R : ℝ) (hR : 0 < R) (hr : ∀ s a, 0 ≤ r s a ∧ r s a ≤ R)
(γ : ℝ) (hγ0 : 0 ≤ γ) (hγ1 : γ < 1)
(μ : S → ℝ) (hμ : IsStateDist μ)
(π π' : S → A → ℝ) (hπ : IsPolicy π) (hπ' : IsPolicy π')
(α : ℝ) (hα : α ∈ Set.Icc (0 : ℝ) 1) :
let ε : ℝ := Finset.univ.sup' Finset.univ_nonempty
(fun s => |∑ a, π' s a * advantage P r γ π s a|)
α / (1 - γ) * (policyAdvantage P r γ π μ π' - 2 * α * γ * ε / (1 - γ * (1 - α))) ≤
eta P r γ (mixPolicy α π π') μ - eta P r γ π μ := by sorry
end ApproxOptRL.CPI
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.