NiceNegotiator

class negmas.sao.NiceNegotiator(*args, **kwargs)[source]

Bases: negmas.sao.SAONegotiator, negmas.sao.RandomProposalMixin

Offers and accepts anything.

Parameters
  • name – Negotiator name

  • parent – Parent controller if any

  • ufun – The ufun of the negotiator

  • 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.

Methods Summary

propose(state)

The method directly called by the mechanism (through counter ) to ask for a proposal

propose_(state)

The method directly called by the mechanism (through counter ) to ask for a proposal

respond_(state, offer)

The method to be called directly by the mechanism (through counter ) to respond to an offer.

Methods Documentation

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]]]]

The method directly called by the mechanism (through counter ) to ask for a proposal

Parameters

state – The mechanism state

Returns

An outcome to offer or None to refuse to offer

Remarks:
  • Depending on the SAOMechanism settings, refusing to offer may be interpreted as ending the negotiation

  • The negotiator will only receive this call if it has the ‘propose’ capability.

  • Rational proposal is implemented in this method.

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]

The method directly called by the mechanism (through counter ) to ask for a proposal

Parameters

state – The mechanism state

Returns

An outcome to offer or None to refuse to offer

Remarks:
  • Depending on the SAOMechanism settings, refusing to offer may be interpreted as ending the negotiation

  • The negotiator will only receive this call if it has the ‘propose’ capability.

  • Rational proposal is implemented in this method.

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]

The method to be called directly by the mechanism (through counter ) to respond to an offer.

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

  • offer – the offer being responded to.

Returns

The response to the offer. Possible values are:

  • NO_RESPONSE: refuse to offer. Depending on the mechanism settings this may be interpreted as ending

    the negotiation.

  • ACCEPT_OFFER: Accepting the offer.

  • REJECT_OFFER: Rejecting the offer. The negotiator will be given the chance to counter this

    offer through a call of propose_ later if this was not the last offer to be evaluated by the mechanism.

  • END_NEGOTIATION: End the negotiation

  • WAIT: Instructs the mechanism to wait for this negotiator more. It may lead to cycles so use with care.

Return type

ResponseType

Remarks:
  • The default implementation never ends the negotiation except if an earler end_negotiation notification is sent to the negotiator

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