def wrap_deepmind(env,
                  episode_life=True,
                  clip_rewards=True,
                  lazy_frame=False,
                  scale=False):
    """Configure environment for DeepMind-style Atari.
    """
    env = NoopResetEnv(env, noop_max=30)
    env = MaxAndSkipEnv(env, skip=4)
    if episode_life:
        env = EpisodicLifeEnv(env)
    if 'FIRE' in env.unwrapped.get_action_meanings():
        env = FireResetEnv(env)
    env = WarpFrame(env)
    if scale:
        env = ScaledFloatFrame(env)
    if clip_rewards:
        env = ClipRewardEnv(env)
    env = FrameStack(env, 4, lazy=lazy_frame)
    return env
Configure environment for DeepMind-style Atari.
    
surreal/env/atari_wrappers.py