(config_id, agent_list, game_state_file=None, render_mode='human')
return env
Makes the pommerman env and registers it with gym
Makes the pommerman env and registers it with gym
Makes the pommerman env and registers it with gym
def make(config_id, agent_list, game_state_file=None, render_mode='human'):
    '''Makes the pommerman env and registers it with gym'''
    assert config_id in REGISTRY, "Unknown configuration '{}'. " \
        "Possible values: {}".format(config_id, REGISTRY)
    env = gym.make(config_id)

    for id_, agent in enumerate(agent_list):
        assert isinstance(agent, agents.BaseAgent)
        # NOTE: This is IMPORTANT so that the agent character is initialized
        agent.init_agent(id_, env.spec._kwargs['game_type'])

    env.set_agents(agent_list)
    env.set_init_game_state(game_state_file)
    env.set_render_mode(render_mode)
    return env
def make ( config_id , agent_list , game_state_file = None , render_mode = 'human' ) : assert config_id in REGISTRY , "Unknown configuration '{}'. " "Possible values: {}" . format ( config_id , REGISTRY ) env = gym . make ( config_id ) for id_ , agent in enumerate ( agent_list ) : assert isinstance ( agent , agents . BaseAgent ) # NOTE: This is IMPORTANT so that the agent character is initialized agent . init_agent ( id_ , env . spec . _kwargs [ 'game_type' ] ) env . set_agents ( agent_list ) env . set_init_game_state ( game_state_file ) env . set_render_mode ( render_mode ) return env