negmas.models.acceptance¶
Acceptance modeling.
- class negmas.models.acceptance.AcceptanceModelType(*values)[source]¶
Bases:
EnumRepresents types of acceptance models.
- class negmas.models.acceptance.AdaptiveDiscreteAcceptanceModel(outcomes: Iterable[tuple], n_negotiators: int = 2, prob: float | list[float] = 0.5, end_prob=0.0, p_accept_after_reject=0.0, p_reject_after_accept=0.0, rejection_discount=0.98, rejection_delta=0.0, not_offering_rejection_ratio=0.75)[source]¶
Bases:
DiscreteAcceptanceModelAdaptiveDiscreteAcceptanceModel implementation.
- classmethod from_negotiation(nmi: NegotiatorMechanismInterface, prob: float | list = 0.5, end_prob=0.0, p_accept_after_reject=0.0, p_reject_after_accept=0.0) AdaptiveDiscreteAcceptanceModel[source]¶
From negotiation.
- Parameters:
nmi – Nmi.
prob – Prob.
end_prob – End prob.
p_accept_after_reject – P accept after reject.
p_reject_after_accept – P reject after accept.
- Returns:
The result.
- Return type:
- probability_of_acceptance_indx(outcome_index: int) float[source]¶
Probability of acceptance indx.
- Parameters:
outcome_index – Outcome index.
- Returns:
The result.
- Return type:
- class negmas.models.acceptance.AggregatingDiscreteAcceptanceModel(outcomes: Collection[tuple], models: list[DiscreteAcceptanceModel], weights: list[float] | None = None)[source]¶
Bases:
DiscreteAcceptanceModelAggregatingDiscreteAcceptanceModel implementation.
- probability_of_acceptance_indx(outcome_index: int) float[source]¶
Probability of acceptance indx.
- Parameters:
outcome_index – Outcome index.
- Returns:
The result.
- Return type:
- class negmas.models.acceptance.DiscreteAcceptanceModel(outcomes: Iterable[tuple])[source]¶
Bases:
ABCDiscreteAcceptanceModel implementation.
- acceptance_probabilities() ndarray[source]¶
Acceptance probabilities.
- Returns:
The result.
- Return type:
np.ndarray
- probability_of_acceptance(outcome: tuple)[source]¶
Probability of acceptance.
- Parameters:
outcome – Outcome to evaluate.
- abstractmethod probability_of_acceptance_indx(outcome_index: int) float[source]¶
Probability of acceptance indx.
- Parameters:
outcome_index – Outcome index.
- Returns:
The result.
- Return type:
- abstractmethod update_offered_indx(outcome_index: int)[source]¶
Update offered indx.
- Parameters:
outcome_index – Outcome index.
- class negmas.models.acceptance.PeekingDiscreteAcceptanceModel(outcomes: Collection[Outcome], opponents: SAONegotiator | Collection[SAONegotiator])[source]¶
Bases:
DiscreteAcceptanceModelPeekingDiscreteAcceptanceModel implementation.
- probability_of_acceptance_indx(outcome_index: int) float[source]¶
Probability of acceptance indx.
- Parameters:
outcome_index – Outcome index.
- Returns:
The result.
- Return type:
- class negmas.models.acceptance.PeekingProbabilisticDiscreteAcceptanceModel(outcomes: Collection[Outcome], opponents: SAONegotiator | Collection[SAONegotiator])[source]¶
Bases:
DiscreteAcceptanceModelPeekingProbabilisticDiscreteAcceptanceModel implementation.
- probability_of_acceptance_indx(outcome_index: int) float[source]¶
Probability of acceptance indx.
- Parameters:
outcome_index – Outcome index.
- Returns:
The result.
- Return type:
- class negmas.models.acceptance.RandomDiscreteAcceptanceModel(outcomes: Collection[tuple], **kwargs)[source]¶
Bases:
DiscreteAcceptanceModelRandomDiscreteAcceptanceModel implementation.
- probability_of_acceptance_indx(outcome_index: int) float[source]¶
Probability of acceptance indx.
- Parameters:
outcome_index – Outcome index.
- Returns:
The result.
- Return type:
- class negmas.models.acceptance.UncertainOpponentModel(outcomes: Collection[Outcome], opponents: SAONegotiator | Collection[SAONegotiator], uncertainty: float = 0.5, adaptive: bool = False, rejection_discount: float = 0.95, rejection_delta: float = 0.0, constant_base=True, accesses_real_acceptance=False)[source]¶
Bases:
AggregatingDiscreteAcceptanceModelA model for which the uncertainty about the acceptance probability of different negotiators is controllable.
This is not a realistic model but it can be used to experiment with effects of this uncertainty on different negotiation related algorithms (e.g. elicitation algorithms)
- Parameters:
outcomes – The list of possible outcomes
uncertainty (float) – The uncertainty level. Zero means no uncertainty and 1.0 means maximum uncertainty
adaptive (bool) – If true then the random part will learn from experience with the opponents otherwise it will not.
rejection_discount – Only effective if adaptive is True. See
AdaptiveDiscreteAcceptanceModelrejection_delta – Only effective if adaptive is True. See
AdaptiveDiscreteAcceptanceModel