AspirationNegotiator

class negmas.sao.AspirationNegotiator(max_aspiration=1.0, aspiration_type='boulware', dynamic_ufun=True, randomize_offer=False, can_propose=True, assume_normalized=False, ranking=False, ufun_max=None, ufun_min=None, presort: bool = True, tolerance: float = 0.01, **kwargs)[source]

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

Represents a time-based negotiation strategy that is independent of the offers received during the negotiation.

Parameters
  • name – The agent name

  • ufun – The utility function to attache with the agent

  • max_aspiration – The aspiration level to use for the first offer (or first acceptance decision).

  • aspiration_type – The polynomial aspiration curve type. Here you can pass the exponent as a real value or pass a string giving one of the predefined types: linear, conceder, boulware.

  • dynamic_ufun – If True, the utility function will be assumed to be changing over time. This is depricated.

  • randomize_offer – If True, the agent will propose outcomes with utility >= the current aspiration level not outcomes just above it.

  • can_propose – If True, the agent is allowed to propose

  • assume_normalized – If True, the ufun will just be assumed to have the range [0, 1] inclusive

  • ranking – If True, the aspiration level will not be based on the utility value but the ranking of the outcome within the presorted list. It is only effective when presort is set to True

  • ufun_max – The maximum utility value (used only when presort is True)

  • ufun_min – The minimum utility value (used only when presort is True)

  • presort – If True, the negotiator will catch a list of outcomes, presort them and only use them for offers and responses. This is much faster then other option for general continuous utility functions but with the obvious problem of only exploring a discrete subset of the issue space (Decided by the discrete_outcomes property of the AgentMechanismInterface . If the number of outcomes is very large (i.e. > 10000) and discrete, presort will be forced to be True. You can check if presorting is active in realtime by checking the “presorted” attribute.

  • tolerance – A tolerance used for sampling of outcomes when presort is set to False

  • assume_normalized – If true, the negotiator can assume that the ufun is normalized.

  • rational_proposal – If True, the negotiator will never propose something with a utility value less than its reserved value. If propose returned such an outcome, a NO_OFFER will be returned instead.

  • owner – The Agent that owns the negotiator.

  • parent – The parent which should be an SAOController

Methods Summary

on_ufun_changed()

Called to inform the agent that its ufun has changed.

propose(state)

Propose an offer or None to refuse.

respond(state, offer)

Called to respond to an offer.

Methods Documentation

on_ufun_changed()[source]

Called to inform the agent that its ufun has changed.

Remarks:

  • You MUST call the super() version of this function either before or after your code when you are overriding it.

propose(state: negmas.common.MechanismState)Optional[Union[negmas.outcomes.OutcomeType, Tuple[Union[int, float, str, list]], Dict[Union[int, str], Union[int, float, str, list]]]][source]

Propose an offer or None to refuse.

Parameters

stateMechanismState giving current state of the negotiation.

Returns

The outcome being proposed or None to refuse to propose

Remarks:
  • This function guarantees that no agents can propose something with a utility value

respond(state: negmas.common.MechanismState, offer: Union[negmas.outcomes.OutcomeType, Tuple[Union[int, float, str, list]], Dict[Union[int, str], Union[int, float, str, list]]])negmas.outcomes.ResponseType[source]

Called to respond to an offer. This is the method that should be overriden to provide an acceptance strategy.

Parameters
  • state – a MechanismState giving current state of the negotiation.

  • offer – offer being tested

Returns

The response to the offer

Return type

ResponseType

Remarks:
  • The default implementation never ends the negotiation

  • The default implementation asks the negotiator to propose`() and accepts the `offer if its utility was at least as good as the offer that it would have proposed (and above the reserved value).