run_negotiation

negmas.tournaments.run_negotiation(s: ~negmas.inout.Scenario, partners: tuple[type[~negmas.negotiators.negotiator.Negotiator]], partner_names: tuple[str] | None = None, partner_params: tuple[dict[str, ~typing.Any]] | None = None, rep: int = 0, path: ~pathlib.Path | None = None, mechanism_type: type[~negmas.mechanisms.Mechanism] = <class 'negmas.sao.mechanism.SAOMechanism'>, mechanism_params: dict[str, ~typing.Any] | None = None, full_names: bool = True, verbosity: int = 0, plot=False, plot_params: dict[str, ~typing.Any] | None = None, run_id: int | str | None = None, stats: ~negmas.preferences.ops.ScenarioStats | None = None, annotation: dict[str, ~typing.Any] | None = None, private_infos: tuple[dict[str, ~typing.Any] | None] | None = None, id_reveals_type: bool = False, name_reveals_type: bool = True, mask_scenario_name: bool = True, ignore_exceptions: bool = False) dict[str, Any][source]

Run a single negotiation with fully specified parameters

Parameters:
  • s – The Scenario representing the negotiation (outcome space and preferences).

  • partners – The partners running the negotiation in order of addition to the mechanism.

  • real_scenario_name – The real name of the scenario (used when saving logs).

  • partner_names – Names of partners. Either None for defaults or a tuple of the same length as partners

  • partner_params – Parameters used to create the partners. Either None for defaults or a tuple of the same length as partners

  • rep – The repetition number for this run of the negotiation

  • path – A folder to save the logs into. If not given, no logs will be saved.

  • mechanism_type – the type of the Mechanism to use for this negotiation

  • mechanism_params – The parameters used to create the Mechanism or None for defaults

  • full_names – Use full names for partner names (only used if partner_names is None)

  • verbosity – Verbosity level as an integer

  • plot – If true, save a plot of the negotiation (only if path is given)

  • plot_params – Parameters to pass to the plotting function

  • run_id – A unique ID for this run. If not given one is generated based on date and time

  • stats – statistics of the scenario. If not given or path is None, statistics are not saved

  • annotation – Common information saved in the mechanism’s annotation (accessible by negotiators using self.nmi.annotation). None for nothing

  • private_infos – Private information saved in the negotiator’s private_info attribute (accessible by negotiators as self.private_info). None for nothing

  • id_reveals_type – Each negotiator ID will reveal its type.

  • name_reveals_type – Each negotiator name will reveal its type.

Returns:

A dictionary of negotiation results that contains the final state of the negotiation alongside other information