(agents, battle_info)
Tell the servers to pull and start the given containers.
Tell the servers to pull and start the given containers.
Tell the servers to pull and start the given containers .
def notify_containers(agents, battle_info):
    """Tell the servers to pull and start the given containers."""
    for agent in enumerate(agents):
        if pommerman.helpers.use_game_servers:
            server = pommerman.helpers.game_servers[agent['agent_id']]
        else:
            server = "http://localhost"

        port = "8000"
        url = ':'.join([server, port])
        request_url = url + "/start_container"
        # This includes the aid, the docker_image, and the agent_id
        request_json = agent.copy()
        request_json["access"] = os.getenv('PLAYGROUND_GAME_MANAGER_ACCESS')
        request_json["battle_info"] = battle_info
        request_json["url"] = url
        requests.post(request_url, json=request_json)
def notify_containers ( agents , battle_info ) : for agent in enumerate ( agents ) : if pommerman . helpers . use_game_servers : server = pommerman . helpers . game_servers [ agent [ 'agent_id' ] ] else : server = "http://localhost" port = "8000" url = ':' . join ( [ server , port ] ) request_url = url + "/start_container" # This includes the aid, the docker_image, and the agent_id request_json = agent . copy ( ) request_json [ "access" ] = os . getenv ( 'PLAYGROUND_GAME_MANAGER_ACCESS' ) request_json [ "battle_info" ] = battle_info request_json [ "url" ] = url requests . post ( request_url , json = request_json )