def make_coinrun_env(config): from coinrun import coinrunenv from coinrun.coinrunenv import init_args_and_threads from coinrun import wrappers cpu_count = 4 init_args_and_threads(cpu_count=cpu_count, rand_seed=49, config=config) env = coinrunenv.make(config) env = wrappers.EpisodeRewardWrapper(env) return env
def make_general_env(num_env, seed=0, use_sub_proc=True): from coinrun import coinrunenv env = coinrunenv.make(Config.GAME_TYPE, num_env) if Config.FRAME_STACK > 1: env = VecFrameStack(env, Config.FRAME_STACK) epsilon = Config.EPSILON_GREEDY if epsilon > 0: env = wrappers.EpsilonGreedyWrapper(env, epsilon) return env