Known horizon#

Read more in the user guide.

Protocol#

agent.BanditAgent

Base class for horizon-aware stochastic bandit agents.

interaction.BanditInteraction

Interaction loop for the known-horizon stochastic bandit setting.

The environment is StochasticBanditEnv, re-exported unchanged as statrl.settings.bandits.stochastic.knownhorizon.environment.StochasticBanditEnv. Knowing the horizon changes what the agent may do, not what the problem is, so every environment of the anytime setting works here as is.

Wrappers#

Adapters between this setting and the anytime one, letting agents of both be compared in a single experiment.

wrappers.wrapper_anytime_knownhorizon.AnytimeToKnownHorizonAgentWrapper

Run an anytime agent inside the known-horizon setting.

wrappers.wrapper_anytime_knownhorizon.KnownHorizonToAnytimeAgentWrapper

Run a horizon-aware agent in the anytime setting, at a fixed horizon.