scml.utils

Module Contents

Functions

anac_config_generator_oneshot(*args, **kwargs)

anac_config_generator_std_new(*args, **kwargs)

anac_config_generator_collusion(→ list[dict[str, Any]])

anac_assigner_std(, params, Any]] | None =, ...)

anac_assigner_collusion(, params, Any]] | None =, ...)

anac_world_generator(*, year, **kwargs)

anac_oneshot_world_generator(*, year, **kwargs)

balance_calculator(→ negmas.tournaments.WorldRunResults)

A scoring function that scores factory managers' performance by the final balance only ignoring whatever still

balance_calculator_oneshot(...)

A scoring function that scores factory managers' performance by the final balance only ignoring whatever still

anac2020_tournament(...)

The function used to run ANAC 2020 SCML tournament (collusion track).

anac2020_std(...)

The function used to run ANAC 2020 SCML tournament (standard track).

anac2020_collusion(...)

The function used to run ANAC 2020 SCML tournament (collusion track).

anac2021_std(...)

The function used to run ANAC 2021 SCML tournament (standard track).

anac2021_collusion(...)

The function used to run ANAC 2021 SCML tournament (collusion track).

anac2021_oneshot(...)

The function used to run ANAC 2021 SCML tournament (oneshot track).

anac2022_std(...)

The function used to run ANAC 2022 SCML tournament (standard track).

anac2022_collusion(...)

The function used to run ANAC 2022 SCML tournament (collusion track).

anac2022_oneshot(...)

The function used to run ANAC 2022 SCML tournament (oneshot track).

anac2023_collusion(...)

The function used to run ANAC 2023 SCML tournament (collusion track).

anac2023_std(...)

The function used to run ANAC 2023 SCML tournament (standard track).

anac2023_oneshot(...)

The function used to run ANAC 2023 SCML tournament (oneshot track).

anac2024_oneshot(...)

The function used to run ANAC 2024 SCML tournament (oneshot track).

anac2024_std(...)

The function used to run ANAC 2024 SCML tournament (std track).

Attributes

DefaultAgentsOneShot

DefaultAgentsStd

DefaultAgents

DefaultAgents2021

DefaultAgents2022

DefaultAgents2023

anac_config_generator_std_old

anac_assigner_oneshot

scml.utils.DefaultAgentsOneShot = ()[source]
scml.utils.DefaultAgentsStd = ()[source]
scml.utils.DefaultAgents: tuple[type[scml.scml2020.world.SCML2020Agent], Ellipsis] = ()[source]
scml.utils.DefaultAgents2021 = ()[source]
scml.utils.DefaultAgents2022 = ()[source]
scml.utils.DefaultAgents2023 = ()[source]
scml.utils.anac_config_generator_std_old[source]
scml.utils.anac_config_generator_oneshot(*args, **kwargs)[source]
scml.utils.anac_config_generator_std_new(*args, **kwargs)[source]
scml.utils.anac_config_generator_collusion(year: int, n_competitors: int, n_agents_per_competitor: int, agent_names_reveal_type: bool = False, non_competitors: tuple[str | type[scml.scml2020.world.SCML2020Agent], Ellipsis] | None = None, non_competitor_params: tuple[dict[str, Any], Ellipsis] | None = None, *args, **kwargs) list[dict[str, Any]][source]
scml.utils.anac_assigner_std(config: list[dict[str, Any]], max_n_worlds: int, n_agents_per_competitor: int = 1, fair: bool = True, competitors: Sequence[str | type[scml.oneshot.agent.OneShotAgent] | type[negmas.Agent]] = (), params: Sequence[dict[str, Any]] | None = (), dynamic_non_competitors: Sequence[str | type[negmas.Agent]] | None = None, dynamic_non_competitor_params: list[dict[str, Any]] | None = None, exclude_competitors_from_reassignment: bool = True) list[list[dict[str, Any]]][source]
scml.utils.anac_assigner_oneshot[source]
scml.utils.anac_assigner_collusion(config: list[dict[str, Any]], max_n_worlds: int, n_agents_per_competitor: int = 1, fair: bool = True, competitors: Sequence[type[negmas.Agent] | str] = (), params: Sequence[dict[str, Any]] | None = (), dynamic_non_competitors: list[type[negmas.Agent] | str] | None = None, dynamic_non_competitor_params: list[dict[str, Any]] | None = None, exclude_competitors_from_reassignment: bool = True) list[list[dict[str, Any]]][source]
scml.utils.anac_world_generator(*, year: int, **kwargs)[source]
scml.utils.anac_oneshot_world_generator(*, year, **kwargs)[source]
scml.utils.balance_calculator(worlds: list[scml.scml2020.world.SCML2020World], scoring_context: dict[str, Any], dry_run: bool, ignore_default=True, inventory_catalog_price_weight=0.0, inventory_trading_average_weight=0.5, consolidated=False) negmas.tournaments.WorldRunResults[source]

A scoring function that scores factory managers’ performance by the final balance only ignoring whatever still in their inventory.

Parameters:
  • worlds – The world which is assumed to be run up to the point at which the scores are to be calculated.

  • scoring_context – A dict of context parameters passed by the world generator or assigner.

  • dry_run – A boolean specifying whether this is a dry_run. For dry runs, only names and types are expected in the returned WorldRunResults

  • ignore_default – Whether to ignore non-competitors (default agents)

  • inventory_catalog_price_weight – The weight assigned to catalog price

  • inventory_trading_average_weight – The weight assigned to trading price average

  • consolidated – If true, the score of an agent type will be based on a consolidated statement of all the factories it controlled

Returns:

WorldRunResults giving the names, scores, and types of factory managers.

scml.utils.balance_calculator_oneshot(worlds: list[scml.oneshot.world.OneShotWorld], scoring_context: dict[str, Any], dry_run: bool, ignore_default=True, consolidated=True, **kwargs) negmas.tournaments.WorldRunResults[source]

A scoring function that scores factory managers’ performance by the final balance only ignoring whatever still in their inventory.

Parameters:
  • worlds – The world which is assumed to be run up to the point at which the scores are to be calculated.

  • scoring_context – A dict of context parameters passed by the world generator or assigner.

  • dry_run – A boolean specifying whether this is a dry_run. For dry runs, only names and types are expected in the returned WorldRunResults

  • ignore_default – Whether to ignore non-competitors (default agents)

  • consolidated – If true, the score of an agent type will be based on a consolidated statement of all the factories it controlled

Returns:

WorldRunResults giving the names, scores, and types of factory managers.

