pygambit.gambit.Game.set_outcome_payoffs#

Game.set_outcome_payoffs(label: str, payoffs: Mapping) None#

Sets the payoff to each player at the outcome labeled label.

Added in version 17.0.0.

Parameters:
  • label (str) – The label of the outcome to modify.

  • payoffs (Mapping) – A complete mapping from the game’s players (or their labels) to payoffs. Every player must be present; zeroes must be given explicitly.

Raises:
  • KeyError – If no outcome has label label; or if a key of payoffs matches no player.

  • TypeError – If payoffs is not a mapping, or label is not a str.

  • ValueError – If label is an empty string or all whitespace; or if payoffs is not a complete mapping over exactly the game’s players.

See also

get_outcome_payoffs

Get the payoffs at an outcome.

make_outcome

Create a new outcome with payoffs.