def WrappedGymCoreEnv(gym_core_id, fps=None, rewarder_observation=False): # Don't need to store the ID on the instance; it'll be retrieved # directly from the spec env = wrap(envs.VNCEnv(fps=fps)) if rewarder_observation: env = GymCoreObservation(env, gym_core_id=gym_core_id) return env
def WrappedGymCoreSyncEnv(gym_core_id, fps=60, rewarder_observation=False): spec = gym.spec(gym_core_id) env = gym_core_sync.GymCoreSync(BlockingReset(wrap(envs.VNCEnv(fps=fps)))) if rewarder_observation: env = GymCoreObservation(env, gym_core_id=gym_core_id) elif spec._entry_point.startswith('gym.envs.atari:'): env = CropAtari(env) return env