scml.utils.anac2020_tournament(competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]], agent_names_reveal_type=False, n_configs: int = 5, max_worlds_per_config: int | None = None, n_runs_per_world: int = 2, n_agents_per_competitor: int = 3, min_factories_per_level: int = 2, tournament_path: str | pathlib.Path | None = None, total_timeout: int | None = None, parallelism='parallel', scheduler_ip: str | None = None, scheduler_port: str | None = None, tournament_progress_callback: Callable[[negmas.tournaments.WorldRunResults | None], None] | None = None, world_progress_callback: Callable[[scml.scml2020.world.SCML2020World | None], None] | None = None, name: str | None = None, verbose: bool = False, configs_only=False, compact=False, **kwargs) negmas.tournaments.TournamentResults | os.PathLike[source]

The function used to run ANAC 2020 SCML tournament (collusion track).

Parameters:
  • name – Tournament name

  • competitors – A list of class names for the competitors

  • agent_names_reveal_type – If true then the type of an agent should be readable in its name (most likely at its beginning).

  • n_configs – The number of different world configs (up to competitor assignment) to be generated.

  • max_worlds_per_config – The maximum number of worlds to run per config. If None, then all possible assignments of competitors within each config will be tried (by rotating agents over factories).

  • n_runs_per_world – Number of runs per world. All of these world runs will have identical competitor assignment and identical world configuration.

  • n_agents_per_competitor – Number of agents per competitor

  • min_factories_per_level – Minimum number of factories for each production level

  • total_timeout – Total timeout for the complete process

  • tournament_path – Path at which to store all results. A scores.csv file will keep the scores and logs folder will keep detailed logs

  • parallelism – Type of parallelism. Can be ‘serial’ for serial, ‘parallel’ for parallel and ‘distributed’ for distributed

  • scheduler_port – Port of the dask scheduler if parallelism is dask, dist, or distributed

  • scheduler_ip – IP Address of the dask scheduler if parallelism is dask, dist, or distributed

  • world_progress_callback – A function to be called after everystep of every world run (only allowed for serial evaluation and should be used with cautious).

  • tournament_progress_callback – A function to be called with WorldRunResults after each world finished processing

  • verbose – Verbosity

  • configs_only – If true, a config file for each

  • compact – If true, effort will be made to reduce memory footprint including disableing most logs

  • kwargs – Arguments to pass to the world_generator function

Returns:

TournamentResults The results of the tournament or a PathLike giving the location where configs were saved

Remarks:

Default parameters will be used in the league with the exception of parallelism which may use distributed processing

scml.utils.anac2020_std(competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]], competitor_params: Sequence[dict[str, Any]] | None = None, agent_names_reveal_type=False, n_configs: int = 5, max_worlds_per_config: int | None = None, n_runs_per_world: int = 1, min_factories_per_level: int = 2, tournament_path: str | pathlib.Path | None = None, total_timeout: int | None = None, parallelism='parallel', scheduler_ip: str | None = None, scheduler_port: str | None = None, tournament_progress_callback: Callable[[negmas.tournaments.WorldRunResults | None], None] | None = None, world_progress_callback: Callable[[scml.scml2020.world.SCML2020World | None], None] | None = None, non_competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]] | None = None, non_competitor_params: Sequence[dict[str, Any]] | None = None, dynamic_non_competitors: list[type[negmas.Agent]] | None = None, dynamic_non_competitor_params: list[dict[str, Any]] | None = None, exclude_competitors_from_reassignment: bool = True, name: str | None = None, verbose: bool = False, configs_only=False, compact=False, n_competitors_per_world=None, forced_logs_fraction: float = FORCED_LOGS_FRACTION, **kwargs) negmas.tournaments.TournamentResults | os.PathLike[source]

The function used to run ANAC 2020 SCML tournament (standard track).

Parameters:
  • name – Tournament name

  • competitors – A list of class names for the competitors

  • competitor_params – A list of competitor parameters (used to initialize the competitors).

  • agent_names_reveal_type – If true then the type of an agent should be readable in its name (most likely at its beginning).

  • n_configs – The number of different world configs (up to competitor assignment) to be generated.

  • max_worlds_per_config – The maximum number of worlds to run per config. If None, then all possible assignments of competitors within each config will be tried (all permutations).

  • n_runs_per_world – Number of runs per world. All of these world runs will have identical competitor assignment and identical world configuration.

  • min_factories_per_level – Minimum number of factories for each production level

  • total_timeout – Total timeout for the complete process

  • tournament_path – Path at which to store all results. A scores.csv file will keep the scores and logs folder will keep detailed logs

  • parallelism – Type of parallelism. Can be ‘serial’ for serial, ‘parallel’ for parallel and ‘distributed’ for distributed

  • scheduler_port – Port of the dask scheduler if parallelism is dask, dist, or distributed

  • scheduler_ip – IP Address of the dask scheduler if parallelism is dask, dist, or distributed

  • world_progress_callback – A function to be called after everystep of every world run (only allowed for serial evaluation and should be used with cautious).

  • tournament_progress_callback – A function to be called with WorldRunResults after each world finished processing

  • non_competitors – A list of agent types that will not be competing in the sabotage competition but will exist in the world

  • non_competitor_params – parameters of non competitor agents

  • dynamic_non_competitors – A list of non-competing agents that are assigned to the simulation dynamically during the creation of the final assignment instead when the configuration is created

  • dynamic_non_competitor_params – paramters of dynamic non competitor agents

  • exclude_competitors_from_reassignment – If true, competitors are excluded from the dynamic non-competitors

  • verbose – Verbosity

  • configs_only – If true, a config file for each

  • compact – If true, compact logs will be created and effort will be made to reduce the memory footprint

  • n_competitors_per_world – Number of competitors in every simulation. If not given it will be a random number between 2 and min(2, n), where n is the number of competitors

  • forced_logs_fraction – Fraction of simulations for which logs are always saved (including negotiations)

  • kwargs – Arguments to pass to the world_generator function

Returns:

TournamentResults The results of the tournament or a PathLike giving the location where configs were saved

Remarks:

Default parameters will be used in the league with the exception of parallelism which may use distributed processing

scml.utils.anac2020_collusion(competitors: Sequence[str | type], competitor_params: Sequence[dict[str, Any]] | None = None, agent_names_reveal_type=False, n_configs: int = 5, max_worlds_per_config: int | None = None, n_runs_per_world: int = 1, n_agents_per_competitor: int = 3, min_factories_per_level: int = 2, tournament_path: str | pathlib.Path | None = None, total_timeout: int | None = None, parallelism='parallel', scheduler_ip: str | None = None, scheduler_port: str | None = None, tournament_progress_callback: Callable[[negmas.tournaments.WorldRunResults | None], None] | None = None, world_progress_callback: Callable[[scml.scml2020.world.SCML2020World | None], None] | None = None, non_competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]] | None = None, non_competitor_params: Sequence[dict[str, Any]] | None = None, dynamic_non_competitors: list[type[negmas.Agent]] | None = None, dynamic_non_competitor_params: list[dict[str, Any]] | None = None, exclude_competitors_from_reassignment: bool = True, name: str | None = None, verbose: bool = False, configs_only=False, compact=False, n_competitors_per_world=None, forced_logs_fraction: float = FORCED_LOGS_FRACTION, **kwargs) negmas.tournaments.TournamentResults | os.PathLike[source]

