Lemma 6.1 — performance difference:
ProvedApproxOptRL.CPI.performance_differenceConsider a finite MDP with nonempty state set , nonempty action set , transition probabilities , rewards with , and discount factor . Let , , and be the normalized value function, the advantage, the discounted future state distribution and the performance measure.
For any policies and and any starting state distribution ,
The states are weighted by , the discounted future state distribution of the new policy , while the advantage is that of the old policy . The identity expresses the change of performance exactly through the advantages of the old policy, and it is the basic tool behind the improvement bound for the conservative update (Theorem 4.1) and the quality bound for policies with small policy advantage.
Formalization Note The Lean variable πt stands for . The hypotheses (transition kernel, rewards in , , policies, state distribution) are the paper's standing assumptions of §2.
import Mathlib import Definitions.Def_FoundationsML_ReinforcementLearning_IsTransitionKernel import Definitions.Def_FoundationsML_ReinforcementLearning_IsPolicy import Definitions.Def_ApproxOptRL_Shared_Model open ApproxOptRL.Shared open FoundationsML.ReinforcementLearning
namespace ApproxOptRL.CPI
/-- **Lemma 6.1** (Kakade–Langford, ICML 2002, p. 6). For any policies `π̃` and `π` and any
starting state distribution `μ`,
`η_μ(π̃) - η_μ(π) = (1/(1-γ)) E_{(a,s) ∼ π̃ d_{π̃,μ}}[A_π(s, a)]`.
The states are weighted by `d_{π̃,μ}`, the discounted future state distribution of the **new**
policy `π̃`, and the actions by `π̃`; the advantage is that of the old policy `π`.
In Lean, `πt` stands for the paper's `π̃`.
Standing assumptions of the paper's §2: finite nonempty `S`, `A`; transition kernel `P`;
rewards in `[0, R]`; `0 ≤ γ < 1`. -/
theorem performance_difference {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 μ)
(πt π : S → A → ℝ) (hπt : IsPolicy πt) (hπ : IsPolicy π) :
eta P r γ πt μ - eta P r γ π μ =
1 / (1 - γ) * ∑ s, futureStateDist P γ πt μ s * ∑ a, πt s a * advantage P r γ π s a := by sorry
end ApproxOptRL.CPI
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.