ToughNegotiator

class negmas.sao.ToughNegotiator(name=None, parent: Optional[negmas.negotiators.Controller] = None, dynamic_ufun=True, can_propose=True, ufun=None, **kwargs)[source]

Bases: negmas.sao.SAONegotiator

Accepts and proposes only the top offer (i.e. the one with highest utility).

Parameters
  • name – Negotiator name

  • parent – Parent controller if any

  • dynamic_ufun – If True, assumes a dynamic ufun that can change during the negotiation

  • can_propose – If False the negotiator will never propose but can only accept

  • ufun – The ufun of the negotiator

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

Remarks:
  • If there are multiple outcome with the same maximum utility, only one of them will be used.

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