The function used to run ANAC 2020 SCML tournament (collusion track).

Parameters:
  • name – Tournament name

  • competitors – A list of class names for the competitors

  • competitor_params – A list of competitor parameters (used to initialize the competitors).

  • agent_names_reveal_type – If true then the type of an agent should be readable in its name (most likely at its beginning).

  • n_configs – The number of different world configs (up to competitor assignment) to be generated.

  • max_worlds_per_config – The maximum number of worlds to run per config. If None, then all possible assignments of competitors within each config will be tried (all permutations).

  • n_runs_per_world – Number of runs per world. All of these world runs will have identical competitor assignment and identical world configuration.

  • n_agents_per_competitor – Number of agents per competitor

  • min_factories_per_level – Minimum number of factories for each production level

  • total_timeout – Total timeout for the complete process

  • tournament_path – Path at which to store all results. A scores.csv file will keep the scores and logs folder will keep detailed logs

  • parallelism – Type of parallelism. Can be ‘serial’ for serial, ‘parallel’ for parallel and ‘distributed’ for distributed

  • scheduler_port – Port of the dask scheduler if parallelism is dask, dist, or distributed

  • scheduler_ip – IP Address of the dask scheduler if parallelism is dask, dist, or distributed

  • world_progress_callback – A function to be called after everystep of every world run (only allowed for serial evaluation and should be used with cautious).

  • tournament_progress_callback – A function to be called with WorldRunResults after each world finished processing

  • non_competitors – A list of agent types that will not be competing in the sabotage competition but will exist in the world

  • non_competitor_params – parameters of non competitor agents

  • dynamic_non_competitors – A list of non-competing agents that are assigned to the simulation dynamically during the creation of the final assignment instead when the configuration is created

  • dynamic_non_competitor_params – paramters of dynamic non competitor agents

  • exclude_competitors_from_reassignment – If true, competitors are excluded from the dynamic non-competitors

  • n_competitors_per_world – Number of competitors in every simulation. If not given it will be a random number between 2 and min(2, n), where n is the number of competitors

  • verbose – Verbosity

  • configs_only – If true, a config file for each

  • compact – If true, compact logs will be created and effort will be made to reduce the memory footprint

  • forced_logs_fraction – Fraction of simulations for which logs are always saved (including negotiations)

  • kwargs – Arguments to pass to the world_generator function

Returns:

TournamentResults The results of the tournament or a PathLike giving the location where configs were saved

Remarks:

Default parameters will be used in the league with the exception of parallelism which may use distributed processing

scml.utils.anac2021_std(competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]], competitor_params: Sequence[dict[str, Any]] | None = None, agent_names_reveal_type=False, n_configs: int = 5, max_worlds_per_config: int | None = None, n_runs_per_world: int = 1, min_factories_per_level: int = 2, tournament_path: str | pathlib.Path | None = None, total_timeout: int | None = None, parallelism='parallel', scheduler_ip: str | None = None, scheduler_port: str | None = None, tournament_progress_callback: Callable[[negmas.tournaments.WorldRunResults | None], None] | None = None, world_progress_callback: Callable[[scml.scml2020.world.SCML2020World | None], None] | None = None, non_competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]] | None = None, non_competitor_params: Sequence[dict[str, Any]] | None = None, dynamic_non_competitors: list[type[negmas.Agent]] | None = None, dynamic_non_competitor_params: list[dict[str, Any]] | None = None, exclude_competitors_from_reassignment: bool = True, name: str | None = None, verbose: bool = False, configs_only=False, compact=False, n_competitors_per_world=None, forced_logs_fraction: float = FORCED_LOGS_FRACTION, **kwargs) negmas.tournaments.TournamentResults | os.PathLike[source]

The function used to run ANAC 2021 SCML tournament (standard track).

Parameters:
  • name – Tournament name

  • competitors – A list of class names for the competitors

  • competitor_params – A list of competitor parameters (used to initialize the competitors).

  • agent_names_reveal_type – If true then the type of an agent should be readable in its name (most likely at its beginning).

  • n_configs – The number of different world configs (up to competitor assignment) to be generated.

  • max_worlds_per_config – The maximum number of worlds to run per config. If None, then all possible assignments of competitors within each config will be tried (all permutations).

  • n_runs_per_world – Number of runs per world. All of these world runs will have identical competitor assignment and identical world configuration.

  • min_factories_per_level – Minimum number of factories for each production level

  • total_timeout – Total timeout for the complete process

  • tournament_path – Path at which to store all results. A scores.csv file will keep the scores and logs folder will keep detailed logs

  • parallelism – Type of parallelism. Can be ‘serial’ for serial, ‘parallel’ for parallel and ‘distributed’ for distributed

  • scheduler_port – Port of the dask scheduler if parallelism is dask, dist, or distributed

  • scheduler_ip – IP Address of the dask scheduler if parallelism is dask, dist, or distributed

  • world_progress_callback – A function to be called after everystep of every world run (only allowed for serial evaluation and should be used with cautious).

  • tournament_progress_callback – A function to be called with WorldRunResults after each world finished processing

  • non_competitors – A list of agent types that will not be competing in the sabotage competition but will exist in the world

  • non_competitor_params – parameters of non competitor agents

  • dynamic_non_competitors – A list of non-competing agents that are assigned to the simulation dynamically during the creation of the final assignment instead when the configuration is created

  • dynamic_non_competitor_params – paramters of dynamic non competitor agents

  • exclude_competitors_from_reassignment – If true, competitors are excluded from the dynamic non-competitors

  • verbose – Verbosity

  • configs_only – If true, a config file for each

  • compact – If true, compact logs will be created and effort will be made to reduce the memory footprint

  • n_competitors_per_world – Number of competitors in every simulation. If not given it will be a random number between 2 and min(2, n), where n is the number of competitors

  • forced_logs_fraction – Fraction of simulations for which logs are always saved (including negotiations)

  • kwargs – Arguments to pass to the world_generator function

Returns:

TournamentResults The results of the tournament or a PathLike giving the location where configs were saved

Remarks:

Default parameters will be used in the league with the exception of parallelism which may use distributed processing

