negmas.utilities Package

Models basic types of utility functions.

Utility functions are at the core of negotiation. Agents engage in negotiations with the goal of maximizing some utility function. In most cases, these utility functions are assumed to be known a-periori and static for the duration of a single negotiations.

Notes

We try to allow for applications that do not necessary have these two assumptions in the following ways:

  • A utility_function value (UtilityValue) can always represent represent a utility_function distribution over all possible utility_function values (UtilityDistribution) or a KnownUtilityValue which is a real number.

  • The base class of all utility_function functions is UtilityFunction and is assumed to map outcomes (Outcome objects) to the aforementioned generic utility values (UtilityValue objects).

  • Utility functions can be constructed using any Callable which makes it possible to construct them so that they change depending on the context or the progression of the negotiation.

Functions

pareto_frontier(ufuns[, outcomes, issues, …])

Finds all pareto-optimal outcomes in the list

make_discounted_ufun(ufun, ami[, …])

normalize(ufun, outcomes[, rng, epsilon, …])

Normalizes a utility function to the range [0, 1]

outcome_with_utility(ufun, rng[, issues, …])

Gets one outcome within the given utility range or None on failure

utility_range(ufun[, issues, outcomes, …])

Finds the range of the given utility function for the given outcomes

Classes

UtilityDistribution

alias of negmas.helpers.Distribution

UtilityDistribution

alias of negmas.helpers.Distribution

UtilityFunction(name, reserved_value, …)

The abstract base class for all utility functions.

ExactUtilityValue([x])

Encapsulates a single offerable_outcomes utility_function value.

ConstUFun(value[, name])

LinDiscountedUFun(ufun, ami, cost, factor, …)

A utility function with linear discounting based on some factor of the negotiation

ExpDiscountedUFun(ufun, ami, discount, …)

A discounted utility function based on some factor of the negotiation

LinearUtilityAggregationFunction(…)

A linear aggregation utility function for multi-issue negotiations.

LinearUtilityFunction(weights, float], …)

A linear utility function for multi-issue negotiations.

MappingUtilityFunction(mapping, …[, …])

Outcome mapping utility function.

NonLinearUtilityAggregationFunction(…[, id])

A nonlinear utility function.

HyperRectangleUtilityFunction(…[, …])

A utility function defined as a set of hyper-volumes.

NonlinearHyperRectangleUtilityFunction(…)

A utility function defined as a set of outcome_ranges.

ComplexWeightedUtilityFunction(ufuns, weights)

A utility function composed of linear aggregation of other utility functions

ComplexNonlinearUtilityFunction(ufuns[, …])

A utility function composed of nonlinear aggregation of other utility functions

IPUtilityFunction(outcomes, Tuple[Union[int, …)

Independent Probabilistic Utility Function.

JavaUtilityFunction(java_object, …)

A utility function implemented in Java

RandomUtilityFunction(outcomes, …[, …])

A random utility function for a discrete outcome space

Class Inheritance Diagram

Inheritance diagram of negmas.utilities.base.UtilityFunction, negmas.utilities.base.ExactUtilityValue, negmas.utilities.static.ConstUFun, negmas.utilities.discounted.LinDiscountedUFun, negmas.utilities.discounted.ExpDiscountedUFun, negmas.utilities.linear.LinearUtilityAggregationFunction, negmas.utilities.linear.LinearUtilityFunction, negmas.utilities.nonlinear.MappingUtilityFunction, negmas.utilities.nonlinear.NonLinearUtilityAggregationFunction, negmas.utilities.nonlinear.HyperRectangleUtilityFunction, negmas.utilities.nonlinear.NonlinearHyperRectangleUtilityFunction, negmas.utilities.complex.ComplexWeightedUtilityFunction, negmas.utilities.complex.ComplexNonlinearUtilityFunction, negmas.utilities.probabilistic.IPUtilityFunction, negmas.utilities.java.JavaUtilityFunction, negmas.utilities.random.RandomUtilityFunction