pytorchrl.agent.env.openai_baselines_dependencies package
Subpackages
- pytorchrl.agent.env.openai_baselines_dependencies.vec_env package
- Submodules
- pytorchrl.agent.env.openai_baselines_dependencies.vec_env.dummy_vec_env module
- pytorchrl.agent.env.openai_baselines_dependencies.vec_env.subproc_vec_env module
- pytorchrl.agent.env.openai_baselines_dependencies.vec_env.util module
- pytorchrl.agent.env.openai_baselines_dependencies.vec_env.vec_env module
- Module contents
Submodules
pytorchrl.agent.env.openai_baselines_dependencies.Monitor module
- exception pytorchrl.agent.env.openai_baselines_dependencies.Monitor.LoadMonitorResultsError[source]
Bases:
Exception
- class pytorchrl.agent.env.openai_baselines_dependencies.Monitor.Monitor(env, filename, allow_early_resets=False, reset_keywords=(), info_keywords=())[source]
Bases:
gym.core.Wrapper- EXT = 'monitor.csv'
- close()[source]
Override close in your subclass to perform any necessary cleanup.
Environments will automatically close() themselves when garbage collected or when the program exits.
- f = None
- reset(**kwargs)[source]
Resets the environment to an initial state and returns an initial observation.
Note that this function should not reset the environment’s random number generator(s); random variables in the environment’s state should be sampled independently between multiple calls to reset(). In other words, each call of reset() should yield an environment suitable for a new episode, independent of previous episodes.
- Returns
the initial observation.
- Return type
observation (object)
- step(action)[source]
Run one timestep of the environment’s dynamics. When end of episode is reached, you are responsible for calling reset() to reset this environment’s state.
Accepts an action and returns a tuple (observation, reward, done, info).
- Parameters
action (object) – an action provided by the agent
- Returns
agent’s observation of the current environment reward (float) : amount of reward returned after previous action done (bool): whether the episode has ended, in which case further step() calls will return undefined results info (dict): contains auxiliary diagnostic information (helpful for debugging, and sometimes learning)
- Return type
observation (object)