scml.std.agents.aspiration ========================== .. py:module:: scml.std.agents.aspiration Classes ------- .. autoapisummary:: scml.std.agents.aspiration.SingleAgreementAspirationAgent Module Contents --------------- .. py:class:: SingleAgreementAspirationAgent(*args, **kwargs) Bases: :py:obj:`scml.oneshot.agent.OneShotSyncAgent` Uses a time-based strategy to accept a single agreement from the set it is considering. .. py:method:: before_step() Called at the beginning of every step. Remarks: - Use this for any proactive code that needs to be done every simulation step. .. py:method:: counter_all(offers, states) Calculate a response to all offers from all negotiators (negotiator ID is the key). :param offers: Maps negotiator IDs to offers :param states: Maps negotiator IDs to offers AT the time the offers were made. :returns: A dictionary mapping negotiator ID to an `SAOResponse`. The response per agent consist of a tuple. In case of acceptance or ending the negotiation the second item of the tuple should be None. In case of rejection, the second item should be the counter offer. Remarks: - The response type CANNOT be WAIT. - If the system determines that a loop is formed, the agent may receive this call for a subset of negotiations not all of them. .. py:method:: choose_agents(offers, outcome) Selects an appropriate way to distribute this outcome to agents with given IDs. .. py:method:: first_proposals() -> Dict[str, negmas.Outcome | None] Gets a set of proposals to use for initializing the negotiation. :returns: A dictionary mapping each negotiator (in self.negotiators dict) to an outcome to be used as the first proposal if the agent is to start a negotiation.