Skip to content

Commit

Permalink
Issue openai#243 - Invalid action space for DoomDeathmatch-v0 (openai…
Browse files Browse the repository at this point in the history
  • Loading branch information
ppaquette authored and jietang committed Jul 19, 2016
1 parent 4be4b15 commit 466da84
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gym/envs/doom/assets/deathmatch.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ episode_start_time = 0
episode_timeout = 6300

# Available buttons
# Currently disabled: [33] - DROP_SELECTED_WEAPON
available_buttons =
{
ATTACK
Expand Down Expand Up @@ -57,7 +58,6 @@ available_buttons =

SELECT_NEXT_WEAPON
SELECT_PREV_WEAPON
DROP_SELECTED_WEAPON

ACTIVATE_SELECTED_WEAPON
SELECT_NEXT_ITEM
Expand Down
3 changes: 3 additions & 0 deletions gym/envs/doom/doom_deathmatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class DoomDeathmatchEnv(doom_env.DoomEnv):
[...]
actions[42] = 0 # MOVE_UP_DOWN_DELTA
A full list of possible actions is available in controls.md
Note:
actions[33] (DROP_SELECTED_WEAPON) is currently disabled, because it causes VizDoom to crash
-----------------------------------------------------
"""
def __init__(self):
Expand Down
2 changes: 1 addition & 1 deletion gym/envs/doom/doom_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
['my_way_home.cfg', 'my_way_home.wad', '', 5, [13, 14, 15], -0.22, 0.5], # 5 - MyWayHome
['predict_position.cfg', 'predict_position.wad', 'map01', 3, [0, 14, 15], -0.075, 0.5], # 6 - PredictPosition
['take_cover.cfg', 'take_cover.wad', 'map01', 5, [10, 11], 0, 750], # 7 - TakeCover
['deathmatch.cfg', 'deathmatch.wad', '', 5, list(range(NUM_ACTIONS)), 0, 20] # 8 - Deathmatch
['deathmatch.cfg', 'deathmatch.wad', '', 5, [x for x in range(NUM_ACTIONS) if x != 33], 0, 20] # 8 - Deathmatch
]


Expand Down

0 comments on commit 466da84

Please sign in to comment.