From 00f11117f6c664b168dfa8fcd3dcd2a7059a2022 Mon Sep 17 00:00:00 2001 From: AndamAmine <49843367+AmineAndam04@users.noreply.github.com> Date: Sun, 18 Aug 2024 16:43:58 +0100 Subject: [PATCH 1/2] Update unity_pettingzoo_base_env.py --- ml-agents-envs/mlagents_envs/envs/unity_pettingzoo_base_env.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml-agents-envs/mlagents_envs/envs/unity_pettingzoo_base_env.py b/ml-agents-envs/mlagents_envs/envs/unity_pettingzoo_base_env.py index 3457f18c88..6899ee860b 100644 --- a/ml-agents-envs/mlagents_envs/envs/unity_pettingzoo_base_env.py +++ b/ml-agents-envs/mlagents_envs/envs/unity_pettingzoo_base_env.py @@ -132,7 +132,7 @@ def _update_action_spaces(self) -> None: continue if act_spec.continuous_size > 0: c_space = spaces.Box( - -1, 1, (act_spec.continuous_size,), dtype=np.int32 + -np.float32(np.inf), np.float32(np.inf), (act_spec.continuous_size,), dtype=np.float32 ) if self._seed is not None: c_space.seed(self._seed) From 60187c57987bb8ee769e0c4c7af45e3f1c3f722d Mon Sep 17 00:00:00 2001 From: AndamAmine <49843367+AmineAndam04@users.noreply.github.com> Date: Sun, 18 Aug 2024 17:13:29 +0100 Subject: [PATCH 2/2] Update unity_pettingzoo_base_env.py --- ml-agents-envs/mlagents_envs/envs/unity_pettingzoo_base_env.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ml-agents-envs/mlagents_envs/envs/unity_pettingzoo_base_env.py b/ml-agents-envs/mlagents_envs/envs/unity_pettingzoo_base_env.py index 6899ee860b..64f8e9d54a 100644 --- a/ml-agents-envs/mlagents_envs/envs/unity_pettingzoo_base_env.py +++ b/ml-agents-envs/mlagents_envs/envs/unity_pettingzoo_base_env.py @@ -168,7 +168,7 @@ def _process_action(self, current_agent, action): if action.continuous is not None: self._current_action[current_behavior].continuous[ current_index - ] = action.continuous[0] + ] = action.continuous if action.discrete is not None: self._current_action[current_behavior].discrete[ current_index