env v0.13

This commit is contained in:
张德祥
2023-06-14 20:22:17 +08:00
parent b9120a7440
commit 1cf0149c10
4 changed files with 10 additions and 8 deletions

View File

@@ -11,12 +11,14 @@ import numpy as np
class MZGymWrapper:
def __init__(self, env, obs_key='image', act_key='action'):
def __init__(self, env, obs_key='image', act_key='action', size=(64, 64)):
self._env = env
self._obs_is_dict = hasattr(self._env.observation_space, 'spaces')
self._act_is_dict = hasattr(self._env.action_space, 'spaces')
self._obs_key = obs_key
self._act_key = act_key
self._size = size
self._gray = False
def __getattr__(self, name):
if name.startswith('__'):