diff --git a/CMakeLists.txt b/CMakeLists.txt index 18f8f55b2..118fc51a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.12) # Project + versions #----------------------------------------------------------------------------------------------------------------------- -project(ViZDoom VERSION 1.2.2) +project(ViZDoom VERSION 1.2.3) set(ViZDoom_VERSION_STR ${ViZDoom_VERSION_MAJOR}.${ViZDoom_VERSION_MINOR}.${ViZDoom_VERSION_PATCH}) set(ViZDoom_VERSION_ID ${ViZDoom_VERSION_MAJOR}${ViZDoom_VERSION_MINOR}${ViZDoom_VERSION_PATCH}) diff --git a/gym_wrapper/base_gym_env.py b/gym_wrapper/base_gym_env.py index 79df9ff4b..bf3c32f71 100644 --- a/gym_wrapper/base_gym_env.py +++ b/gym_wrapper/base_gym_env.py @@ -138,7 +138,7 @@ def __parse_binary_buttons(self, env_action, agent_action): if self.num_delta_buttons != 0: agent_action = agent_action["binary"] - if isinstance(agent_action, int): + if np.issubdtype(type(agent_action), np.integer): agent_action = self.button_map[agent_action] # binary actions offset by number of delta buttons diff --git a/gymnasium_wrapper/base_gymnasium_env.py b/gymnasium_wrapper/base_gymnasium_env.py index 3bdd82876..d0d2031fc 100644 --- a/gymnasium_wrapper/base_gymnasium_env.py +++ b/gymnasium_wrapper/base_gymnasium_env.py @@ -142,7 +142,7 @@ def __parse_binary_buttons(self, env_action, agent_action): if self.num_delta_buttons != 0: agent_action = agent_action["binary"] - if isinstance(agent_action, int): + if np.issubdtype(type(agent_action), np.integer): agent_action = self.button_map[agent_action] # binary actions offset by number of delta buttons