From c1dab7e64c959b2b0f63368f67ede85992f7f4fb Mon Sep 17 00:00:00 2001 From: Ivan-267 <61947090+Ivan-267@users.noreply.github.com> Date: Sun, 3 Dec 2023 12:43:41 +0100 Subject: [PATCH] Fix action space order --- godot_rl/core/godot_env.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/godot_rl/core/godot_env.py b/godot_rl/core/godot_env.py index b0901848..2ba887e7 100644 --- a/godot_rl/core/godot_env.py +++ b/godot_rl/core/godot_env.py @@ -12,6 +12,7 @@ from typing import Optional from godot_rl.core.utils import ActionSpaceProcessor, convert_macos_path +from collections import OrderedDict class GodotEnv: MAJOR_VERSION = "0" # Versioning for the environment @@ -319,7 +320,7 @@ def _get_env_info(self): # actions can be "single" for a single action head # or "multi" for several outputeads - action_spaces = {} + action_spaces = OrderedDict() print("action space", json_dict["action_space"]) for k, v in json_dict["action_space"].items(): if v["action_type"] == "discrete":