SAOController

class negmas.sao.SAOController(default_negotiator_type=<class 'negmas.sao.negotiators.PassThroughSAONegotiator'>, default_negotiator_params=None, auto_kill=False, name=None, ufun=None)[source]

Bases: negmas.negotiators.Controller

A controller that can manage multiple negotiators taking full or partial control from them.

Parameters
  • default_negotiator_type – Default type to use when creating negotiators using this controller. The default type is PassThroughSAONegotiator which passes full control to the controller.

  • default_negotiator_params – Default paramters to pass to the default controller.

  • auto_kill – Automatically kill the negotiator once its negotiation session is ended.

  • name – Controller name

  • ufun – The ufun of the controller.

Methods Summary

after_join(negotiator_id, ami, state, *[, …])

Called by children negotiators after joining a negotiation to inform the controller

before_join(negotiator_id, ami, state, *[, …])

Called by children negotiators to get permission to join negotiations

on_negotiation_end(negotiator_id, state)

A call back called at each negotiation end

on_negotiation_start(negotiator_id, state)

A call back called at each negotiation start

propose(negotiator_id, state)

respond(negotiator_id, state, offer)

Methods Documentation

after_join(negotiator_id: str, ami: negmas.common.AgentMechanismInterface, state: negmas.common.MechanismState, *, ufun: Optional[UtilityFunction] = None, role: str = 'agent')None[source]

Called by children negotiators after joining a negotiation to inform the controller

Parameters
before_join(negotiator_id: str, ami: negmas.common.AgentMechanismInterface, state: negmas.common.MechanismState, *, ufun: Optional[UtilityFunction] = None, role: str = 'agent')bool[source]

Called by children negotiators to get permission to join negotiations

Parameters
Returns

True if the negotiator is allowed to join the negotiation otherwise False

on_negotiation_end(negotiator_id: str, state: negmas.common.MechanismState)None[source]

A call back called at each negotiation end

Parameters
  • negotiator_id – The negotiator ID

  • stateMechanismState or one of its descendants giving the state at which the negotiation ended.

on_negotiation_start(negotiator_id: str, state: negmas.common.MechanismState)None[source]

A call back called at each negotiation start

Parameters
  • negotiator_id – The negotiator ID

  • stateMechanismState giving current state of the negotiation.

propose(negotiator_id: str, 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]
respond(negotiator_id: str, 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]