arena/arena.py
def run_many_duels(self,
                       mode,
                       list_of_agents: List[Agent],
                       number_of_games: int,
                       shuffle_agents: bool = True,
                       starting_agent_id = 0,
                       initial_observation = None):

        """Runs many games on a single process.
        :param
        list_of_agents: List of agents to play, they will play in the order given by the list.
        number_of_games: The number of games to play.
        shuffle_agents: If True list of agents (and thus their order in the game will be shuffled after each game).
        starting_agent_id: Id of the agent who starts each game.
        """
        assert number_of_games > 0, 'Number of games must be positive'
        cumulative_results = GameStatisticsDuels(list_of_agents)
        games_ids_to_iterate = tqdm(range(number_of_games)) if USE_TQDM else range(number_of_games)
        for game_id in games_ids_to_iterate:
            if shuffle_agents:
                starting_agent_id = random.choice(range(len(list_of_agents)))
            one_game_results = self.run_one_duel(mode, list_of_agents, starting_agent_id, initial_observation=initial_observation)
            #update results:
            cumulative_results.register(one_game_results)

        cumulative_results.number_of_games = number_of_games
        return cumulative_results
Runs many games on a single process.
        :param
        list_of_agents: List of agents to play, they will play in the order given by the list.
        number_of_games: The number of games to play.
        shuffle_agents: If True list of agents (and thus their order in the game will be shuffled after each game).
        starting_agent_id: Id of the agent who starts each game.
        
Runs many games on a single process.
Runs many games on a single process .
def run_many_duels(self,
                       mode,
                       list_of_agents: List[Agent],
                       number_of_games: int,
                       shuffle_agents: bool = True,
                       starting_agent_id = 0,
                       initial_observation = None):
        assert number_of_games > 0, 'Number of games must be positive'
        cumulative_results = GameStatisticsDuels(list_of_agents)
        games_ids_to_iterate = tqdm(range(number_of_games)) if USE_TQDM else range(number_of_games)
        for game_id in games_ids_to_iterate:
            if shuffle_agents:
                starting_agent_id = random.choice(range(len(list_of_agents)))
            one_game_results = self.run_one_duel(mode, list_of_agents, starting_agent_id, initial_observation=initial_observation)
            cumulative_results.register(one_game_results)
        cumulative_results.number_of_games = number_of_games
        return cumulative_results
def run_many_duels ( self , mode , list_of_agents : List [ Agent ] , number_of_games : int , shuffle_agents : bool = True , starting_agent_id = 0 , initial_observation = None ) : assert number_of_games > 0 , 'Number of games must be positive' cumulative_results = GameStatisticsDuels ( list_of_agents ) games_ids_to_iterate = tqdm ( range ( number_of_games ) ) if USE_TQDM else range ( number_of_games ) for game_id in games_ids_to_iterate : if shuffle_agents : starting_agent_id = random . choice ( range ( len ( list_of_agents ) ) ) one_game_results = self . run_one_duel ( mode , list_of_agents , starting_agent_id , initial_observation = initial_observation ) cumulative_results . register ( one_game_results ) cumulative_results . number_of_games = number_of_games return cumulative_results
Runs many games on a single process.
Runs many games on a single process .
"""Runs many games on a single process.
        :param
        list_of_agents: List of agents to play, they will play in the order given by the list.
        number_of_games: The number of games to play.
        shuffle_agents: If True list of agents (and thus their order in the game will be shuffled after each game).
        starting_agent_id: Id of the agent who starts each game.
        """ #update results:
self
mode
list_of_agents
List[Agent]
List of agents to play, they will play in the order given by the list.
number_of_games: The number of games to play.
shuffle_agents: If True list of agents (and thus their order in the game will be shuffled after each game).
starting_agent_id: Id of the agent who starts each game.
List of agents to play they will play in the order given by the list . number_of_games : The number of games to play . shuffle_agents : If True list of agents ( and thus their order in the game will be shuffled after each game ) . starting_agent_id : Id of the agent who starts each game .
number_of_games
int
shuffle_agents
bool
starting_agent_id
initial_observation