Skip to content

Commit

Permalink
Merge pull request #575 from Farama-Foundation/gymnasium-action-parse…
Browse files Browse the repository at this point in the history
…r-fix

 Fix for the bug reported in #574
  • Loading branch information
mwydmuch authored Dec 15, 2023
2 parents 527a934 + 0ebeae1 commit 2a073fc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand Down
2 changes: 1 addition & 1 deletion gym_wrapper/base_gym_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gymnasium_wrapper/base_gymnasium_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2a073fc

Please sign in to comment.