From 550971f2fde3bc2d5b32309b99a2a8d72bf094c9 Mon Sep 17 00:00:00 2001 From: Bjarne-55 Date: Wed, 9 Oct 2024 00:38:52 +0200 Subject: [PATCH] Fix Bug in Multiprocess Environment --- mushroom_rl/core/multiprocess_environment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mushroom_rl/core/multiprocess_environment.py b/mushroom_rl/core/multiprocess_environment.py index b8593d8b..ce7633a9 100644 --- a/mushroom_rl/core/multiprocess_environment.py +++ b/mushroom_rl/core/multiprocess_environment.py @@ -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): @@ -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):