Skip to content

Instantly share code, notes, and snippets.

@roclark
Created December 20, 2020 23:08
Show Gist options
  • Save roclark/d7391d662385185ea6de062064fcfac1 to your computer and use it in GitHub Desktop.
Save roclark/d7391d662385185ea6de062064fcfac1 to your computer and use it in GitHub Desktop.
def env_creator(env_name, config, dim, framestack):
env = gym_super_mario_bros.make(env_name)
env = CustomReward(env)
env = JoypadSpace(env, SIMPLE_MOVEMENT)
env = MonitorEnv(env)
env = NoopResetEnv(env, noop_max=30)
env = EpisodicLifeEnv(env)
env = WarpFrame(env, dim)
if framestack:
env = FrameStack(env, framestack)
return env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment