예제 #1
0
def test_parallel_generated_agents_conversions():
    parallel_api_test(aec_to_parallel(generated_agents_parallel_v0.env()))
    api_test(parallel_to_aec(generated_agents_parallel_v0.parallel_env()))

    env1 = parallel_to_aec(generated_agents_parallel_v0.parallel_env())
    env2 = parallel_to_aec(
        aec_to_parallel(
            parallel_to_aec(generated_agents_parallel_v0.parallel_env())))
    check_environment_deterministic(env1, env2, 500)
예제 #2
0
def test_module(name, env_module):
    _env = env_module.env()
    assert str(_env) == os.path.basename(name)
    api_test(_env)
    if "classic/" not in name:
        parallel_api_test(env_module.parallel_env())

    seed_test(env_module.env, 50)

    if "classic/" not in name:
        max_cycles_test(env_module)

    if ("butterfly/" in name) or ("mpe/" in name) or ("magent/" in name):
        state_test(_env, env_module.parallel_env())

    recreated_env = pickle.loads(pickle.dumps(_env))
    api_test(recreated_env)
예제 #3
0
def test_module(name, env_module):
    _env = env_module.env()
    assert str(_env) == os.path.basename(name)
    api_test(_env)
    if "classic/" not in name:
        parallel_api_test(env_module.parallel_env())

    # seed_test(env_module.env, 50)

    # some atari environments fail this test
    if "atari/" not in name:
        seed_test(env_module.env, 50)

    render_test(env_module.env)

    if "classic/" not in name:
        max_cycles_test(env_module)

    if ("butterfly/" in name) or ("mpe/" in name) or ("magent/" in name):
        state_test(_env, env_module.parallel_env())
def test_pettingzoo_parallel_api_gen(env):
    parallel_test.parallel_api_test(env, num_cycles=50)
def test_pettingzoo_parallel_env():
    _env = simple_world_comm_v2.parallel_env()
    wrapped_env = pad_action_space_v0(_env)
    parallel_test.parallel_api_test(wrapped_env)
def test_pettingzoo_parallel_api(env):
    parallel_test.parallel_api_test(env)
예제 #7
0
def test_generated_agents_parallel():
    parallel_api_test(generated_agents_parallel_v0.parallel_env())
    api_test(generated_agents_parallel_v0.env())