Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def step(self, action):

def reset(self):
obs = self._env.reset()
obs = {k: self._convert(v) for k, v in obs.items()}
transition = obs.copy()
transition['action'] = np.zeros(self._env.action_space.shape)
transition['reward'] = 0.0
Expand Down Expand Up @@ -343,7 +344,7 @@ def __getattr__(self, name):
def observation_space(self):
spaces = self._env.observation_space.spaces
assert 'reward' not in spaces
spaces['reward'] = gym.spaces.Box(-np.inf, np.inf, dtype=np.float32)
spaces['reward'] = gym.spaces.Box(-np.inf, np.inf, (), dtype=np.float32)
return gym.spaces.Dict(spaces)

def step(self, action):
Expand Down