vpg-CartPole-v1 / wrappers /is_vector_env.py
sgoodfriend's picture
VPG playing CartPole-v1 from https://github.com/sgoodfriend/rl-algo-impls/tree/e8bc541d8b5e67bb4d3f2075282463fb61f5f2c6
9dc837c
raw
history blame
367 Bytes
import gym
from typing import Any
class IsVectorEnv(gym.Wrapper):
"""
Override to set properties to match gym.vector.VectorEnv
"""
def __init__(self, env: Any) -> None:
super().__init__(env)
self.is_vector_env = True
self.single_observation_space = env.observation_space
self.single_action_space = env.action_space