KindConcessionRecommender

class negmas.gb.KindConcessionRecommender(kindness=0.0, punish=True, initial_concession=0.0, must_concede=True, inverter=None, *, negotiator=None)[source]

Bases: ConcessionRecommender

A simple recommender that does one small concession first then a tit-for-tat response

Parameters:
  • kindness (float) – A fraction of the utility range to concede everytime no matter what.

  • punish (float) – If True, the partner will be punished by pushing our lower utility limit up if the concession (or its expectation) was negative

  • initial_concession (float) – The amount of concession to do in the first step

  • must_concede (bool) – If True the agent is guaranteed to concede in the first step

  • inverter (UtilityInverter | None) – Used only if must_concede is True to determine the lowest level of concession possible

Attributes Summary

initial_concession

inverter

kindness

must_concede

negotiator

punish

Methods Summary

__call__(partner_concession, state)

Returns an estimate of the concession to be made given the partner_concession

after_join(nmi)

A call back called after joining a negotiation to confirm wwe joined.

after_proposing(state, offer)

Called after proposing

after_responding(state, offer, response[, ...])

Called before offering

before_proposing(state)

Called before proposing

before_responding(state, offer[, source])

Called before offering

can_join(nmi, state, *[, preferences, ufun, ...])

A call back called before joining a negotiation to confirm that we can join it.

on_leave(state)

A call back called after leaving a negotiation.

on_mechanism_error(state)

A call back called whenever an error happens in the mechanism.

on_negotiation_end(state)

A call back called at each negotiation end

on_negotiation_start(state)

A call back called at each negotiation start

on_partner_ended(partner)

Called when a partner ends the negotiation.

on_partner_joined(partner)

Called when a partner joins the negotiation.

on_partner_left(partner)

Called when a partner leaves the negotiation.

on_partner_proposal(state, partner_id, offer)

A callback called by the mechanism when a partner proposes something

on_partner_refused_to_propose(state, partner_id)

A callback called by the mechanism when a partner refuses to propose

on_partner_response(state, partner_id, ...)

A callback called by the mechanism when a partner responds to some offer

on_preferences_changed(changes)

Called to inform the component that the ufun has changed and the kinds of change that happened.

on_round_end(state)

A call back called at each negotiation round end

on_round_start(state)

A call back called at each negotiation round start

set_inverter(inverter)

rtype:

None

set_negotiator(negotiator)

Sets the negotiator of which this component is a part.

Attributes Documentation

initial_concession: float
inverter: UtilityInverter | None
kindness: float
must_concede: bool
negotiator
punish: float

Methods Documentation

__call__(partner_concession, state)[source]

Returns an estimate of the concession to be made given the partner_concession

Return type:

float

after_join(nmi)

A call back called after joining a negotiation to confirm wwe joined.

Return type:

None

after_proposing(state, offer)

Called after proposing

after_responding(state, offer, response, source=None)

Called before offering

before_proposing(state)

Called before proposing

before_responding(state, offer, source=None)

Called before offering

can_join(nmi, state, *, preferences=None, ufun=None, role='negotiator')

A call back called before joining a negotiation to confirm that we can join it.

Return type:

bool

on_leave(state)

A call back called after leaving a negotiation.

Return type:

None

on_mechanism_error(state)

A call back called whenever an error happens in the mechanism. The error and its explanation are accessible in state

Return type:

None

on_negotiation_end(state)

A call back called at each negotiation end

Return type:

None

on_negotiation_start(state)

A call back called at each negotiation start

Return type:

None

on_partner_ended(partner)

Called when a partner ends the negotiation.

Note that the negotiator owning this component may never receive this offer. This is only receivd if the mechanism is sending notifications on every offer.

on_partner_joined(partner)

Called when a partner joins the negotiation.

This is only receivd if the mechanism is sending notifications.

on_partner_left(partner)

Called when a partner leaves the negotiation.

This is only receivd if the mechanism is sending notifications.

on_partner_proposal(state, partner_id, offer)

A callback called by the mechanism when a partner proposes something

Parameters:
  • state (GBState) – MechanismState giving the state of the negotiation when the offer was porposed.

  • partner_id (str) – The ID of the agent who proposed

  • offer (tuple) – The proposal.

Return type:

None

Remarks:
  • Will only be called if enable_callbacks is set for the mechanism

on_partner_refused_to_propose(state, partner_id)

A callback called by the mechanism when a partner refuses to propose

Parameters:
  • state (GBState) – MechanismState giving the state of the negotiation when the partner refused to offer.

  • partner_id (str) – The ID of the agent who refused to propose

Return type:

None

Remarks:
  • Will only be called if enable_callbacks is set for the mechanism

on_partner_response(state, partner_id, outcome, response)

A callback called by the mechanism when a partner responds to some offer

Parameters:
  • state (GBState) – MechanismState giving the state of the negotiation when the partner responded.

  • partner_id (str) – The ID of the agent who responded

  • outcome (tuple | None) – The proposal being responded to.

  • response (ResponseType) – The response

Return type:

None

Remarks:
  • Will only be called if enable_callbacks is set for the mechanism

on_preferences_changed(changes)

Called to inform the component that the ufun has changed and the kinds of change that happened.

on_round_end(state)

A call back called at each negotiation round end

Return type:

None

on_round_start(state)

A call back called at each negotiation round start

Return type:

None

set_inverter(inverter)[source]
Return type:

None

set_negotiator(negotiator)[source]

Sets the negotiator of which this component is a part.

Return type:

None