コード例 #1
0
def process(layers, case_number, steps, envs, verbose):
    name = f"c3a_A2C_{str(layers).replace(' ', '')}_{case_number}"
    print(f"Case: {name}")
    env = make_vec_env('PerigeeRaising-Continuous3D-v0',
                       n_envs=envs,
                       wrapper_class=lambda x: wrap(x))
    agent = create_agent(env, name, case_number, layers, verbose)
    print(f"  --> Training...")
    train_agent(agent, name, steps=steps, callbacks=[])
    print(f"  --> Testing...")
    test_agent(agent)
コード例 #2
0
def get_env(case_number=None):
    env = gym.make('PerigeeRaising-Continuous3D-v0')
    env.seed(case_number)
    return wrap(env)
コード例 #3
0
def get_env(case_number):
    env = wrap(gym.make('PerigeeRaising-Continuous3D-v0'))
    env.seed(case_number)
    return env