BanditAgent#
- class statrl.settings.bandits.stochastic.knownhorizon.agent.BanditAgent(name, seed=1)[source]#
Bases:
ABCBase class for horizon-aware stochastic bandit agents.
Identical to the anytime protocol except that
reset()receives the horizon, letting an agent tune its behaviour to the number of rounds it will play.- Parameters:
See also
statrl.settings.bandits.stochastic.anytime.agent.BanditAgentThe anytime counterpart.
statrl.settings.bandits.stochastic.knownhorizon.wrappers.wrapper_anytime_knownhorizon.AnytimeToKnownHorizonAgentWrapperRuns an anytime agent in this setting.
Methods
__init__(name[, seed])reset(horizon)Start a new independent run of known length.
Choose the arm to pull next.
update(arm, reward)Learn from the reward observed for the arm just pulled.