pygambit.gambit.Game.from_arrays#
- classmethod Game.from_arrays(*arrays, title: str = 'Untitled strategic game') Game #
Create a new
Game
with a strategic representation.Each entry in arrays gives the payoff matrix for the corresponding player. The arrays must all have the same shape, and have the same number of dimensions as the total number of players.
Changed in version 16.1.0: Added the title parameter.
- Parameters:
arrays (array-like of array-like) – The 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_dict
Create strategic game and set player labels