run_world

negmas.tournaments.run_world(world_params, dry_run=False, save_world_stats=True, attempts_path=None, max_attempts=inf, verbose=False)[source]

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

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

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

  • save_world_stats (bool) – 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

Return type:

tuple[str, list[str], WorldRunResults | None, WorldSetRunStats | None, AgentStats | None, AgentStats | None]

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