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)[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.

  • partner_names (Optional[tuple[str]]) – Names of partners. Either None for defaults or a tuple of the same length as partners

  • partner_params (Optional[tuple[dict[str, Any]]]) – 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 (Optional[Path]) – 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 (Optional[dict[str, Any]]) – 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 (Optional[dict[str, Any]]) – Parameters to pass to the plotting function

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

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

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

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

Return type:

dict[str, Any]

Returns:

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