scml.utils.anac2021_collusion(competitors: Sequence[str | type], competitor_params: Sequence[dict[str, Any]] | None = None, agent_names_reveal_type=False, n_configs: int = 5, max_worlds_per_config: int | None = None, n_runs_per_world: int = 1, n_agents_per_competitor: int = 3, min_factories_per_level: int = 2, tournament_path: str | pathlib.Path | None = None, total_timeout: int | None = None, parallelism='parallel', scheduler_ip: str | None = None, scheduler_port: str | None = None, tournament_progress_callback: Callable[[negmas.tournaments.WorldRunResults | None], None] | None = None, world_progress_callback: Callable[[scml.scml2020.world.SCML2020World | None], None] | None = None, non_competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]] | None = None, non_competitor_params: Sequence[dict[str, Any]] | None = None, dynamic_non_competitors: list[type[negmas.Agent]] | None = None, dynamic_non_competitor_params: list[dict[str, Any]] | None = None, exclude_competitors_from_reassignment: bool = False, name: str | None = None, verbose: bool = False, configs_only=False, compact=False, n_competitors_per_world=1, forced_logs_fraction: float = FORCED_LOGS_FRACTION, **kwargs) negmas.tournaments.TournamentResults | os.PathLike[source]

The function used to run ANAC 2021 SCML tournament (collusion track).

Parameters:
  • name – Tournament name

  • competitors – A list of class names for the competitors

  • competitor_params – A list of competitor parameters (used to initialize the competitors).

  • agent_names_reveal_type – If true then the type of an agent should be readable in its name (most likely at its beginning).

  • n_configs – The number of different world configs (up to competitor assignment) to be generated.

  • max_worlds_per_config – The maximum number of worlds to run per config. If None, then all possible assignments of competitors within each config will be tried (all permutations).

  • n_runs_per_world – Number of runs per world. All of these world runs will have identical competitor assignment and identical world configuration.

  • n_agents_per_competitor – Number of agents per competitor

  • min_factories_per_level – Minimum number of factories for each production level

  • total_timeout – Total timeout for the complete process

  • tournament_path – Path at which to store all results. A scores.csv file will keep the scores and logs folder will keep detailed logs

  • parallelism – Type of parallelism. Can be ‘serial’ for serial, ‘parallel’ for parallel and ‘distributed’ for distributed

  • scheduler_port – Port of the dask scheduler if parallelism is dask, dist, or distributed

  • scheduler_ip – IP Address of the dask scheduler if parallelism is dask, dist, or distributed

  • world_progress_callback – A function to be called after everystep of every world run (only allowed for serial evaluation and should be used with cautious).

  • tournament_progress_callback – A function to be called with WorldRunResults after each world finished processing

  • non_competitors – A list of agent types that will not be competing in the sabotage competition but will exist in the world

  • non_competitor_params – parameters of non competitor agents

  • dynamic_non_competitors – A list of non-competing agents that are assigned to the simulation dynamically during the creation of the final assignment instead when the configuration is created

  • dynamic_non_competitor_params – paramters of dynamic non competitor agents

  • exclude_competitors_from_reassignment – If true, competitors are excluded from the dynamic non-competitors

  • n_competitors_per_world – Number of competitors in every simulation. If not given it will be a random number between 2 and min(2, n), where n is the number of competitors. This value will always be set to 1 in SCML2021

  • verbose – Verbosity

  • configs_only – If true, a config file for each

  • compact – If true, compact logs will be created and effort will be made to reduce the memory footprint

  • forced_logs_fraction – Fraction of simulations for which logs are always saved (including negotiations)

  • kwargs – Arguments to pass to the world_generator function

Returns:

TournamentResults The results of the tournament or a PathLike giving the location where configs were saved

Remarks:

Default parameters will be used in the league with the exception of parallelism which may use distributed processing

scml.utils.anac2021_oneshot(competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]], competitor_params: Sequence[dict[str, Any]] | None = None, agent_names_reveal_type=False, n_configs: int = 5, max_worlds_per_config: int | None = None, n_runs_per_world: int = 1, min_factories_per_level: int = 4, tournament_path: str | pathlib.Path | None = None, total_timeout: int | None = None, parallelism='parallel', scheduler_ip: str | None = None, scheduler_port: str | None = None, tournament_progress_callback: Callable[[negmas.tournaments.WorldRunResults | None], None] | None = None, world_progress_callback: Callable[[scml.scml2020.world.SCML2020World | None], None] | None = None, non_competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]] | None = None, non_competitor_params: Sequence[dict[str, Any]] | None = None, dynamic_non_competitors: list[type[negmas.Agent]] | None = None, dynamic_non_competitor_params: list[dict[str, Any]] | None = None, exclude_competitors_from_reassignment: bool = False, name: str | None = None, verbose: bool = False, configs_only=False, compact=False, n_competitors_per_world=None, forced_logs_fraction: float = FORCED_LOGS_FRACTION, **kwargs) negmas.tournaments.TournamentResults | os.PathLike[source]

The function used to run ANAC 2021 SCML tournament (oneshot track).

Parameters:
  • name – Tournament name

  • competitors – A list of class names for the competitors

  • competitor_params – A list of competitor parameters (used to initialize the competitors).

  • agent_names_reveal_type – If true then the type of an agent should be readable in its name (most likely at its beginning).

  • n_configs – The number of different world configs (up to competitor assignment) to be generated.

  • max_worlds_per_config – The maximum number of worlds to run per config. If None, then all possible assignments of competitors within each config will be tried (all permutations).

  • n_runs_per_world – Number of runs per world. All of these world runs will have identical competitor assignment and identical world configuration.

  • min_factories_per_level – Minimum number of factories for each production level

  • total_timeout – Total timeout for the complete process

  • tournament_path – Path at which to store all results. A scores.csv file will keep the scores and logs folder will keep detailed logs

  • parallelism – Type of parallelism. Can be ‘serial’ for serial, ‘parallel’ for parallel and ‘distributed’ for distributed

  • scheduler_port – Port of the dask scheduler if parallelism is dask, dist, or distributed

  • scheduler_ip – IP Address of the dask scheduler if parallelism is dask, dist, or distributed

  • world_progress_callback – A function to be called after everystep of every world run (only allowed for serial evaluation and should be used with cautious).

  • tournament_progress_callback – A function to be called with WorldRunResults after each world finished processing

  • non_competitors – A list of agent types that will not be competing in the sabotage competition but will exist in the world

  • non_competitor_params – parameters of non competitor agents

  • dynamic_non_competitors – A list of non-competing agents that are assigned to the simulation dynamically during the creation of the final assignment instead when the configuration is created

  • dynamic_non_competitor_params – paramters of dynamic non competitor agents

  • exclude_competitors_from_reassignment – If true, competitors are excluded from the dynamic non-competitors

  • verbose – Verbosity

  • configs_only – If true, a config file for each

  • compact – If true, compact logs will be created and effort will be made to reduce the memory footprint

  • n_competitors_per_world – Number of competitors in every simulation. If not given it will be a random number between 2 and min(2, n), where n is the number of competitors

  • forced_logs_fraction – Fraction of simulations for which logs are always saved (including negotiations)

  • kwargs – Arguments to pass to the world_generator function

Returns:

TournamentResults The results of the tournament or a PathLike giving the location where configs were saved

Remarks:

Default parameters will be used in the league with the exception of parallelism which may use distributed processing

