TextRenderer#
- class statrl.settings.markovdecisionprocess.discrete_nostructure.renderers.textRenderer.TextRenderer[source]#
Bases:
objectPrint each MDP step to stdout as a colourized row of states.
The current state is highlighted red and every state reachable from it in one step blue, alongside the action played and the reward it returned.
Methods
__init__()render(env, last)Print one step: the action, the reward, and the state row.
start(env)Print the header naming the environment, its actions, and the legend.
stop(env)Print the closing rule at the end of a rendered run.
- render(env, last)[source]#
Print one step: the action, the reward, and the state row.
- Parameters:
env (DiscreteMDP) – The environment being rendered.
last (tuple of (int, int or None, float)) – The
(state, action, reward)triple recorded by the environment. ANoneaction means no step has been taken yet, and only the state row is printed.