pygambit.gambit.StrategicGame.get_outcome#

StrategicGame.get_outcome(location: Mapping) → str | None#

Returns the label of the outcome attached at location.

location is a pure-strategy contingency – a complete mapping from the game’s players’ labels to the label of the strategy played by that player.

Added in version 17.0.0.

Parameters:

location (Mapping) – A pure-strategy contingency.

Returns:

The label of the outcome attached at location, or None if it is the null outcome.

Return type:

str or None

Raises:
  • TypeError – If location is not a mapping, or a key or value is not a str.

  • ValueError – If location does not specify exactly one strategy for each player of the game, or a key is an empty or all-whitespace string.

  • KeyError – If a player label, or a player’s strategy label, does not match any player, or that player’s strategies, in the game.