SAOSingleAgreementRandomController

class negmas.sao.SAOSingleAgreementRandomController(*args, p_acceptance=0.1, **kwargs)[source]

Bases: negmas.sao.SAOSingleAgreementController

A single agreement controller that uses a random negotiation strategy.

Parameters

p_acceptance – The probability that an offer is accepted

Methods Summary

best_offer(offers)

Return the ID of the negotiator with the best offer

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

best_offer(offers: Dict[str, Union[negmas.outcomes.OutcomeType, Tuple[Union[int, float, str, list]], Dict[Union[int, str], Union[int, float, str, list]]]])Optional[str][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.

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