NaiveTitForTatNegotiator

class negmas.sao.NaiveTitForTatNegotiator(name: Optional[str] = None, parent: Optional[negmas.negotiators.Controller] = None, ufun: Optional[negmas.utilities.UtilityFunction] = None, kindness=0.0, randomize_offer=False, always_concede=True, initial_concession: Union[float, str] = 'min', **kwargs)[source]

Bases: negmas.sao.SAONegotiator

Implements a naive tit-for-tat strategy that does not depend on the availability of an opponent model.

Parameters
  • name – Negotiator name

  • ufun – negotiator ufun

  • parent – A controller

  • kindness – How ‘kind’ is the agent. A value of zero is standard tit-for-tat. Positive values makes the negotiator concede faster and negative values slower.

  • randomize_offer – If True, the offers will be randomized above the level determined by the current concession which in turn reflects the opponent’s concession.

  • always_concede – If True the agent will never use a negative concession rate

  • initial_concession – How much should the agent concede in the beginning in terms of utility. Should be a number or the special string value ‘min’ for minimum concession

Remarks:
  • This negotiator does not keep an opponent model. It thinks only in terms of changes in its own utility. If the opponent’s last offer was better for the negotiator compared with the one before it, it considers that the opponent has conceded by the difference. This means that it implicitly assumes a zero-sum situation.

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