BinaryComparatorMixin

class negmas.negotiators.BinaryComparatorMixin[source]

Bases: object

Methods Summary

init()

is_better(first, second[, epsilon])

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

Methods Documentation

init()[source]
is_better(first: Outcome, second: Outcome, epsilon: float = 1e-10)Optional[bool][source]

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

Parameters
  • first – First outcome to be compared

  • second – Second outcome to be compared

  • epsilon – comparison threshold. If the utility difference within the range [-epsilon, epsilon] the two outcomes are assumed to be compatible

Returns

True if utility(first) > utility(second) + epsilon None if |utility(first) - utility(second)| <= epsilon or the utun is not defined False if utility(first) < utility(second) - epsilon