TrackedUnivariateBandit
Observability wrapper around any UnivariateBandit. Univariate has no context vector so two aggregate slots cover the surface:
chooseTemplate sees
update(value = armIndex.toDouble(), weight = 1.0)at everychoose. The arm-pick distribution over time.updateArmRewardTemplate sees
update(x = armIndex.toDouble(), y = reward, weight)at everyupdate. Per-arm reward distribution.
Both templates are optional; null disables that side.
Constructors
TrackedUnivariateBandit
Properties
inner
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.
Functions
choose
Pick an arm to play next. Uses Bandit.random for any sampling. The returned index is in [0, nbrArms). Repeated calls without intervening updates may return different arms (for randomised selection) or the same arm (for argmax-style policies once the leading arm is well-separated).
chooseResult
Snapshot of the choose-side arm-pick distribution; null when chooseTemplate is unset.
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.
update
Record reward value for armIndex with weight. Arm indices must be in [0, nbrArms). Weight and reward handling follow the implementation's accumulator or policy; see com.eignex.kumulant.core.Stat for the shared accumulator weight rules.
updateArmRewardResult
Snapshot of the arm-versus-reward paired stat; null when updateArmRewardTemplate is unset.
Record each arm/reward pair in order by calling update. armIndices and values must have equal sizes. Non-null weights must have the same size; null applies 1.0 to every observation. Size checks run before any update, but a later update failure can leave earlier observations applied.