CardinalCrisp
- class negmas.preferences.CardinalCrisp(*args, **kwargs)[source]
Bases:
CardinalProb,ProtocolDifferences between outcomes are meaningfull and crisp (i.e. real numbers)
Attributes Summary
Returns the utility_function base type ignoring discounting and similar wrappings.
Returns the preferences type.
Methods Summary
difference(first, second)Returns a numeric difference between the utility of the two given outcomes
difference_prob(first, second)Returns a numeric difference between the utility of the two given outcomes
is_better(first, second)Compares two offers using the
ufunreturning whether the first is strictly better than the secondis_equivalent(first, second)Compares two offers using the
ufunreturning whether the first is strictly equivelent than the secondis_not_better(first, second)Compares two offers using the
ufunreturning whether the first is worse or equivalent than the secondis_not_worse(first, second)Compares two offers using the
ufunreturning whether the first is better than the secondDoes the utiltiy of an outcome depend on the
NegotiatorMechanismInterface?Does the utiltiy of an outcome depend on the negotiation state?
Is the ufun stationary (i.e. utility value of an outcome is a constant)?.
Does the utiltiy of an outcome depend on factors outside the negotiation?
is_worse(first, second)Compares two offers using the
ufunreturning whether the first is strictly worse than the secondAttributes Documentation
- base_type
Returns the utility_function base type ignoring discounting and similar wrappings.
- type
Returns the preferences type.
Methods Documentation
- abstractmethod difference(first: tuple, second: tuple) float[source]
Returns a numeric difference between the utility of the two given outcomes
- abstractmethod difference_prob(first: tuple, second: tuple) Distribution
Returns a numeric difference between the utility of the two given outcomes
- abstractmethod is_better(first: tuple | None, second: tuple | None) bool
Compares two offers using the
ufunreturning whether the first is strictly better than the second- Parameters:
first – First outcome to be compared
second – Second outcome to be compared
Remarks:
Should raise
ValueErrorif the comparison cannot be done
- abstractmethod is_equivalent(first: tuple | None, second: tuple | None) bool
Compares two offers using the
ufunreturning whether the first is strictly equivelent than the second- Parameters:
first – First outcome to be compared
second – Second outcome to be compared
Remarks:
Should raise
ValueErrorif the comparison cannot be done
- abstractmethod is_not_better(first: tuple, second: tuple | None) bool
Compares two offers using the
ufunreturning whether the first is worse or equivalent than the second- Parameters:
first – First outcome to be compared
second – Second outcome to be compared
Remarks:
Should raise
ValueErrorif the comparison cannot be done
- abstractmethod is_not_worse(first: tuple | None, second: tuple | None) bool
Compares two offers using the
ufunreturning whether the first is better than the second- Parameters:
first – First outcome to be compared
second – Second outcome to be compared
state – The negotiation state at which the comparison is done
Remarks:
Should raise
ValueErrorif the comparison cannot be done
- abstractmethod is_session_dependent() bool
Does the utiltiy of an outcome depend on the
NegotiatorMechanismInterface?
- abstractmethod is_state_dependent() bool
Does the utiltiy of an outcome depend on the negotiation state?
- abstractmethod is_stationary() bool
Is the ufun stationary (i.e. utility value of an outcome is a constant)?
- abstractmethod is_volatile() bool
Does the utiltiy of an outcome depend on factors outside the negotiation?
- Remarks:
A volatile preferences is one that can change even for the same mechanism state due to outside influence
- abstractmethod is_worse(first: tuple | None, second: tuple | None) bool
Compares two offers using the
ufunreturning whether the first is strictly worse than the second- Parameters:
first – First outcome to be compared
second – Second outcome to be compared
Remarks:
Should raise
ValueErrorif the comparison cannot be done