GreedyOneShotAgent

class scml.oneshot.GreedyOneShotAgent(*args, concession_exponent=None, acc_price_slack=inf, step_price_slack=None, opp_price_slack=None, opp_acc_price_slack=None, range_slack=None, **kwargs)[source]

Bases: scml.OneShotAgent

A greedy agent based on OneShotAgent

Parameters
  • concession_exponent – A real number controlling how fast does the agent concede on price.

  • acc_price_slack – The allowed slack in price limits compared with best prices I got so far

  • step_price_slack – The allowed slack in price limits compared with best prices I got this step

  • opp_price_slack – The allowed slack in price limits compared with best prices I got so far from a given opponent in this step

  • opp_acc_price_slack – The allowed slack in price limits compared with best prices I got so far from a given opponent so far

  • range_slack – Always consider prices above (1-range_slack) of the best possible prices good enough.

Remarks:
  • A concession_exponent greater than one makes the agent concede super linearly and vice versa

Methods Summary

before_step()

Initialize the quantities and best prices received for next step

best_offer(negotiator_id)

init()

Initialize the quantities and best prices received so far

on_negotiation_success(contract, mechanism)

Record sales/supplies secured

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

before_step()[source]

Initialize the quantities and best prices received for next step

best_offer(negotiator_id)[source]
init()[source]

Initialize the quantities and best prices received so far

on_negotiation_success(contract, mechanism)[source]

Record sales/supplies secured

propose(negotiator_id, state)[source]

Proposes an offer to one of the partners.

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

  • state – Mechanism state including current step

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