rlstructures.env_wrappers package¶
OpenAI Gym Wrappers¶
-
class
rlstructures.env_wrappers.gymenv.GymEnv(gym_env=None, seed=None)[source]¶ Bases:
rlstructures.env.VecEnvA wrapper for gym env
-
reset(env_info=<rlstructures.core.DictTensor object>)[source]¶ reset the environments instances
- Parameters
env_info (DictTensor, optional) – a DictTensor of size n_envs, such that each value will be transmitted to each environment instance
-
step(policy_output)[source]¶ Execute one step over alll the running environment instances
- Parameters
policy_output (DictTensor) – the output given by the policy
- Returns
see general description
- Return type
[[DictTensor,torch.Tensor],[DictTensor,torch.Tensor]]
-
-
class
rlstructures.env_wrappers.gymenv.GymEnvInf(gym_env=None, seed=None)[source]¶ Bases:
rlstructures.env.VecEnvA wrapper for gym env that automaitcally reset each stopping instance
-
reset(env_info=<rlstructures.core.DictTensor object>)[source]¶ reset the environments instances
- Parameters
env_info (DictTensor, optional) – a DictTensor of size n_envs, such that each value will be transmitted to each environment instance
-
step(policy_output)[source]¶ Execute one step over alll the running environment instances
- Parameters
policy_output (DictTensor) – the output given by the policy
- Returns
see general description
- Return type
[[DictTensor,torch.Tensor],[DictTensor,torch.Tensor]]
-