scml.utils.anac2022_std(competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]], competitor_params: Sequence[dict[str, Any]] | None = None, agent_names_reveal_type=False, n_configs: int = 5, max_worlds_per_config: int | None = None, n_runs_per_world: int = 1, min_factories_per_level: int = 2, tournament_path: str | pathlib.Path | None = None, total_timeout: int | None = None, parallelism='parallel', scheduler_ip: str | None = None, scheduler_port: str | None = None, tournament_progress_callback: Callable[[negmas.tournaments.WorldRunResults | None], None] | None = None, world_progress_callback: Callable[[scml.scml2020.world.SCML2020World | None], None] | None = None, non_competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]] | None = None, non_competitor_params: Sequence[dict[str, Any]] | None = None, dynamic_non_competitors: list[type[negmas.Agent]] | None = None, dynamic_non_competitor_params: list[dict[str, Any]] | None = None, exclude_competitors_from_reassignment: bool = True, name: str | None = None, verbose: bool = False, configs_only=False, compact=False, n_competitors_per_world=None, forced_logs_fraction: float = FORCED_LOGS_FRACTION, **kwargs) negmas.tournaments.TournamentResults | os.PathLike[source]

The function used to run ANAC 2022 SCML tournament (standard track).

Parameters:
  • name – Tournament name

  • competitors – A list of class names for the competitors

  • competitor_params – A list of competitor parameters (used to initialize the competitors).

  • agent_names_reveal_type – If true then the type of an agent should be readable in its name (most likely at its beginning).

  • n_configs – The number of different world configs (up to competitor assignment) to be generated.

  • max_worlds_per_config – The maximum number of worlds to run per config. If None, then all possible assignments of competitors within each config will be tried (all permutations).

  • n_runs_per_world – Number of runs per world. All of these world runs will have identical competitor assignment and identical world configuration.

  • min_factories_per_level – Minimum number of factories for each production level

  • total_timeout – Total timeout for the complete process

  • tournament_path – Path at which to store all results. A scores.csv file will keep the scores and logs folder will keep detailed logs

  • parallelism – Type of parallelism. Can be ‘serial’ for serial, ‘parallel’ for parallel and ‘distributed’ for distributed

  • scheduler_port – Port of the dask scheduler if parallelism is dask, dist, or distributed

  • scheduler_ip – IP Address of the dask scheduler if parallelism is dask, dist, or distributed

  • world_progress_callback – A function to be called after everystep of every world run (only allowed for serial evaluation and should be used with cautious).

  • tournament_progress_callback – A function to be called with WorldRunResults after each world finished processing

  • non_competitors – A list of agent types that will not be competing in the sabotage competition but will exist in the world

  • non_competitor_params – parameters of non competitor agents

  • dynamic_non_competitors – A list of non-competing agents that are assigned to the simulation dynamically during the creation of the final assignment instead when the configuration is created

  • dynamic_non_competitor_params – paramters of dynamic non competitor agents

  • exclude_competitors_from_reassignment – If true, competitors are excluded from the dynamic non-competitors

  • verbose – Verbosity

  • configs_only – If true, a config file for each

  • compact – If true, compact logs will be created and effort will be made to reduce the memory footprint

  • n_competitors_per_world – Number of competitors in every simulation. If not given it will be a random number between 2 and min(2, n), where n is the number of competitors

  • forced_logs_fraction – Fraction of simulations for which logs are always saved (including negotiations)

  • kwargs – Arguments to pass to the world_generator function

Returns:

TournamentResults The results of the tournament or a PathLike giving the location where configs were saved

Remarks:

Default parameters will be used in the league with the exception of parallelism which may use distributed processing

scml.utils.anac2022_collusion(competitors: Sequence[str | type], competitor_params: Sequence[dict[str, Any]] | None = None, agent_names_reveal_type=False, n_configs: int = 5, max_worlds_per_config: int | None = None, n_runs_per_world: int = 1, n_agents_per_competitor: int = 3, min_factories_per_level: int = 2, tournament_path: str | pathlib.Path | None = None, total_timeout: int | None = None, parallelism='parallel', scheduler_ip: str | None = None, scheduler_port: str | None = None, tournament_progress_callback: Callable[[negmas.tournaments.WorldRunResults | None], None] | None = None, world_progress_callback: Callable[[scml.scml2020.world.SCML2020World | None], None] | None = None, non_competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]] | None = None, non_competitor_params: Sequence[dict[str, Any]] | None = None, dynamic_non_competitors: list[type[negmas.Agent]] | None = None, dynamic_non_competitor_params: list[dict[str, Any]] | None = None, exclude_competitors_from_reassignment: bool = False, name: str | None = None, verbose: bool = False, configs_only=False, compact=False, n_competitors_per_world=1, forced_logs_fraction: float = FORCED_LOGS_FRACTION, **kwargs) negmas.tournaments.TournamentResults | os.PathLike[source]

The function used to run ANAC 2022 SCML tournament (collusion track).

Parameters:
  • name – Tournament name

  • competitors – A list of class names for the competitors

  • competitor_params – A list of competitor parameters (used to initialize the competitors).

  • agent_names_reveal_type – If true then the type of an agent should be readable in its name (most likely at its beginning).

  • n_configs – The number of different world configs (up to competitor assignment) to be generated.

  • max_worlds_per_config – The maximum number of worlds to run per config. If None, then all possible assignments of competitors within each config will be tried (all permutations).

  • n_runs_per_world – Number of runs per world. All of these world runs will have identical competitor assignment and identical world configuration.

  • n_agents_per_competitor – Number of agents per competitor

  • min_factories_per_level – Minimum number of factories for each production level

  • total_timeout – Total timeout for the complete process

  • tournament_path – Path at which to store all results. A scores.csv file will keep the scores and logs folder will keep detailed logs

  • parallelism – Type of parallelism. Can be ‘serial’ for serial, ‘parallel’ for parallel and ‘distributed’ for distributed

  • scheduler_port – Port of the dask scheduler if parallelism is dask, dist, or distributed

  • scheduler_ip – IP Address of the dask scheduler if parallelism is dask, dist, or distributed

  • world_progress_callback – A function to be called after everystep of every world run (only allowed for serial evaluation and should be used with cautious).

  • tournament_progress_callback – A function to be called with WorldRunResults after each world finished processing

  • non_competitors – A list of agent types that will not be competing in the sabotage competition but will exist in the world

  • non_competitor_params – parameters of non competitor agents

  • dynamic_non_competitors – A list of non-competing agents that are assigned to the simulation dynamically during the creation of the final assignment instead when the configuration is created

  • dynamic_non_competitor_params – paramters of dynamic non competitor agents

  • exclude_competitors_from_reassignment – If true, competitors are excluded from the dynamic non-competitors

  • n_competitors_per_world – Number of competitors in every simulation. If not given it will be a random number between 2 and min(2, n), where n is the number of competitors. This value will always be set to 1 in SCML2022

  • verbose – Verbosity

  • configs_only – If true, a config file for each

  • compact – If true, compact logs will be created and effort will be made to reduce the memory footprint

  • forced_logs_fraction – Fraction of simulations for which logs are always saved (including negotiations)

  • kwargs – Arguments to pass to the world_generator function

