Martingale deviation of the UCRL2 bias term
ProvedBanditAlgorithm.mdp_ucrl2_bias_martingale_deviationFix states, actions, a horizon , a confidence level , a known reward function with values in , a finite MDP with reward function and diameter , and an initial state distribution. There is an event of probability at least under the law of the trajectory produced by UCRL2 such that on , and on the confidence good event, the sum of the increments of the bias martingale is at most :
where is the bias of the optimistic plan of the phase current at time .
Each summand is the difference between the conditional expectation of given the past and its realisation, so the partial sums form a martingale; the bias is measurable with respect to the history at the start of its phase, and on the good event its span is at most , so the increments lie in an interval of length and the Azuma--Hoeffding inequality gives the bound with probability . That the span bound is only available on the good event is handled by stopping the martingale when the good event first fails, which changes nothing on the good event and keeps the increments bounded everywhere.
Formalization Note The last round is excluded because the state following it is not recorded by a trajectory of rounds; the corresponding increment is discharged separately by choosing to maximise the bias of the last phase, which makes it nonpositive.
import Definitions.Def_UCRL2Algorithm open MeasureTheory ProbabilityTheory
theorem BanditAlgorithm.mdp_ucrl2_bias_martingale_deviation
(S A n : ℕ) [NeZero A] (hS : 2 ≤ S) (hn : 0 < n)
(δ : ℝ) (hδ : δ ∈ Set.Ioo (0 : ℝ) 1)
(r : Fin S → Fin A → ℝ) (hr : ∀ s a, r s a ∈ Set.Icc (0 : ℝ) 1)
(M : FiniteMDP S A) (hMr : M.r = r) (hD : 1 ≤ mdpDiameter M)
(μ0 : MDPStateDistribution S) :
∃ E : Set (MDPTrajectory S A n),
mdpMeasure M μ0 (ucrl2Policy n δ r) n Eᶜ ≤ ENNReal.ofReal (δ / 2) ∧
∀ h ∈ mdpConfidenceGoodEvent M n δ ∩ E,
∀ (st : ℕ → Fin S) (act : ℕ → Fin A), (∀ t : Fin n, h t = (st t, act t)) →
∑ t ∈ Finset.range (n - 1),
((∑ s', (M.P (st t) (act t) s' : ℝ)
* mdpOptimisticBias r
(fun x a ↦ mdpConfidenceSet h (mdpPhaseStart h t + 1) n δ x a) s')
- mdpOptimisticBias r
(fun x a ↦ mdpConfidenceSet h (mdpPhaseStart h t + 1) n δ x a)
(st (t + 1)))
≤ mdpDiameter M * Real.sqrt (2 * n * Real.log (2 / δ)) := by
sorry