sort_by_utility
- negmas.preferences.sort_by_utility(ufun, outcomes=None, *, max_cardinality=inf, best_first=True, rational_only=False, return_sorted_outcomes=True)[source]
Returns an ordered list of utility values and outcomes for the given ufun
- Remarks:
If outcomes is not given, the outcome-space of the ufun is used
- Returns:
utility values ordered from best to worst or worst to best based on
best_first
outcomes corresponding to the sorted utility values
- Return type:
A tuple of two lists (first two are numpy arrays)