Bandit
Root of every bandit kumulant ships. Carries the bare minimum every flavour needs: arm count, a randomness source, and a way to wipe state back to its prior-seeded baseline.
The action and state surfaces are deliberately orthogonal:
Action surface: UnivariateBandit (indexless arms,
choose()) and ContextualBandit (per-round context vector,choose(x)). Pick the one that matches the decision shape.State surface: Snapshotable (any state shape) with the PerArmBandit convenience for the common case where state is one Result per arm.
Inspection: Scorable / ContextualScorable expose per-arm scores; bandits whose selection rule is an argmax-over-independent-scores implement these. Joint-sampling bandits (com.eignex.kumulant.bandit.univariate.BoltzmannBandit, com.eignex.kumulant.bandit.univariate.TopTwoThompsonBandit) and exponential-weights bandits (com.eignex.kumulant.bandit.univariate.Exp3Bandit) do not; no single per-arm score is meaningful in isolation for them.
Each concrete bandit's KDoc states which interfaces it implements and why.
Inheritors
Properties
Single source of randomness for UnivariateBandit.choose / ContextualBandit.choose and any policy-internal sampling. Callers pass a Random(seed) at construction for reproducible exploration; the bandit threads the same instance through every randomised decision.
Functions
Clear all state back to the prior-seeded baseline. Equivalent to spawning a fresh bandit with the same configuration via Snapshotable.create, but in place; keeps the same arm count, policy, concurrency mode, and random instance.
nbrArms
random
Single source of randomness for UnivariateBandit.choose / ContextualBandit.choose and any policy-internal sampling. Callers pass a Random(seed) at construction for reproducible exploration; the bandit threads the same instance through every randomised decision.
reset
Clear all state back to the prior-seeded baseline. Equivalent to spawning a fresh bandit with the same configuration via Snapshotable.create, but in place; keeps the same arm count, policy, concurrency mode, and random instance.