pygambit.gambit.StrategicGame.make_outcome#

StrategicGame.make_outcome(location: Mapping | Iterable[Mapping], payoffs: Mapping, label: str) → None#

Create an outcome with payoffs and label and attach it at location.

location is a pure-strategy contingency – a complete mapping from the game’s players’ labels to strategy labels – or an iterable of such contingencies.

Any outcome all of whose references are among location is absorbed by the operation: it is removed from the game, and label may reuse its label.

Added in version 17.0.0.

Parameters:
  • location (contingency, or iterable of contingencies) – Where to attach the new outcome. Nonempty; each contingency may be referenced only once.

  • 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.

  • label (str) – The label of the new outcome; must be nonempty and, after the operation, unique within the game.

Raises:
  • TypeError – If location is not a contingency or an iterable of contingencies.

  • ValueError – If location is empty or contains a repeat; if payoffs is not a complete mapping over exactly the game’s players; if a contingency does not specify exactly one strategy for each player; or if label is empty or is held by an outcome that is not absorbed by the operation.

See also

get_outcome_payoffs

Get the payoffs at an outcome.

set_outcome_payoffs

Set the payoffs at an outcome.

relabel_outcomes

Change the labels of the game’s outcomes.