def wrapped_env_maker(environment_id, seed, serial_id, disable_reward_clipping=False, disable_episodic_life=False,<EOL>monitor=False, allow_early_resets=False, scale_float_frames=False,<EOL>max_episode_frames=<NUM_LIT>, frame_stack=None):
env = env_maker(environment_id)<EOL>env.seed(seed + serial_id)<EOL>if max_episode_frames is not None:<EOL><INDENT>env = ClipEpisodeLengthWrapper(env, max_episode_length=max_episode_frames)<EOL><DEDENT>if monitor:<EOL><INDENT>logdir = logger.get_dir() and os.path.join(logger.get_dir(), str(serial_id))<EOL><DEDENT>else:<EOL><INDENT>logdir = None<EOL><DEDENT>env = Monitor(env, logdir, allow_early_resets=allow_early_resets)<EOL>if not disable_episodic_life:<EOL><INDENT>env = EpisodicLifeEnv(env)<EOL><DEDENT>if '<STR_LIT>' in env.unwrapped.get_action_meanings():<EOL><INDENT>if disable_episodic_life:<EOL><INDENT>env = FireEpisodicLifeEnv(env)<EOL><DEDENT>else:<EOL><INDENT>env = FireResetEnv(env)<EOL><DEDENT><DEDENT>env = WarpFrame(env)<EOL>if scale_float_frames:<EOL><INDENT>env = ScaledFloatFrame(env)<EOL><DEDENT>if not disable_reward_clipping:<EOL><INDENT>env = ClipRewardEnv(env)<EOL><DEDENT>if frame_stack is not None:<EOL><INDENT>env = FrameStack(env, frame_stack)<EOL><DEDENT>return env<EOL>
Wrap atari environment so that it's nicer to learn RL algorithms