The UCRL2 doubling rule generates a valid phase schedule
ProvedBanditAlgorithm.mdp_ucrl2_phase_schedule_from_doubling_ruleFix states, actions, a horizon and a trajectory of rounds. The phase-start map of UCRL2 -- a new phase begins at time as soon as the number of visits to some pair since the start of the current phase has reached , where is the number of visits accumulated to that pair before the phase began -- cuts into finitely many consecutive nonempty phases: there are a number of phases and a nondecreasing sequence of times , stationary at beyond , such that
- every time in has as the start of its phase;
- the doubling inequality holds: for and every pair , the visits to before number at most , where counts the visits before -- no pair is visited during a phase more often than it had been visited before it;
- .
The last bound is the combinatorial heart of the algorithm: each of the pairs can trigger the end of a phase only after its count has doubled, so it triggers at most of its final count many phases, and Jensen's inequality over the pairs turns the sum of those logarithms into .
Formalization Note The doubling inequality is stated with an addition rather than a truncated subtraction, which is the same statement for natural numbers and avoids the cutoff.
import Definitions.Def_UCRL2Algorithm open MeasureTheory ProbabilityTheory
theorem BanditAlgorithm.mdp_ucrl2_phase_schedule_from_doubling_rule
(S A n : ℕ) (hS : 0 < S) (hA : 0 < A) (hn : 0 < n)
(h : MDPTrajectory S A n) :
∃ (K : ℕ) (τ : ℕ → ℕ),
τ 0 = 0 ∧ τ K = n ∧ (∀ k, τ k ≤ τ (k + 1)) ∧
(∀ k < K, τ k < τ (k + 1)) ∧
(∀ k, K ≤ k → τ k = n) ∧
(K : ℝ) ≤ 3 * Real.sqrt (S * A * n) ∧
(∀ k < K, ∀ u ∈ Finset.Ico (τ k) (τ (k + 1)), mdpPhaseStart h u = τ k) ∧
(∀ k < K, ∀ (s : Fin S) (a : Fin A),
mdpVisitCount h (τ (k + 1)) s a
≤ mdpVisitCount h (τ k) s a + max 1 (mdpVisitCount h (τ k) s a)) := by
sorry