Skip to content

Commit

Permalink
bugfix/fire-wrapper: Only apply the Atari FireReset wrapper to suppor…
Browse files Browse the repository at this point in the history
…ted games. (#168)

This is akin to [this check](https://github.com/openai/baselines/blob/7c520852d9cf4eaaad326a3d548efc915dc60c10/baselines/common/atari_wrappers.py#L280) in the baselines repo.

The following Atari environments do not have a FIRE action and now work:
KungFuMaster, Freeway, Skiing, Tutankham, JourneyEscape, MsPacman, and Asterix.
  • Loading branch information
andrewsmike committed Sep 28, 2020
1 parent 90dd2db commit dffe5b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion all/environments/atari.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ def __init__(self, name, *args, **kwargs):
# apply a subset of wrappers
env = NoopResetEnv(env, noop_max=30)
env = MaxAndSkipEnv(env)
env = FireResetEnv(env)
if "FIRE" in env.unwrapped.get_action_meanings():
env = FireResetEnv(env)
env = WarpFrame(env)
env = LifeLostEnv(env)
# initialize
Expand Down

0 comments on commit dffe5b7

Please sign in to comment.