Returns:

TournamentResults The results of the tournament or a PathLike giving the location where configs were saved

Remarks:

Default parameters will be used in the league with the exception of parallelism which may use distributed processing

scml.utils.anac2022_oneshot(competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]], competitor_params: Sequence[dict[str, Any]] | None = None, agent_names_reveal_type=False, n_configs: int = 5, max_worlds_per_config: int | None = None, n_runs_per_world: int = 1, min_factories_per_level: int = 4, tournament_path: str | pathlib.Path | None = None, total_timeout: int | None = None, parallelism='parallel', scheduler_ip: str | None = None, scheduler_port: str | None = None, tournament_progress_callback: Callable[[negmas.tournaments.WorldRunResults | None], None] | None = None, world_progress_callback: Callable[[scml.scml2020.world.SCML2020World | None], None] | None = None, non_competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]] | None = None, non_competitor_params: Sequence[dict[str, Any]] | None = None, dynamic_non_competitors: list[type[negmas.Agent]] | None = None, dynamic_non_competitor_params: list[dict[str, Any]] | None = None, exclude_competitors_from_reassignment: bool = False, name: str | None = None, verbose: bool = False, configs_only=False, compact=False, n_competitors_per_world=None, forced_logs_fraction: float = FORCED_LOGS_FRACTION, **kwargs) negmas.tournaments.TournamentResults | os.PathLike[source]

The function used to run ANAC 2022 SCML tournament (oneshot track).

Args: :returns: TournamentResults The results of the tournament or a PathLike giving the location where configs were saved

Remarks:

Default parameters will be used in the league with the exception of parallelism which may use distributed processing

scml.utils.anac2023_collusion(competitors: Sequence[str | type], competitor_params: Sequence[dict[str, Any]] | None = None, agent_names_reveal_type=False, n_configs: int = 5, max_worlds_per_config: int | None = None, n_runs_per_world: int = 1, n_agents_per_competitor: int = 3, min_factories_per_level: int = 2, tournament_path: str | pathlib.Path | None = None, total_timeout: int | None = None, parallelism='parallel', scheduler_ip: str | None = None, scheduler_port: str | None = None, tournament_progress_callback: Callable[[negmas.tournaments.WorldRunResults | None], None] | None = None, world_progress_callback: Callable[[scml.scml2020.world.SCML2020World | None], None] | None = None, non_competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]] | None = None, non_competitor_params: Sequence[dict[str, Any]] | None = None, dynamic_non_competitors: list[type[negmas.Agent]] | None = None, dynamic_non_competitor_params: list[dict[str, Any]] | None = None, exclude_competitors_from_reassignment: bool = False, name: str | None = None, verbose: bool = False, configs_only=False, compact=False, n_competitors_per_world=1, forced_logs_fraction: float = FORCED_LOGS_FRACTION, **kwargs) negmas.tournaments.TournamentResults | os.PathLike[source]

The function used to run ANAC 2023 SCML tournament (collusion track).

Parameters:
  • name – Tournament name

  • competitors – A list of class names for the competitors

  • competitor_params – A list of competitor parameters (used to initialize the competitors).

  • agent_names_reveal_type – If true then the type of an agent should be readable in its name (most likely at its beginning).

  • n_configs – The number of different world configs (up to competitor assignment) to be generated.

  • max_worlds_per_config – The maximum number of worlds to run per config. If None, then all possible assignments of competitors within each config will be tried (all permutations).

  • n_runs_per_world – Number of runs per world. All of these world runs will have identical competitor assignment and identical world configuration.

  • n_agents_per_competitor – Number of agents per competitor

  • min_factories_per_level – Minimum number of factories for each production level

  • total_timeout – Total timeout for the complete process

  • tournament_path – Path at which to store all results. A scores.csv file will keep the scores and logs folder will keep detailed logs

  • parallelism – Type of parallelism. Can be ‘serial’ for serial, ‘parallel’ for parallel and ‘distributed’ for distributed

  • scheduler_port – Port of the dask scheduler if parallelism is dask, dist, or distributed

  • scheduler_ip – IP Address of the dask scheduler if parallelism is dask, dist, or distributed

  • world_progress_callback – A function to be called after everystep of every world run (only allowed for serial evaluation and should be used with cautious).

  • tournament_progress_callback – A function to be called with WorldRunResults after each world finished processing

  • non_competitors – A list of agent types that will not be competing in the sabotage competition but will exist in the world

  • non_competitor_params – parameters of non competitor agents

  • dynamic_non_competitors – A list of non-competing agents that are assigned to the simulation dynamically during the creation of the final assignment instead when the configuration is created

  • dynamic_non_competitor_params – paramters of dynamic non competitor agents

  • exclude_competitors_from_reassignment – If true, competitors are excluded from the dynamic non-competitors

  • n_competitors_per_world – Number of competitors in every simulation. If not given it will be a random number between 2 and min(2, n), where n is the number of competitors. This value will always be set to 1 in SCML2022

  • verbose – Verbosity

  • configs_only – If true, a config file for each

  • compact – If true, compact logs will be created and effort will be made to reduce the memory footprint

  • forced_logs_fraction – Fraction of simulations for which logs are always saved (including negotiations)

  • kwargs – Arguments to pass to the world_generator function

Returns:

TournamentResults The results of the tournament or a PathLike giving the location where configs were saved

Remarks:

Default parameters will be used in the league with the exception of parallelism which may use distributed processing

scml.utils.anac2023_std(competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]], competitor_params: Sequence[dict[str, Any]] | None = None, agent_names_reveal_type=False, n_configs: int = 5, max_worlds_per_config: int | None = None, n_runs_per_world: int = 1, min_factories_per_level: int = 2, tournament_path: str | pathlib.Path | None = None, total_timeout: int | None = None, parallelism='parallel', scheduler_ip: str | None = None, scheduler_port: str | None = None, tournament_progress_callback: Callable[[negmas.tournaments.WorldRunResults | None], None] | None = None, world_progress_callback: Callable[[scml.scml2020.world.SCML2020World | None], None] | None = None, non_competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]] | None = None, non_competitor_params: Sequence[dict[str, Any]] | None = None, dynamic_non_competitors: list[type[negmas.Agent]] | None = None, dynamic_non_competitor_params: list[dict[str, Any]] | None = None, exclude_competitors_from_reassignment: bool = True, name: str | None = None, verbose: bool = False, configs_only=False, compact=False, n_competitors_per_world=None, forced_logs_fraction: float = FORCED_LOGS_FRACTION, **kwargs) negmas.tournaments.TournamentResults | os.PathLike[source]

