Skip to content

Commit

Permalink
Fix Bug in Multiprocess Environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjarne-55 committed Oct 15, 2024
1 parent de95b84 commit 550971f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mushroom_rl/core/multiprocess_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def reset_all(self, env_mask, state=None):
else:
episode_infos.append({})

return self._states, episode_infos
return self._states.copy(), episode_infos.copy()

def step_all(self, env_mask, action):
for i, remote in enumerate(self._remotes):
Expand All @@ -129,7 +129,7 @@ def step_all(self, env_mask, action):
else:
step_infos.append({})

return self._states.copy(), rewards, absorbings, step_infos
return self._states.copy(), rewards.copy(), absorbings.copy(), step_infos.copy()

def render_all(self, env_mask, record=False):
for i, remote in enumerate(self._remotes):
Expand Down

0 comments on commit 550971f

Please sign in to comment.