Bandit Algorithms
Tor Lattimore and Csaba Szepesvári
- Location
- Ch. 38
- Pages
- online pp. 512–538
Teaching chapter · canonical scope Compiled
Finite MDPs, Bellman optimality, generated trajectories and occupancy regret, plus a canonical known-reward Hoeffding UCBVI-CH route whose recurrent planner, same-source confidence, optimism, raw cumulative episode pseudo-regret, high-probability terminal, and failure-aware expectation consumer share one adaptive generated process.
Who should read this. Read Foundations, Probability, UCB, and the OFUL stopping-time material first.
Textbook crosswalk
The Book Map is a curated formalization curriculum anchored in Bandit Algorithms, not a chapter-for-chapter reproduction of one book. Page numbers below use its free online edition; companion papers cover algorithm-specific results.
Tor Lattimore and Csaba Szepesvári
Mohammad Gheshlaghi Azar, Ian Osband, and Rémi Munos
Before episode k, aggregate visits and next-state transitions from episodes strictly earlier than k.
Normalize transition counts at each state-action pair, with an explicit zero-count convention.
Add a Hoeffding bonus, clip against the horizon and previous Q table, and run backward dynamic programming.
Generate the next episode with the measurable greedy policy from that recurrent table.
Combine confidence and optimism with charge, Bellman-innovation, and low-count bounds on the same process.
The UCBVI-CH analysis couples empirical-transition concentration, backward optimism, cumulative bonuses, and a martingale innovation term.
BanditRLlib relationship. The compiled local endpoint is deliberately narrow: finite horizon, known deterministic rewards, the same recurrent generated process, strict-prefix counts, policy-value pseudo-regret, the frozen 20/250 high-probability bound, and an expected consumer with an additional KHδ failure term.
The mathematical content is restated in this site's notation; wording is ours. See paper p. 4 in the linked source for the original statement and full assumptions.
The mathematical readings are explanatory summaries. The exact generated Lean statement and its source link remain authoritative for hypotheses, types, constants, and indexing.
Plain-English statement. A finite-horizon Markov decision process packages a horizon, measurable finite state and action spaces, an initial-stage reward, and a stochastic transition kernel.
structure MDP (State : Type u) (Action : Type v) [MeasurableSpace State] [MeasurableSpace Action] [Fintype State] [Fintype Action] where
Plain-English statement. A Markov policy's expected regret equals the sum, under its own state occupancies, of the stagewise gap between the optimal Bellman value and the policy's Bellman value.
BanditRLProof.FiniteHorizonRL.MDP.optimalValueAt_dominates_and_is_attainedtheorem expectedRegret_eq_occupancyGapRemaining {mdp : MDP State Action} (policy : MarkovPolicy mdp) (initialState : Measure State) [IsProbabilityMeasure initialState] : policy.expectedRegret initialState = policy.occupancyGapRemaining mdp.horizon le_rfl initialState
Plain-English statement. Across the scheduled sequence of adaptive empirical planning windows, both the explicit failure probability and the average realized behavior-regret envelope converge to zero, and every window carries the corresponding confidence and optimism guarantee.
BanditRLProof.FiniteHorizonRL.MarkovPolicy.expectedRegret_eq_occupancyGapRemainingtheorem exploratorySource_trajectoryMeasure_projectedCumulativeInverseSqrtPathSupport_decayingExplorationAverageRealizedBehaviorConsistency_allWindows_of_standardBorel (mdp : MDP State Action) (initialState : Measure State) [IsProbabilityMeasure initialState] [StandardBorelSpace State] [StandardBorelSpace Action] (baseVisitFloor : Real) (rewardSource : mdp.MeanCompatibleRewardKernel) (rewardVarianceProxy : NNReal) (law : rewardSource.UniformSubgaussianRewardLaw rewardVarianceProxy) (initialTable : DeterministicMarkovPolicyTable mdp) (defaultState : State) (support : ExploratoryPathSupport mdp initialState) (hbaseFloor : ExploratoryPathUniformVisitFloor support 1 baseVisitFloor) (hrewardBound : forall state action, |mdp.reward state action| <= 1) (hhorizon : 0 < mdp.horizon) (hbaseVisitFloor : 0 < baseVisitFloor) : Tendsto (fun n => (AdaptiveStochasticEpisodeBatchSource.decayingExplorationStochasticRealizedFailureBudget n, AdaptiveStochasticEpisodeBatchSource.decayingExplorationStochasticAverageRealizedBehaviorRegretBound mdp baseVisitFloor rewardVarianceProxy n)) atTop (nhds (0, 0)) /\ forall n, let rounds := AdaptiveEpisodeBatchSource.decayingExplorationRounds mdp n let delta := AdaptiveEpisodeBatchSource.vanishingAverageConfidenceDelta n let explorationRate := AdaptiveEpisodeBatchSource.decayingExplorationRate n let visitFloor := AdaptiveEpisodeBatchSource.decayingExplorationVisitFloor mdp baseVisitFloor n let episodes := AdaptiveEpisodeBatchSource.decayingExplorationScheduledEpisodes mdp baseVisitFloor n let countRadius := AdaptiveEpisodeBatchSource.normalizedCumulativeInverseSqrtCountRadius mdp rounds delta visitFloor let source := exploratorySource mdp initialState episodes rewardSource initialTable defaultState countRadius explorationRate (AdaptiveEpisodeBatchSource.decayingExplorationRate_le_one n) let projection := MDP.MeanCompatibleRewardKernel.knownRewardEpisodeBatchTrajectory (mdp
Plain-English statement. For each fixed inverse-square-root threshold index and horizon greater than four, the exact average realized behavior-regret process stopped at the genuine uncapped first passage is integrable, and its expectation is at most the threshold that was hit.
BanditRLProof.FiniteHorizonRL.AdaptiveStochasticSampledEmpiricalOptimisticSource.selfConsistentScheduledCausalSource_inverseSqrtThresholdUnboundedHittingAfter_squareIntegrableFiniteStoppingTime, BanditRLProof.integrable_stoppedValue_of_uniform_secondMoment_of_memLp_two_roundstheorem selfConsistentScheduledCausalSource_inverseSqrtThresholdUnboundedHittingAfter_stoppedAverageRealizedBehaviorRegret_integrable_and_integral_le_threshold (mdp : MDP State Action) (initialState : Measure State) [IsProbabilityMeasure initialState] [StandardBorelSpace State] [StandardBorelSpace Action] (rewardSource : mdp.MeanCompatibleRewardKernel) (varianceProxy : NNReal) (hvarianceProxy : 0 < varianceProxy) (law : rewardSource.UniformSubgaussianRewardLaw varianceProxy) (initialTable : DeterministicMarkovPolicyTable mdp) (defaultState : State) (support : ExploratoryPathSupport mdp initialState) (baseVisitFloor : Real) (hbaseFloor : ExploratoryPathUniformVisitFloor support 1 baseVisitFloor) (hrewardBound : forall state action, |mdp.reward state action| <= 1) (hhorizon : 4 < mdp.horizon) (hbaseVisitFloor : 0 < baseVisitFloor) (scheduleIndex : Nat) : let source := selfConsistentScheduledCausalSource mdp initialState rewardSource initialTable defaultState varianceProxy baseVisitFloor let stoppingPrefix := selfConsistentScheduledNaturalCausalInverseSqrtThresholdUnboundedHittingAfterStoppingPrefix mdp initialState rewardSource initialTable defaultState varianceProxy baseVisitFloor let stoppedProcess := selfConsistentScheduledNaturalCausalStoppingTimeAverageRealizedBehaviorRegretProcess mdp initialState rewardSource initialTable defaultState varianceProxy baseVisitFloor stoppingPrefix scheduleIndex Integrable stoppedProcess source.trajectoryMeasure /\ integral source.trajectoryMeasure stoppedProcess <= selfConsistentScheduledNaturalCausalInverseSqrtFirstPassageThreshold scheduleIndex
Plain-English statement. For every generated prefix and state-action pair, summing the aggregate transition numerator over next states gives exactly the aggregate visit-count denominator used by UCBVI.
BanditRLProof.FiniteHorizonRL.TransitionCountSummary.sum_aggregateTransitionCount_eq_aggregateVisitCount, BanditRLProof.FiniteHorizonRL.adaptiveCumulativeAggregateTransitionCountAt_eq_sumtheorem sum_adaptiveCumulativeAggregateTransitionCountAt_eq_visitCountAt {mdp : MDP State Action} {episodes : Nat} (trajectory : EpisodeBatchTrajectory mdp episodes) (round : Nat) (state : State) (action : Action) : (∑ nextState : State, adaptiveCumulativeAggregateTransitionCountAt trajectory round state action nextState) = adaptiveCumulativeAggregateVisitCountAt trajectory round state action
Plain-English statement. At successor episode k+1, the canonical source selects exactly the measurable greedy policy produced by the previous-Q-clipped UCBVI recurrence from coordinates at most k.
BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.clippedQRemaining_of_aggregateVisitCount_pos, BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.measurable_clippedPolicyTable, BanditRLProof.FiniteHorizonRL.sum_adaptiveCumulativeAggregateTransitionCountAt_eq_visitCountAttheorem recurrentSource_policyAt_succ (mdp : MDP State Action) (initialState : Measure State) [IsProbabilityMeasure initialState] (defaultState : State) (episodes : Nat) (delta : Real) (trajectory : EpisodeBatchTrajectory mdp 1) (n : Nat) : (recurrentSource mdp initialState defaultState episodes delta).policyAt trajectory (n + 1) = (recurrentSuccessorTable defaultState (scale (State
Plain-English statement. On the recurrent source's own trajectory law, one finite joint event simultaneously controls actual-count singleton transition residuals and the normalized optimal-tail value probe, with mass at most delta/5.
BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.AdaptiveEpisodeBatchSource.trajectoryMeasure_bernsteinCoordinateFailureEvent_le, BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.AdaptiveEpisodeBatchSource.trajectoryMeasure_optimalTailFailureEvent_le, BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentSource_policyAt_succtheorem recurrentSource_trajectoryMeasure_simultaneousTransitionFailureEvent_le_fifth (mdp : MDP State Action) (initialState : Measure State) [IsProbabilityMeasure initialState] [StandardBorelSpace (EpisodeBatch mdp 1)] [StandardBorelSpace (EpisodeBatchTrajectory mdp 1)] (defaultState : State) (episodes : Nat) (delta : Real) (hhorizon : 0 < mdp.horizon) (hepisodes : 0 < episodes) (hdelta : 0 < delta) (hdelta_le_one : delta <= 1) (hreward : ∀ state action, |mdp.reward state action| <= 1) : let source := recurrentSource mdp initialState defaultState episodes delta source.trajectoryMeasure (AdaptiveEpisodeBatchSource.simultaneousTransitionFailureEvent source episodes (logFactor (State
Plain-English statement. Outside the same-source transition failure event, every recurrent generated Q table dominates the true finite-horizon optimal Q values at every stage, state, and action.
BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentSource_trajectoryMeasure_simultaneousTransitionFailureEvent_le_fifth, BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.clippedQTable_dominatesOptimaltheorem recurrentQTableOfTrajectory_dominatesOptimal {mdp : MDP State Action} {initialState : Measure State} [IsProbabilityMeasure initialState] (source : AdaptiveEpisodeBatchSource mdp initialState 1) {episodes : Nat} {delta : Real} {trajectory : EpisodeBatchTrajectory mdp 1} (hhorizon : 0 < mdp.horizon) (hepisodes : 0 < episodes) (hdelta : 0 < delta) (hdelta_le_one : delta <= 1) (hrewardNonneg : ∀ state action, 0 <= mdp.reward state action) (hrewardOne : ∀ state action, mdp.reward state action <= 1) (htrajectory : trajectory ∉ simultaneousTransitionFailureEvent source episodes (logFactor (State
Plain-English statement. For every aligned successor episode on the good transition event, the generated policy-value pseudo-regret is bounded by an inflated sum of visited local confidence charges plus its generated Bellman innovation.
BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.AdaptiveEpisodeBatchSource.recurrentQTableOfTrajectory_dominatesOptimal, BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentSource_trajectoryMeasure_all_successorBatchAligned_aetheorem recurrentSource_generatedSuccessorPseudoRegret_le_charge_add_innovation {mdp : MDP State Action} (initialState : Measure State) [IsProbabilityMeasure initialState] {episodes : Nat} {delta : Real} {trajectory : EpisodeBatchTrajectory mdp 1} (hhorizon : 0 < mdp.horizon) (hepisodes : 0 < episodes) (hdelta : 0 < delta) (hdelta_le_one : delta <= 1) (hrewardNonneg : forall state action, 0 <= mdp.reward state action) (hrewardOne : forall state action, mdp.reward state action <= 1) (defaultState : State) (htrajectory : trajectory ∉ simultaneousTransitionFailureEvent (recurrentSource mdp initialState defaultState episodes delta) episodes (logFactor (State
Plain-English statement. Along every generated path, the total clipped local UCBVI charge paid at actually visited state-action pairs obeys an explicit square-root leading bound plus low-count and harmonic corrections.
BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.sum_positive_batchedInvSqrt_le, BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.sum_high_batchedRatio_le_log, BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.AdaptiveEpisodeBatchSource.recurrentSource_generatedSuccessorPseudoRegret_le_charge_add_innovationtheorem totalGeneratedPairCharge_le_explicit (mdp : MDP State Action) (episodes : Nat) (delta : Real) (trajectory : EpisodeBatchTrajectory mdp 1) (hhorizon : 0 < mdp.horizon) (hepisodes : 0 < episodes) (hdelta : 0 < delta) (hdelta_le_one : delta <= 1) : totalGeneratedPairCharge mdp episodes delta trajectory <= 18 * (mdp.horizon : Real) * logFactor (State
Plain-English statement. The sum of recurrent episode Bellman innovations on the actual generated filtration exceeds its explicit Hoeffding threshold with probability at most delta/5.
BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.AdaptiveEpisodeBatchSource.recurrentSuccessorBellmanInnovation_compensated_hasCondMGFUpperBoundAt, BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.trajectoryMeasure_recurrentBellmanInnovation_sum_ge_letheorem recurrentSource_trajectoryMeasure_bellmanInnovation_sum_ge_threshold_le_fifth (mdp : MDP State Action) (initialState : Measure State) [IsProbabilityMeasure initialState] [StandardBorelSpace (EpisodeBatch mdp 1)] [StandardBorelSpace (EpisodeBatchTrajectory mdp 1)] (defaultState : State) (episodes : Nat) (delta : Real) (hhorizon : 0 < mdp.horizon) (hepisodes : 0 < episodes) (hdelta : 0 < delta) (hdelta_le_one : delta <= 1) : let source := recurrentSource mdp initialState defaultState episodes delta source.trajectoryMeasure {trajectory | bellmanInnovationThreshold (State
Plain-English statement. For one recurrent generated known-reward UCBVI-CH process, raw policy-value pseudo-regret across exactly K episode coordinates exceeds the explicit 20/250 Hoeffding bound with probability at most delta.
BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.AdaptiveEpisodeBatchSource.recurrentSource_generatedSuccessorPseudoRegret_le_charge_add_innovation, BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.totalGeneratedPairCharge_le_explicit, BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentSource_trajectoryMeasure_bellmanInnovation_sum_ge_threshold_le_fifth, BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentSource_trajectoryMeasure_simultaneousTransitionFailureEvent_le_fifththeorem recurrentSource_trajectoryMeasure_cumulativeEpisodePseudoRegret_gt_canonicalRegretBound_le (mdp : MDP State Action) (initialState : Measure State) [IsProbabilityMeasure initialState] [StandardBorelSpace (EpisodeBatch mdp 1)] [StandardBorelSpace (EpisodeBatchTrajectory mdp 1)] (defaultState : State) (episodes : Nat) (delta : Real) (hhorizon : 0 < mdp.horizon) (hepisodes : 0 < episodes) (hdelta : 0 < delta) (hdelta_le_one : delta <= 1) (hrewardNonneg : ∀ state action, 0 <= mdp.reward state action) (hrewardOne : ∀ state action, mdp.reward state action <= 1) : let source := recurrentSource mdp initialState defaultState episodes delta source.trajectoryMeasure {trajectory | canonicalRegretBound (State
Plain-English statement. The same recurrent UCBVI-CH pseudo-regret is integrable, and its expectation is at most the frozen high-probability bound plus the explicit K H delta failure contribution.
BanditRLProof.FiniteHorizonRL.AdaptiveCumulativeHoeffdingUCBVI.recurrentSource_trajectoryMeasure_cumulativeEpisodePseudoRegret_gt_canonicalRegretBound_letheorem integral_cumulativeEpisodePseudoRegret_recurrentSource_le_canonicalRegretBound_add_failure (mdp : MDP State Action) (initialState : Measure State) [IsProbabilityMeasure initialState] [StandardBorelSpace (EpisodeBatch mdp 1)] [StandardBorelSpace (EpisodeBatchTrajectory mdp 1)] (defaultState : State) (episodes : Nat) (delta : Real) (hhorizon : 0 < mdp.horizon) (hepisodes : 0 < episodes) (hdelta : 0 < delta) (hdelta_le_one : delta <= 1) (hrewardNonneg : ∀ state action, 0 <= mdp.reward state action) (hrewardOne : ∀ state action, mdp.reward state action <= 1) : let source := recurrentSource mdp initialState defaultState episodes delta ∫ trajectory, cumulativeEpisodePseudoRegret source defaultState episodes trajectory ∂source.trajectoryMeasure <= canonicalRegretBound (State
Complete in the canonical Chapter 9 scope when finite-MDP Bellman and occupancy foundations, a single generated adaptive episode process with known deterministic rewards in [0,1], same-prefix aggregate transition counts, a previous-Q clipped Hoeffding UCBVI-CH planner, same-law confidence and optimism, generated raw cumulative episode pseudo-regret, the explicit 20/250 high-probability terminal, and an integrable failure-aware expected-regret corollary all compile through the public root and a nondegenerate typed canary.