pygambit.gambit.Game.from_dict#
- classmethod Game.from_dict(payoffs, title: str = 'Untitled strategic game') Game #
Create a new
Game
with a strategic representation.Each entry in payoffs is a key-value pair giving the label and the payoff matrix for a player. The payoff matrices must all have the same shape, and have the same number of dimensions as the total number of players.
- Parameters:
payoffs (dict-like mapping str to array-like) – The names and corresponding payoff matrices for the players.
title (str, optional) – The title of the game. If no title is specified, “Untitled strategic game” is used.
- Returns:
The newly-created strategic game.
- Return type:
See also
from_arrays
Create game from list-like of array-like