def make_env(test):
    env = gym.make(args.env)
    assert isinstance(env, gym.wrappers.TimeLimit)
    env = env.env
    env_seed = ((((2 ** 32) - 1) - args.seed) if test else args.seed)
    env.seed(env_seed)
    env = pfrl.wrappers.CastObservationToFloat32(env)
    if args.monitor:
        env = pfrl.wrappers.Monitor(env, args.outdir)
    if (args.render and (not test)):
        env = pfrl.wrappers.Render(env)
    return env
def make_env(test):
    env = gym.make(args.env)
    assert isinstance(env, gym.wrappers.TimeLimit)
    env = env.env
    env_seed = ((((2 ** 32) - 1) - args.seed) if test else args.seed)
    env.seed(env_seed)
    env = pfrl.wrappers.CastObservationToFloat32(env)
    if args.monitor:
        env = pfrl.wrappers.Monitor(env, args.outdir)
    if (args.render and (not test)):
        env = pfrl.wrappers.Render(env)
    return env