RandomOneShotAgent

class scml.oneshot.RandomOneShotAgent(owner=None, ufun=None, name=None)[source]

Bases: scml.OneShotAgent

Methods Summary

propose(negotiator_id, state)

Proposes an offer to one of the partners.

respond(negotiator_id, state, offer)

Responds to an offer from one of the partners.

Methods Documentation

propose(negotiator_id, state)[source]

Proposes an offer to one of the partners.

Parameters
  • negotiator_id (str) – ID of the negotiator (and partner)

  • state (MechanismState) – Mechanism state including current step

Return type

Union[OutcomeType, Tuple[Union[int, float, str, list]], Dict[Union[int, str], Union[int, float, str, list]]]

Returns

an outcome to offer.

respond(negotiator_id, state, offer)[source]

Responds to an offer from one of the partners.

Parameters
  • negotiator_id – ID of the negotiator (and partner)

  • state – Mechanism state including current step

  • offer – The offer received.

Returns

A response type which can either be reject, accept, or end negotiation.

Remarks:

default behavior is to accept only if the current offer is the same or has a higher utility compared with what the agent would have proposed in the given state and reject otherwise