UFunProb
- class negmas.preferences.UFunProb(*args, **kwargs)[source]
-
Can be called to map an
Outcome
to aDistribution
Attributes Summary
Returns the utility_function base type ignoring discounting and similar wrappings.
Returns the preferences type.
Methods Summary
__call__
(offer)Call self as a function.
difference_prob
(first, second)Returns a numeric difference between the utility of the two given outcomes
eval
(offer)Evaluates the ufun without normalization (See
eval_normalized
)eval_normalized
(offer[, above_reserve, ...])Evaluates the ufun normalizing the result between zero and one
is_better
(first, second)Compares two offers using the
ufun
returning whether the first is strictly better than the secondis_equivalent
(first, second)Compares two offers using the
ufun
returning whether the first is strictly equivelent than the secondis_not_better
(first, second)Compares two offers using the
ufun
returning whether the first is worse or equivalent than the secondis_not_worse
(first, second)Compares two offers using the
ufun
returning 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
ufun
returning whether the first is strictly worse than the secondminmax
()Finds the minimum and maximum for the ufun
Attributes Documentation
- base_type
Returns the utility_function base type ignoring discounting and similar wrappings.
- type
Returns the preferences type.
Methods Documentation
- abstract difference_prob(first, second)
Returns a numeric difference between the utility of the two given outcomes
- Return type:
Distribution
- abstract eval(offer)[source]
Evaluates the ufun without normalization (See
eval_normalized
)- Return type:
Distribution
- eval_normalized(offer, above_reserve=True, expected_limits=True)
Evaluates the ufun normalizing the result between zero and one
- Parameters:
- Return type:
- Remarks:
If the maximum and the minium are equal, finite and above reserve, will return 1.0.
If the maximum and the minium are equal, initinte or below reserve, will return 0.0.
For probabilistic ufuns, a distribution will still be returned.
The minimum and maximum will be evaluated freshly every time. If they are already caached in the ufun, the cache will be used.
- abstract is_better(first, second)
Compares two offers using the
ufun
returning whether the first is strictly better than the second- Parameters:
- Return type:
Remarks:
Should raise
ValueError
if the comparison cannot be done
- abstract is_equivalent(first, second)
Compares two offers using the
ufun
returning whether the first is strictly equivelent than the second- Parameters:
- Return type:
Remarks:
Should raise
ValueError
if the comparison cannot be done
- abstract is_not_better(first, second)
Compares two offers using the
ufun
returning whether the first is worse or equivalent than the second- Parameters:
- Return type:
Remarks:
Should raise
ValueError
if the comparison cannot be done
- abstract is_not_worse(first, second)
Compares two offers using the
ufun
returning whether the first is better than the second- Parameters:
- Return type:
Remarks:
Should raise
ValueError
if the comparison cannot be done
- abstract is_session_dependent()
Does the utiltiy of an outcome depend on the
NegotiatorMechanismInterface
?- Return type:
- abstract is_state_dependent()
Does the utiltiy of an outcome depend on the negotiation state?
- Return type:
- abstract is_stationary()
Is the ufun stationary (i.e. utility value of an outcome is a constant)?
- Return type:
- abstract is_volatile()
Does the utiltiy of an outcome depend on factors outside the negotiation?
- Return type:
- Remarks:
A volatile preferences is one that can change even for the same mechanism state due to outside influence
- abstract is_worse(first, second)
Compares two offers using the
ufun
returning whether the first is strictly worse than the second- Parameters:
- Return type:
Remarks:
Should raise
ValueError
if the comparison cannot be done