SampleCountingPolicy
Base for policies whose score depends on the population's total sample weight (the UCB family and annealed epsilon-greedy). Tracks that total and the arm count through update, addArm and removeArm; sampleWeight reads an arm snapshot's share of the total.
The counters are shared across arms, so concurrent updates use atomic cells.
Inheritors
Constructors
SampleCountingPolicy
Properties
Functions
addArm
removeArm
update
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.
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.
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).