SAOSingleAgreementAspirationController

class negmas.sao.SAOSingleAgreementAspirationController(*args, max_aspiration: float = 1.0, aspiration_type: Union[str, int, float] = 'boulware', **kwargs)[source]

Bases: negmas.sao.SAOSingleAgreementController, negmas.negotiators.AspirationMixin

A SAOSingleAgreementController that uses aspiration level to decide what to accept and what to propose.

Parameters
  • ufun – The utility function to use for ALL negotiations

  • max_aspiration – The maximum aspiration level to start with

  • aspiration_type – The aspiration type/ exponent

Remarks:

  • This controller will get at most one agreement. It uses a concession strategy controlled by max_aspiration and aspiration_type as in the AspirationNegotiator for all negotiations.

  • The partner who gives the best proposal will receive an offer that is guaranteed to have a utility value (for the controller) above the current aspiration level.

  • The controller uses a single ufun for all negotiations. This implies that all negotiations should have the same outcome space (i.e. the same issues).

Methods Summary

after_join(negotiator_id, ami, state, *[, …])

Called by children negotiators after joining a negotiation to inform the controller

best_offer(offers)

Return the ID of the negotiator with the best offer

best_outcome(negotiator[, state])

The best outcome for the negotiation negotiator engages in given the state .

is_acceptable(offer, source, state)

Should decide if the given offer is acceptable

is_better(a, b, negotiator, state)

Compares two outcomes of the same negotiation

Methods Documentation

after_join(negotiator_id, ami, state, *, ufun=None, role='agent')[source]

Called by children negotiators after joining a negotiation to inform the controller

Parameters
best_offer(offers)[source]

Return the ID of the negotiator with the best offer

Parameters

offers – A mapping from negotiator ID to the offer it received

Returns

The ID of the negotiator with best offer. Ties should be broken. Return None only if there is no way to calculate the best offer.

best_outcome(negotiator, state=None)[source]

The best outcome for the negotiation negotiator engages in given the state .

Parameters
  • negotiator – The negotiator for which the best outcome is to be found

  • state – If given, the state of the negotiation. If None, should return the absolute best outcome

Returns

The outcome with maximum utility.

Remarks:

  • The default implementation, just returns the best outcome for this negotiation without considering the state or returns None if it is not possible to find this best outcome.

  • If the negotiator defines a ufun, it is used otherwise the ufun defined for the controller if used (if any)

is_acceptable(offer: Union[negmas.outcomes.OutcomeType, Tuple[Union[int, float, str, list]], Dict[Union[int, str], Union[int, float, str, list]]], source: str, state: negmas.sao.SAOState)[source]

Should decide if the given offer is acceptable

Parameters
  • offer – The offer being tested

  • source – The ID of the negotiator that received this offer

  • state – The state of the negotiation handled by that negotiator

Remarks:
  • If True is returned, this offer will be accepted and all other negotiations will be ended.

is_better(a: Union[negmas.outcomes.OutcomeType, Tuple[Union[int, float, str, list]], Dict[Union[int, str], Union[int, float, str, list]]], b: Union[negmas.outcomes.OutcomeType, Tuple[Union[int, float, str, list]], Dict[Union[int, str], Union[int, float, str, list]]], negotiator: str, state: negmas.sao.SAOState)[source]

Compares two outcomes of the same negotiation

Parameters
  • a – “Outcome”

  • b – “Outcome”

  • negotiator – The negotiator for which the comparison is to be made

  • state – Current state of the negotiation

Returns

True if utility(a) > utility(b)