negmas.st¶
Implements single text negotiation mechanisms.
- class negmas.st.HillClimbingSTMechanism(*args, **kwargs)[source]¶
Bases:
VetoSTMechanismA single text mechanism that use hill climbing
- Parameters:
*args – positional arguments to be passed to the base Mechanism
**kwargs – keyword arguments to be passed to the base Mechanism
- class negmas.st.VetoSTMechanism(*args, epsilon: float = 1e-06, initial_outcome=None, initial_responses: tuple[bool] = (), initial_state: STState | None = None, **kwargs)[source]¶
Bases:
Mechanism[NegotiatorMechanismInterface,STState,MechanismAction,BinaryComparatorNegotiator]Base class for all single text mechanisms
- Parameters:
*args – positional arguments to be passed to the base Mechanism
**kwargs – keyword arguments to be passed to the base Mechanism
initial_outcome – initial outcome. If None, it will be selected by
next_outcomewhich by default will choose it randomly.initial_responses – Initial set of responses.
Remarks:
initial_responses is only of value when the number of negotiators that will join the negotiation is less then or equal to its length. By default it is not used for anything. Nevertheless, it is here because
next_outcomemay decide to use it with theinitial_outcome
- initial_responses[source]¶
The initial set of responses. See the remarks of this class to understand its role.
- next_outcome(outcome: tuple | None) tuple | None[source]¶
Generate the next outcome given some outcome.
- Parameters:
outcome – The current outcome
- Returns:
a new outcome or None to end the mechanism run
- on_negotiation_end() None[source]¶
Used to pass the final offer for agreement between all negotiators
- plot(visible_negotiators: tuple[int, int] | tuple[str, str] = (0, 1), show_all_offers=False, show: bool = True, **kwargs)[source]¶
Plot.
- Parameters:
visible_negotiators – Visible negotiators.
show_all_offers – Show all offers.
show – Whether to display the figure immediately.
**kwargs – Additional keyword arguments.
- Returns:
The plotly Figure object.