kumulant

Bandit

interface Bandit(source)

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:

Each concrete bandit's KDoc states which interfaces it implements and why.

Inheritors

Properties

Link copied to clipboard
abstract val nbrArms: Int

Number of arms in the population. Fixed at construction; arm indices are [0, nbrArms).

Link copied to clipboard
abstract val random: 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.

Functions

Link copied to clipboard
abstract fun 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.

nbrArms

abstract val nbrArms: Int(source)

Number of arms in the population. Fixed at construction; arm indices are [0, nbrArms).

random

abstract val random: Random(source)

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

abstract fun reset()(source)

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.