seldonian.RL.environments.n_step_mountaincar.N_step_mountaincar¶
- class N_step_mountaincar¶
Bases:
Environment
- __init__()¶
Extends the classic Mountaincar environment such that each action is taken n_steps times instead of once. Refer to
mountaincar.Mountaincar
docstring.- Variables:
n_steps (int) – The number of repeated steps to take following a single action.
mc_env – An instance of the Mountaincar class.
env_description (
Env_Description
) – contains attributes describing the environmentterminal_state (bool) – Whether the terminal obs is occupied
gamma – The discount factor, hardcoded to 1.
- __repr__()¶
Return repr(self).
Methods
- get_env_description()¶
Get environment description. Override this method in child class implementation
- get_observation()¶
Wrapper to get the position and velocity of the cart from the Mountain car environment.
- reset()¶
Go back to initial obs and timestep
- start_visualizing()¶
Turn on visualization debugger.
- stop_visualizing()¶
Turn off visualization debugger.
- terminated()¶
Get the terminal observation
- transition(action)¶
Transition between states given an action, return a reward.
- Parameters:
action – A possible action at the current obs
- Returns:
reward for reaching the next obs
- visualize()¶
Print out current observation, useful for debugging. Override this method in child class implementation