Textrenderer#
- class statrl.settings.bandits.stochastic.anytime.renderers.textrenderer.Textrenderer[source]#
Bases:
objectPrint each bandit round to stdout, one line per pull.
- started#
Whether the header has been printed yet. The header is emitted lazily on the first
render()call.- Type:
Methods
__init__()render(env, last)Print the arm just played and the reward it returned.
start(env)Print the header naming the environment and its arms.
stop(env)Print the closing rule at the end of a rendered run.
- render(env, last)[source]#
Print the arm just played and the reward it returned.
- Parameters:
env (StochasticBanditEnv) – The environment being rendered.
last (tuple of (int or None, float)) – The
(arm, reward)pair recorded by the environment. ANonearm means no pull has happened yet, and nothing is printed.
- start(env)[source]#
Print the header naming the environment and its arms.
- Parameters:
env (StochasticBanditEnv) – The environment being rendered.
- stop(env)[source]#
Print the closing rule at the end of a rendered run.
- Parameters:
env (StochasticBanditEnv) – The environment being rendered.