def env_maker(environment_id, seed, serial_id, monitor=False, allow_early_resets=False, normalize_observations=False,
              normalize_returns=False, normalize_gamma=0.99):
    """ Create a relatively raw atari environment """
    env = gym.make(environment_id)
    env.seed(seed + serial_id)

    # Monitoring the env
    if monitor:
        logdir = logger.get_dir() and os.path.join(logger.get_dir(), str(serial_id))
    else:
        logdir = None

    env = Monitor(env, logdir, allow_early_resets=allow_early_resets)

    if normalize_observations or normalize_returns:
        env = EnvNormalize(
            env,
            normalize_observations=normalize_observations,
            normalize_returns=normalize_returns,
            gamma=normalize_gamma
        )

    return env
def env_maker ( environment_id , seed , serial_id , monitor = False , allow_early_resets = False , normalize_observations = False , normalize_returns = False , normalize_gamma = 0.99 ) : env = gym . make ( environment_id ) env . seed ( seed + serial_id ) if monitor : logdir = logger . get_dir ( ) and os . path . join ( logger . get_dir ( ) , str ( serial_id ) ) else : logdir = None env = Monitor ( env , logdir , allow_early_resets = allow_early_resets ) if normalize_observations or normalize_returns : env = EnvNormalize ( env , normalize_observations = normalize_observations , normalize_returns = normalize_returns , gamma = normalize_gamma ) return env
Create a relatively raw atari environment