Moss
MOSS; Minimax Optimal Strategy in the Stochastic case (Audibert & Bubeck 2009). UCB variant where the confidence bound shrinks faster than UCB1 once an arm has accumulated more than t / K samples. Score is mean + sqrt(max(0, ln(t / (K * n))) / n).
Achieves minimax-optimal regret in the stochastic bandit setting; tighter worst-case bound than UCB1 across all reward distributions the bandit could face. Eliminates the log(t) slack term once an arm is sampled enough.
Uses the anytime form (no fixed horizon argument). The arm count K in the t / K denominator comes from the bandit's addArm / removeArm calls.
Reach for it when minimax regret matters more than asymptotic optimality ; adversarial reward distributions, settings where the worst case matters. For Bernoulli rewards specifically, KlUcb is asymptotically tighter.
Properties
arm
Functions
createPolicy
Fresh policy carrying the same configuration but no accumulated global state. A replica bandit must not share counters with the bandit it was created from, so any policy holding mutable state has to override this; the default returns this because a stateless policy is safe to share.
evaluate
Score an arm given its current snapshot. Higher scores are preferred by the bandit. step is the global update count (for time-dependent exploration schedules); rng is the bandit's shared com.eignex.kumulant.bandit.Bandit.random (consumed by sampling policies).
Hook called when a new arm joins the population. Lets stateful policies fold the new arm's snapshot into their global counters (UCB's total-samples). Default no-op.
Allocate a fresh per-arm accumulator from the arm spec with the given concurrency. Default delegates to arm.createStat(concurrency); override only if the policy needs a non-standard variant.
Hook called when an arm leaves the population. Inverse of addArm; lets stateful policies remove the departing arm's contribution from their global counters. Default no-op.