The function used to run ANAC 2023 SCML tournament (standard track).

Parameters:
  • name – Tournament name

  • competitors – A list of class names for the competitors

  • competitor_params – A list of competitor parameters (used to initialize the competitors).

  • agent_names_reveal_type – If true then the type of an agent should be readable in its name (most likely at its beginning).

  • n_configs – The number of different world configs (up to competitor assignment) to be generated.

  • max_worlds_per_config – The maximum number of worlds to run per config. If None, then all possible assignments of competitors within each config will be tried (all permutations).

  • n_runs_per_world – Number of runs per world. All of these world runs will have identical competitor assignment and identical world configuration.

  • min_factories_per_level – Minimum number of factories for each production level

  • total_timeout – Total timeout for the complete process

  • tournament_path – Path at which to store all results. A scores.csv file will keep the scores and logs folder will keep detailed logs

  • parallelism – Type of parallelism. Can be ‘serial’ for serial, ‘parallel’ for parallel and ‘distributed’ for distributed

  • scheduler_port – Port of the dask scheduler if parallelism is dask, dist, or distributed

  • scheduler_ip – IP Address of the dask scheduler if parallelism is dask, dist, or distributed

  • world_progress_callback – A function to be called after everystep of every world run (only allowed for serial evaluation and should be used with cautious).

  • tournament_progress_callback – A function to be called with WorldRunResults after each world finished processing

  • non_competitors – A list of agent types that will not be competing in the sabotage competition but will exist in the world

  • non_competitor_params – parameters of non competitor agents

  • dynamic_non_competitors – A list of non-competing agents that are assigned to the simulation dynamically during the creation of the final assignment instead when the configuration is created

  • dynamic_non_competitor_params – paramters of dynamic non competitor agents

  • exclude_competitors_from_reassignment – If true, competitors are excluded from the dynamic non-competitors

  • verbose – Verbosity

  • configs_only – If true, a config file for each

  • compact – If true, compact logs will be created and effort will be made to reduce the memory footprint

  • n_competitors_per_world – Number of competitors in every simulation. If not given it will be a random number between 2 and min(2, n), where n is the number of competitors

  • forced_logs_fraction – Fraction of simulations for which logs are always saved (including negotiations)

  • kwargs – Arguments to pass to the world_generator function

Returns:

TournamentResults The results of the tournament or a PathLike giving the location where configs were saved

Remarks:

Default parameters will be used in the league with the exception of parallelism which may use distributed processing

scml.utils.anac2023_oneshot(competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]], competitor_params: Sequence[dict[str, Any]] | None = None, agent_names_reveal_type=False, n_configs: int = 5, max_worlds_per_config: int | None = None, n_runs_per_world: int = 1, min_factories_per_level: int = 4, tournament_path: str | pathlib.Path | None = None, total_timeout: int | None = None, parallelism='parallel', scheduler_ip: str | None = None, scheduler_port: str | None = None, tournament_progress_callback: Callable[[negmas.tournaments.WorldRunResults | None], None] | None = None, world_progress_callback: Callable[[scml.scml2020.world.SCML2020World | None], None] | None = None, non_competitors: Sequence[str | type[scml.scml2020.world.SCML2020Agent]] | None = None, non_competitor_params: Sequence[dict[str, Any]] | None = None, dynamic_non_competitors: list[type[negmas.Agent]] | None = None, dynamic_non_competitor_params: list[dict[str, Any]] | None = None, exclude_competitors_from_reassignment: bool = False, name: str | None = None, verbose: bool = False, configs_only=False, compact=False, n_competitors_per_world=None, forced_logs_fraction: float = FORCED_LOGS_FRACTION, **kwargs) negmas.tournaments.TournamentResults | os.PathLike[source]

The function used to run ANAC 2023 SCML tournament (oneshot track).

Parameters:
  • name – Tournament name

  • competitors – A list of class names for the competitors

  • competitor_params – A list of competitor parameters (used to initialize the competitors).

  • agent_names_reveal_type – If true then the type of an agent should be readable in its name (most likely at its beginning).

  • n_configs – The number of different world configs (up to competitor assignment) to be generated.

  • max_worlds_per_config – The maximum number of worlds to run per config. If None, then all possible assignments of competitors within each config will be tried (all permutations).

  • n_runs_per_world – Number of runs per world. All of these world runs will have identical competitor assignment and identical world configuration.

  • min_factories_per_level – Minimum number of factories for each production level

  • total_timeout – Total timeout for the complete process

  • tournament_path – Path at which to store all results. A scores.csv file will keep the scores and logs folder will keep detailed logs

  • parallelism – Type of parallelism. Can be ‘serial’ for serial, ‘parallel’ for parallel and ‘distributed’ for distributed

  • scheduler_port – Port of the dask scheduler if parallelism is dask, dist, or distributed

  • scheduler_ip – IP Address of the dask scheduler if parallelism is dask, dist, or distributed

  • world_progress_callback – A function to be called after everystep of every world run (only allowed for serial evaluation and should be used with cautious).

  • tournament_progress_callback – A function to be called with WorldRunResults after each world finished processing

  • non_competitors – A list of agent types that will not be competing in the sabotage competition but will exist in the world

  • non_competitor_params – parameters of non competitor agents

  • dynamic_non_competitors – A list of non-competing agents that are assigned to the simulation dynamically during the creation of the final assignment instead when the configuration is created

  • dynamic_non_competitor_params – paramters of dynamic non competitor agents

  • exclude_competitors_from_reassignment – If true, competitors are excluded from the dynamic non-competitors

  • verbose – Verbosity

  • configs_only – If true, a config file for each

  • compact – If true, compact logs will be created and effort will be made to reduce the memory footprint

  • n_competitors_per_world – Number of competitors in every simulation. If not given it will be a random number between 2 and min(2, n), where n is the number of competitors

  • forced_logs_fraction – Fraction of simulations for which logs are always saved (including negotiations)

  • kwargs – Arguments to pass to the world_generator function

Returns:

TournamentResults The results of the tournament or a PathLike giving the location where configs were saved

Remarks:

Default parameters will be used in the league with the exception of parallelism which may use distributed processing

scml.utils.anac2024_oneshot(competitors: Sequence[str | type[scml.oneshot.agent.OneShotAgent]], competitor_params: Sequence[dict[str, Any]] | None = None, agent_names_reveal_type=False, n_configs: int = 5, max_worlds_per_config: int | None = None, n_runs_per_world: int = 1, min_factories_per_level: int = 4, tournament_path: str | pathlib.Path | pathlib.Path | None = None, total_timeout: int | None = None, parallelism='parallel', scheduler_ip: str | None = None, scheduler_port: str | None = None, tournament_progress_callback: Callable[[negmas.tournaments.WorldRunResults | None], None] | None = None, world_progress_callback: Callable[[scml.oneshot.world.SCML2024OneShotWorld | None], None] | None = None, non_competitors: Sequence[str | type[scml.oneshot.agent.OneShotAgent]] | None = None, non_competitor_params: Sequence[dict[str, Any]] | None = None, dynamic_non_competitors: list[type[scml.oneshot.agent.OneShotAgent]] | None = None, dynamic_non_competitor_params: list[dict[str, Any]] | None = None, exclude_competitors_from_reassignment: bool = False, name: str | None = None, verbose: bool = False, configs_only=False, compact=False, n_competitors_per_world=None, forced_logs_fraction: float = FORCED_LOGS_FRACTION, context=None, **kwargs) negmas.tournaments.TournamentResults | os.PathLike[source]

