SingleAgreementRandomAgent

class scml.oneshot.SingleAgreementRandomAgent(*args, p_accept=0.1, **kwargs)[source]

Bases: scml.OneShotSingleAgreementAgent

A controller that agrees randomly to one offer

Methods Summary

best_offer(offers)

Return the ID of the negotiator with the best offer

is_acceptable(offer, source, state)

Should decide if the given offer is acceptable

is_better(a, b, negotiator, state)

Compares two outcomes of the same negotiation

Methods Documentation

best_offer(offers)[source]

Return the ID of the negotiator with the best offer

Parameters

offers (Dict[str, Union[OutcomeType, Tuple[Union[int, float, str, list]], Dict[Union[int, str], Union[int, float, str, list]]]]) – A mapping from negotiator ID to the offer it received

Return type

Optional[str]

Returns

The ID of the negotiator with best offer. Ties should be broken. Return None only if there is no way to calculate the best offer.

is_acceptable(offer, source, state)[source]

Should decide if the given offer is acceptable

Parameters
Remarks:
  • If True is returned, this offer will be accepted and all other negotiations will be ended.

Return type

bool

is_better(a, b, negotiator, state)[source]

Compares two outcomes of the same negotiation

Parameters
Returns

True if utility(a) > utility(b)