BanditAlgorithm.bandit_ucb_regret_bound
Proved(UCB regret bound, GOAL) Consider UCB (L&S Algorithm 3) on a stochastic -armed 1-subgaussian bandit: play each arm once, then play
For any horizon , if then
import Definitions.Def_banditRegret import Definitions.Def_ucbPolicy open MeasureTheory ProbabilityTheory
theorem BanditAlgorithm.bandit_ucb_regret_bound {k : ℕ} (hk : 0 < k) {ν : StochasticBandit k}
(hν : IsSubgaussianBandit 1 ν) {n : ℕ} (hn : 0 < n)
{π : BanditPolicy k} (hπ : IsUCBPolicy (1 / (n : ℝ) ^ 2) π) :
banditRegret ν π n ≤
3 * ∑ i, banditGap ν i +
∑ i ∈ Finset.univ.filter (fun i ↦ 0 < banditGap ν i),
16 * Real.log n / banditGap ν i := by
sorry
Read-back
What the Lean code literally says, in plain math · claude-fable-5
Notation (all unfolded from the imported definitions). Fix arms with distributions (probability measures on ), means , optimal mean , gaps . For a length- history of (arm, reward) pairs, is the pull count of arm and its empirical mean ( when ). The index with parameter is , with the junk conventions , for , for (so an unpulled arm has index ). is the history measure generated by interacting with (Dirac at the empty history, then iteratively compose with the arm-then-reward step kernel and push forward along append), and is the regret.
Claim. Suppose:
- ;
- is -subgaussian: every arm is integrable and for every arm and every , ;
- ;
- is a UCB policy at confidence parameter : at every round and every history there is an arm with (deterministic), such that is unpulled whenever some arm is unpulled, and otherwise maximizes over all arms . (For and a pulled arm, , since .)
Then
Edge cases:
- The second sum runs only over arms with strictly positive gap, so its divisions are never by zero; arms with (in particular any optimal arm) contribute only to the first sum, where their term is .
- is the natural logarithm; for one has , every index bonus is (the index degenerates to the empirical mean), , and the bound reads .
- The UCB predicate leaves tie-breaking and the choice among unpulled arms free; the bound is asserted for every policy satisfying the predicate.
Confirmed by the mission captain (proposal self-audit).