Ordinal

class negmas.preferences.Ordinal(*args, **kwargs)[source]

Bases: BasePref, Protocol

Can be ordered (at least partially)

Attributes Summary

base_type

Returns the utility_function base type ignoring discounting and similar wrappings.

type

Returns the preferences type.

Methods Summary

is_better(first, second)

Compares two offers using the ufun returning whether the first is strictly better than the second

is_equivalent(first, second)

Compares two offers using the ufun returning whether the first is strictly equivelent than the second

is_not_better(first, second)

Compares two offers using the ufun returning whether the first is worse or equivalent than the second

is_not_worse(first, second)

Compares two offers using the ufun returning whether the first is better than the second

is_session_dependent()

Does the utiltiy of an outcome depend on the NegotiatorMechanismInterface?

is_state_dependent()

Does the utiltiy of an outcome depend on the negotiation state?

is_stationary()

Is the ufun stationary (i.e. utility value of an outcome is a constant)?.

is_volatile()

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 second

Attributes Documentation

base_type

Returns the utility_function base type ignoring discounting and similar wrappings.

type

Returns the preferences type.

Methods Documentation

abstract is_better(first, second)[source]

Compares two offers using the ufun returning whether the first is strictly better than the second

Parameters:
  • first (tuple | None) – First outcome to be compared

  • second (tuple | None) – Second outcome to be compared

Return type:

bool

Remarks:

  • Should raise ValueError if the comparison cannot be done

abstract is_equivalent(first, second)[source]

Compares two offers using the ufun returning whether the first is strictly equivelent than the second

Parameters:
  • first (tuple | None) – First outcome to be compared

  • second (tuple | None) – Second outcome to be compared

Return type:

bool

Remarks:

  • Should raise ValueError if the comparison cannot be done

abstract is_not_better(first, second)[source]

Compares two offers using the ufun returning whether the first is worse or equivalent than the second

Parameters:
  • first (tuple) – First outcome to be compared

  • second (tuple | None) – Second outcome to be compared

Return type:

bool

Remarks:

  • Should raise ValueError if the comparison cannot be done

abstract is_not_worse(first, second)[source]

Compares two offers using the ufun returning whether the first is better than the second

Parameters:
  • first (tuple | None) – First outcome to be compared

  • second (tuple | None) – Second outcome to be compared

  • state – The negotiation state at which the comparison is done

Return type:

bool

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:

bool

abstract is_state_dependent()

Does the utiltiy of an outcome depend on the negotiation state?

Return type:

bool

abstract is_stationary()

Is the ufun stationary (i.e. utility value of an outcome is a constant)?

Return type:

bool

abstract is_volatile()

Does the utiltiy of an outcome depend on factors outside the negotiation?

Return type:

bool

Remarks:
  • A volatile preferences is one that can change even for the same mechanism state due to outside influence

abstract is_worse(first, second)[source]

Compares two offers using the ufun returning whether the first is strictly worse than the second

Parameters:
  • first (tuple | None) – First outcome to be compared

  • second (tuple | None) – Second outcome to be compared

Return type:

bool

Remarks:

  • Should raise ValueError if the comparison cannot be done