scml.oneshot.agents.nothing
Module Contents
Classes
An agent that does nothing. |
|
An agent that always raises an exception if called to negotiate. It is useful as a placeholder (for example for RL and MARL exposition) |
- class scml.oneshot.agents.nothing.OneshotDoNothingAgent(owner=None, ufun: scml.oneshot.OneShotUFun | None = None, name=None)[source]
Bases:
scml.oneshot.agent.OneShotAgent
An agent that does nothing.
Remarks:
Note that this agent will lose money whenever it is at the edges (i.e. it is an input or an output agent trading in raw material or final product).
- propose(negotiator_id, state)[source]
Proposes an offer to one of the partners.
- Parameters:
negotiator_id – ID of the negotiator (and partner)
state – Mechanism state including current step
- Returns:
an outcome to offer.
- respond(negotiator_id, state, source=None)[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
- 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
- class scml.oneshot.agents.nothing.Placeholder(*args, **kwargs)[source]
Bases:
scml.oneshot.policy.OneShotPolicy
An agent that always raises an exception if called to negotiate. It is useful as a placeholder (for example for RL and MARL exposition)