run_negotiation

negmas.tournaments.run_negotiation(s, partners, partner_names=None, partner_params=None, rep=0, path=None, mechanism_type=<class 'negmas.sao.mechanism.SAOMechanism'>, mechanism_params=None, full_names=True, verbosity=0, plot=False, plot_params=None, run_id=None, stats=None, annotation=None, private_infos=None, id_reveals_type=False, name_reveals_type=True, mask_scenario_name=True, ignore_exceptions=False)[source]

Run a single negotiation with fully specified parameters

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

  • partners (tuple[type[Negotiator]]) – 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 (tuple[str] | None) – Names of partners. Either None for defaults or a tuple of the same length as partners

  • partner_params (tuple[dict[str, Any]] | None) – Parameters used to create the partners. Either None for defaults or a tuple of the same length as partners

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

  • path (Path | None) – A folder to save the logs into. If not given, no logs will be saved.

  • mechanism_type (type[Mechanism]) – the type of the Mechanism to use for this negotiation

  • mechanism_params (dict[str, Any] | None) – The parameters used to create the Mechanism or None for defaults

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

  • verbosity (int) – Verbosity level as an integer

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

  • plot_params (dict[str, Any] | None) – Parameters to pass to the plotting function

  • run_id (int | str | None) – A unique ID for this run. If not given one is generated based on date and time

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

  • annotation (dict[str, Any] | None) – Common information saved in the mechanism’s annotation (accessible by negotiators using self.nmi.annotation). None for nothing

  • private_infos (tuple[dict[str, Any] | None] | None) – Private information saved in the negotiator’s private_info attribute (accessible by negotiators as self.private_info). None for nothing

  • id_reveals_type (bool) – Each negotiator ID will reveal its type.

  • name_reveals_type (bool) – Each negotiator name will reveal its type.

Return type:

dict[str, Any]

Returns:

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