Summary
Exploration gathers information; exploitation chooses the action that currently appears best from available evidence. Arm A leads by estimated reward, but arm B has far fewer observations. Compare a random switch, an uncertainty index, and a posterior draw before choosing the next observation.
The setup
There are eligible actions with unknown stationary reward means . Each round chooses one action and observes its reward. For horizon , pseudo-regret compares chosen means with the best eligible mean:
This rewards cumulative performance, not necessarily precise identification at a fixed deadline. Never explore an action outside safety, permission, or resource eligibility. Our displayed means are generic bounded-reward estimates, not exact Bernoulli success fractions.
An uncertainty bonus or a posterior draw can overturn the mean leader
Derivation
Can the lower estimated mean win an uncertainty-aware choice?
-greedy
Choose the empirical leader with probability ; otherwise sample uniformly across all eligible arms. Declare a fixed order for exact score ties. For and , the probabilities are , not .
UCB (Upper Confidence Bound)
Initialize untried eligible arms first, or give them infinite priority. For positive pull counts , select the largest index:
For the displayed , the indices are approximately , selecting B. This coefficient illustrates selection; it does not supply UCB1’s stated guarantee. Classical logarithmic, gap-dependent UCB1 bounds assume stationary independent bounded rewards and the corresponding bonus convention.
Thompson sampling
Draw one plausible mean per eligible arm from its posterior; select the largest draw and update from the observed reward. Draws select B, not necessarily on the next round. Separately, a Bernoulli likelihood and Beta prior become Beta after two successes and one failure. Its posterior mean is .
When each strategy is the right choice
Reward means drift
New task: respond when a product update changes rewards.
Picture and change: compare accumulated evidence with a declared recent window or a justified reset/discount model.
Check: 90 successes and ten failures yield Beta. After ten new failures, pooling gives Beta, mean . Using only the new window gives Beta, mean . Discarding history reacts faster but increases uncertainty; stationary regret guarantees no longer transfer automatically.
Use when: fixed means no longer describe the environment.
Estimate a causal comparison
New task: estimate a common-population effect, not merely reward during learning.
Picture and change: specify randomized assignments, recorded propensities, mature outcomes, and a valid adaptive-inference plan.
Check: two independent units have assignment probabilities . The first receives A, the second B; both rewards equal one. Inverse-propensity population means are and . These estimates do not supply a fixed-sample confidence interval after arbitrary adaptive stopping.
Use when: an identified effect and its precision drive the design; retain required controls.
Beyond bandits
Contextual bandits condition reward estimates on available features. Delayed outcomes require pending-assignment accounting rather than treating missing rewards as zeros. Costs and permissions constrain the eligible set before selection.
In sequential RL, actions also change future states. Boltzmann policies sample proportionally to . Maximum-entropy objectives reward policy entropy; intrinsic bonuses target chosen novelty signals. These change the objective or observation process, not merely the bandit score.
Common pitfalls
A bare schedule is not a universal logarithmic-regret theorem. Insufficient exploration can preserve a noisy leader; excessive exploration incurs continuing opportunity cost. Hoeffding bonuses do not directly handle arbitrary unbounded rewards. Posterior sampling does not automatically track drift or guarantee optimality under a misspecified likelihood.
Is constant epsilon always wrong?
Answer
No: continuing support or adaptation may be required. If the true means equal the displayed estimates, the fixed probabilities yield reward , short of by . That fixed rule incurs expected regret under these stationary means. Judge its information benefit against the stated objective.
UCB’s action is deterministic given history and tie rules, but that history contains random rewards. Thompson draws are reproducible with controlled random state and execution; compare repeated seeds and matching reward streams.