The function used to run ANAC 2024 SCML tournament (oneshot track).

Parameters:
  • name – Tournament name

  • competitors – A list of class names for the competitors

  • competitor_params – A list of competitor parameters (used to initialize the competitors).

  • agent_names_reveal_type – If true then the type of an agent should be readable in its name (most likely at its beginning).

  • n_configs – The number of different world configs (up to competitor assignment) to be generated.

  • max_worlds_per_config – The maximum number of worlds to run per config. If None, then all possible assignments of competitors within each config will be tried (all permutations).

  • n_runs_per_world – Number of runs per world. All of these world runs will have identical competitor assignment and identical world configuration.

  • min_factories_per_level – Minimum number of factories for each production level

  • total_timeout – Total timeout for the complete process

  • tournament_path – Path at which to store all results. A scores.csv file will keep the scores and logs folder will keep detailed logs

  • parallelism – Type of parallelism. Can be ‘serial’ for serial, ‘parallel’ for parallel and ‘distributed’ for distributed

  • scheduler_port – Port of the dask scheduler if parallelism is dask, dist, or distributed

  • scheduler_ip – IP Address of the dask scheduler if parallelism is dask, dist, or distributed

  • world_progress_callback – A function to be called after everystep of every world run (only allowed for serial evaluation and should be used with cautious).

  • tournament_progress_callback – A function to be called with WorldRunResults after each world finished processing

  • non_competitors – A list of agent types that will not be competing in the sabotage competition but will exist in the world

  • non_competitor_params – parameters of non competitor agents

  • dynamic_non_competitors – A list of non-competing agents that are assigned to the simulation dynamically during the creation of the final assignment instead when the configuration is created

  • dynamic_non_competitor_params – paramters of dynamic non competitor agents

  • exclude_competitors_from_reassignment – If true, competitors are excluded from the dynamic non-competitors

  • verbose – Verbosity

  • configs_only – If true, a config file for each

  • compact – If true, compact logs will be created and effort will be made to reduce the memory footprint

  • n_competitors_per_world – Number of competitors in every simulation. If not given it will be a random number between 2 and min(2, n), where n is the number of competitors

  • forced_logs_fraction – Fraction of simulations for which logs are always saved (including negotiations)

  • kwargs – Arguments to pass to the world_generator function

Returns:

TournamentResults The results of the tournament or a PathLike giving the location where configs were saved

Remarks:

Default parameters will be used in the league with the exception of parallelism which may use distributed processing

scml.utils.anac2024_std(competitors: Sequence[str | type[scml.std.agent.StdAgent]], competitor_params: Sequence[dict[str, Any]] | None = None, agent_names_reveal_type=False, n_configs: int = 5, max_worlds_per_config: int | None = None, n_runs_per_world: int = 1, min_factories_per_level: int = 4, tournament_path: str | pathlib.Path | pathlib.Path | None = None, total_timeout: int | None = None, parallelism='parallel', scheduler_ip: str | None = None, scheduler_port: str | None = None, tournament_progress_callback: Callable[[negmas.tournaments.WorldRunResults | None], None] | None = None, world_progress_callback: Callable[[scml.oneshot.world.SCML2024OneShotWorld | None], None] | None = None, non_competitors: Sequence[str | type[scml.oneshot.agent.OneShotAgent]] | None = None, non_competitor_params: Sequence[dict[str, Any]] | None = None, dynamic_non_competitors: list[type[negmas.Agent]] | None = None, dynamic_non_competitor_params: list[dict[str, Any]] | None = None, exclude_competitors_from_reassignment: bool = False, name: str | None = None, verbose: bool = False, configs_only=False, compact=False, n_competitors_per_world=None, forced_logs_fraction: float = FORCED_LOGS_FRACTION, context=None, **kwargs) negmas.tournaments.TournamentResults | os.PathLike[source]

The function used to run ANAC 2024 SCML tournament (std track).

Parameters:
  • name – Tournament name

  • competitors – A list of class names for the competitors

  • competitor_params – A list of competitor parameters (used to initialize the competitors).

  • agent_names_reveal_type – If true then the type of an agent should be readable in its name (most likely at its beginning).

  • n_configs – The number of different world configs (up to competitor assignment) to be generated.

  • max_worlds_per_config – The maximum number of worlds to run per config. If None, then all possible assignments of competitors within each config will be tried (all permutations).

  • n_runs_per_world – Number of runs per world. All of these world runs will have identical competitor assignment and identical world configuration.

  • min_factories_per_level – Minimum number of factories for each production level

  • total_timeout – Total timeout for the complete process

  • tournament_path – Path at which to store all results. A scores.csv file will keep the scores and logs folder will keep detailed logs

  • parallelism – Type of parallelism. Can be ‘serial’ for serial, ‘parallel’ for parallel and ‘distributed’ for distributed

  • scheduler_port – Port of the dask scheduler if parallelism is dask, dist, or distributed

  • scheduler_ip – IP Address of the dask scheduler if parallelism is dask, dist, or distributed

  • world_progress_callback – A function to be called after everystep of every world run (only allowed for serial evaluation and should be used with cautious).

  • tournament_progress_callback – A function to be called with WorldRunResults after each world finished processing

  • non_competitors – A list of agent types that will not be competing in the sabotage competition but will exist in the world

  • non_competitor_params – parameters of non competitor agents

  • dynamic_non_competitors – A list of non-competing agents that are assigned to the simulation dynamically during the creation of the final assignment instead when the configuration is created

  • dynamic_non_competitor_params – paramters of dynamic non competitor agents

  • exclude_competitors_from_reassignment – If true, competitors are excluded from the dynamic non-competitors

  • verbose – Verbosity

  • configs_only – If true, a config file for each

  • compact – If true, compact logs will be created and effort will be made to reduce the memory footprint

  • n_competitors_per_world – Number of competitors in every simulation. If not given it will be a random number between 2 and min(2, n), where n is the number of competitors

  • forced_logs_fraction – Fraction of simulations for which logs are always saved (including negotiations)

  • kwargs – Arguments to pass to the world_generator function

Returns:

TournamentResults The results of the tournament or a PathLike giving the location where configs were saved

Remarks:

Default parameters will be used in the league with the exception of parallelism which may use distributed processing