run_world

negmas.tournaments.run_world(world_params: dict, dry_run: bool = False, save_world_stats: bool = True, attempts_path=None, max_attempts=inf, verbose=False)Tuple[str, List[str], Optional[negmas.tournaments.WorldRunResults], Optional[negmas.tournaments.tournaments.WorldSetRunStats], Optional[negmas.tournaments.tournaments.AgentStats], Optional[negmas.tournaments.tournaments.AgentStats]][source]

Runs a world and returns stats. This function is designed to be used with distributed systems like dask.

Parameters
  • world_params – World info dict. See remarks for its parameters

  • dry_run – If true, the world will not be run. Only configs will be saved

  • save_world_stats – If true, saves individual world stats

  • attempts_path – The folder containing attempts information

  • max_attempts – The maximum number of trials to run a world simulation

Remarks:

The world_params dict should have the following members:

  • name: world name [Defaults to random]

  • log_file_name: file name to store the world log [Defaults to random]

  • __dir_name: directory to store the world stats [Defaults to random]

  • __world_generator: full name of the world generator function (including its module) [Required]

  • __score_calculator: full name of the score calculator function [Required]

  • __tournament_name: name of the tournament [Defaults to random]

  • others: values of all other keys are passed to the world generator as kwargs