API documentation#
Representation of games#
A game, the fundamental unit of analysis in game theory. |
|
A player in a |
|
An outcome in a |
|
A node in a |
|
An information set in a |
|
A choice available at an |
|
A plan of action for a |
Creating, reading, and writing games#
|
Construct a game from its serialised representation in a GBT file. |
|
Construct a game from its serialised representation in an EFG file. |
|
Construct a game from its serialised representation in a NFG file. |
|
Construct a game from its serialised representation in an AGG file. |
|
Create a new |
|
Create a new |
|
Create a new |
|
Generate the payoff tables for players represented as numpy arrays. |
|
Create a new |
|
Save the game to an .efg file or return its serialized representation |
|
Save the game to a .nfg file or return its serialized representation |
|
Export the game to HTML format. |
|
Export the game to LaTeX format. |
Transforming game trees#
|
Add a move for player at terminal nodes. |
|
Add a move in information set infoset at terminal nodes. |
|
Insert a move for player prior to the node node, with actions actions. |
|
Insert a move in information set infoset prior to the node node. |
|
Copy the subtree rooted at the node src to the node dest. |
|
Move the subtree rooted at 'src' to 'dest'. |
|
Delete the parent node of node. |
|
Truncate the game tree at node, deleting the subtree beneath it. |
Transforming game information structure#
|
Set the player at an information set. |
|
Place node in the information set infoset. |
|
Remove this node from its information set. |
|
Set the action probabilities at chance information set infoset. |
|
Reveals the move made at infoset to player. |
Sort information sets into a standard order. |
Transforming game components#
|
Add a new player to the game. |
|
Add a new outcome to the game. |
|
Delete an outcome from the game. |
|
Set outcome to be the outcome at node. |
|
Add a new strategy to the set of strategies for player. |
|
Delete strategy from the game. |
Information about the game#
Get or set the title of the game. |
|
Get or set the description of the game. |
|
Whether the game is constant sum. |
|
Return whether a game has a tree-based representation. |
|
Whether the game is perfect recall. |
|
The set of players in the game. |
|
The set of outcomes in the game. |
|
The minimum payoff to any player in any play of the game. |
|
The maximum payoff to any player in any play of the game. |
|
The set of strategies in the game. |
|
The root node of the game. |
|
The set of actions available in the game. |
|
The set of information sets in the game. |
|
The set of nodes in the game. |
|
An iterator over the contingencies in the game. |
Gets or sets the text label of the player. |
|
Returns the number of the player in its game. |
|
Gets the |
|
Returns the set of strategies belonging to the player. |
|
Returns the set of information sets at which the player has the decision. |
|
Returns the set of actions available to the player at some information set. |
|
Returns whether the player is the chance player. |
|
Returns the smallest payoff for the player in any play of the game. |
|
Returns the largest payoff for the player in any play of the game. |
|
Returns the set of strategies belonging to the player. |
The text label associated with this outcome. |
|
Returns the number of the outcome in the game. |
|
Returns the game with which this outcome is associated. |
The text label associated with the node. |
|
Gets the |
|
Returns the outcome attached to the node. |
|
The set of children of this node. |
|
The parent of this node. |
|
Returns whether the node is the root of a proper subgame. |
|
Returns whether this is a terminal node of the game. |
|
Returns whether this node is reachable by any pure strategy profile. |
|
The action which leads to this node. |
|
The node which is immediately before this one in its parent's children. |
|
The node which is immediately after this one in its parent's children. |
|
The information set to which this node belongs. |
|
The player who makes the decision at this node. |
|
|
Returns whether this node is a successor of node. |
Returns a list of all terminal Node objects consistent with it. |
|
The last action taken by the node's owner before reaching this node. |
Get or set the text label of the information set. |
|
The |
|
Whether the information set belongs to the chance player. |
|
Whether the information set is absent-minded. |
|
The player who has the move at this information set. |
|
The set of actions at the information set. |
|
The set of nodes which are members of the information set. |
|
|
Return whether this information set precedes node in the game tree. |
Returns a list of all terminal Node objects consistent with it. |
|
The set of actions taken by the player immediately preceding the member nodes in the information set. |
Get or set the text label of the action. |
|
Get the information set to which the action belongs. |
|
|
Returns whether node precedes this action in the extensive game. |
Get the probability a chance action is played. |
|
Returns a list of all terminal Node objects consistent with it. |
Get or set the text label associated with the strategy. |
|
The game to which the strategy belongs. |
|
The player to which the strategy belongs. |
|
The number of the strategy. |
|
|
Get the action prescribed by a strategy for a given information set. |
Player behavior#
|
Create a mixed strategy profile over the game. |
|
Create a MixedStrategy on the game, with probabilities drawn from the uniform distribution over the set of mixed strategy profiles. |
|
Create a mixed behavior profile over the game. |
|
Create a MixedBehaviorProfile on the game, with probabilities drawn from the uniform distribution over the set of mixed behavior profiles. |
|
Create a new StrategySupportProfile on the game. |
Representation of strategic behavior#
Probability distributions over strategies#
Represents a mixed strategy profile over the strategies in a |
|
The game on which this mixed strategy profile is defined. |
|
Iterate over the mixed strategies in the profile. |
|
Iterate over the probabilities assigned to strategies by the profile. |
|
Access a component of the mixed strategy profile specified by index. |
|
Sets a probability or a mixed strategy to value. |
|
|
Returns the expected payoff to a player if all players play according to the profile. |
|
Returns the expected payoff to playing the strategy, if all other players play according to the profile. |
|
Returns the regret to playing strategy, if all other players play according to the profile. |
Returns the regret of player for playing their mixed strategy, if all other players play according to the profile. |
|
Returns the derivative of the payoff to playing strategy, with respect to the probability that other is played. |
|
Returns the maximum regret of any player. |
|
Returns the Lyapunov value (see [McK91]) of the strategy profile. |
|
Creates a mixed behavior profile which is equivalent to this mixed strategy profile. |
|
Create a profile with the same strategy proportions as this one, but normalised so probabilities for each player sum to one. |
|
Creates a copy of the mixed strategy profile. |
|
A probability distribution over a player's strategies. |
|
Iterate over the probabilities assigned to strategies by the mixed strategy. |
|
Returns the probability that the strategy referred to by index is played. |
|
Sets the probability a strategy is played. |
Probability distributions over behavior#
Represents a mixed behavior profile over the actions in a |
|
The game on which this mixed behavior profile is defined. |
|
Iterate over the mixed behaviors in the profile. |
|
Iterate over the mixed actions specified by the profile. |
|
Iterate over the probabilities assigned to actions by the profile. |
|
Access a component of the mixed behavior specified by index. |
|
Sets a probability, mixed agent strategy, or mixed behavior strategy to value. |
|
|
Returns the expected payoff to a player if all players play according to the profile. |
Returns the expected payoff to the player of playing an action conditional on reaching its information set, if all players play according to the profile. |
|
Returns the regret to playing action, if all other players play according to the profile. |
|
|
Returns the expected payoff to the player conditional on reaching an information set, if all players play according to the profile. |
|
Returns the regret to the player for playing their mixed action at infoset, if all other players play according to the profile. |
|
Returns the expected payoff to player conditional on play reaching node, if all players play according to the profile. |
Returns the probability with which a node is reached. |
|
|
Returns the probability with which an information set is reached. |
Returns the conditional probability that a node is reached, given that its information set is reached. |
|
|
Returns whether the profile has probabilities defined at the information set. |
Returns the maximum regret at any information set. |
|
Returns the Lyapunov value (see [McK91]) of the strategy profile. |
|
Returns the maximum regret at any information set. |
|
Returns the Lyapunov value (see [McK91]) of the strategy profile. |
|
Returns a MixedStrategyProfile which is equivalent to the profile. |
|
Create a profile with the same action proportions as this one, but normalised so probabilities for each infoset sum to one. |
|
Creates a copy of the behavior strategy profile. |
|
A set of probability distributions describing a player's behavior. |
|
Iterate over the mixed actions specified by the mixed behavior. |
|
Iterate over the probabilities assigned to actions by the mixed behavior. |
|
Access a component of the mixed behavior specified by index. |
|
Sets a component of the mixed behavior to value. |
|
A probability distribution over a player's actions at an information set. |
|
Iterate over the probabilities assigned to actions by the mixed action. |
|
Returns the probability that the action referred to by index is played. |
|
Sets the probability an action is played. |
Computation on supports#
|
Return a support profile including only the strategies in profile which are not dominated by another pure strategy. |
Computation of Nash equilibria#
|
Represents the result of a method which computes Nash equilibria in a game. |
|
Compute all pure-strategy Nash equilibria of game. |
|
Compute all pure-strategy agent Nash equilibria of game. |
|
Compute all mixed-strategy Nash equilibria of a two-player game using the strategic representation. |
|
Compute Nash equilibria by enumerating all support profiles of strategies or actions, and for each support finding all totally-mixed equilibria of the game over that support. |
|
Compute Nash equilibria of a two-player constant-sum game using linear programming. |
|
Compute Nash equilibria of a two-player game using linear complementarity programming. |
|
Compute approximate Nash equilibria of a game using Lyapunov function minimization. |
|
Compute approximate agent Nash equilibria of a game using Lyapunov function minimization. |
|
Compute Nash equilibria of a game using the logit quantal response equilibrium correspondence. |
|
Compute Nash equilibria of a game using simplicial subdivision. |
|
Compute Nash equilibria of a game using iterated polymatrix approximation. |
|
Compute Nash equilibria of a game using a global Newton method. |
Computation of quantal response equilibria#
|
|
|
|
|
Use maximum likelihood estimation to find the logit quantal response equilibrium which best fits empirical frequencies of play. |
|
The result of fitting a QRE to a given probability distribution over strategies. |
|
The result of fitting a QRE to a given probability distribution over actions. |
Catalog of games#
|
Return a list of catalog game class names. |
|
Artist problem, one stage. |
|
Artist problem, two stages. |
|
Agent Nash not Player Nash. |
|
Agent SPE not Player SPE. |
|
Bagwell Commitment and Unobservability Example. |
|
General Bayes game, one stage. |
|
General Bayesian game, two stages. |
|
Banks-Camerer-Porter (GEB 94), Game 2. |
|
Banks-Camerer-Porter (GEB 94), Game 3. |
|
Banks-Camerer-Porter (GEB 94), Game 4. |
|
Brandts-Holt, IJGT 93, Game 1. |
|
Brandts-Holt, IJGT 93, Game 2. |
|
Brandts-Holt, IJGT 93, Game 3. |
|
Brandts-Holt, IJGT 93, Game 4. |
|
Brandts-Holt, IJGT 93, Game 5. |
|
Caro2. |
|
Centipede game. |
|
Centipede game. |
|
Centipede game. |
|
Centipede game, 4 move. |
|
Centipede game, 6 move. |
|
Centipede game, 10 move constant sum. |
|
Centipede game, 6 move constant sum. |
|
Feddersen-Pesendorfer, three person Condorcet jury game. |
|
Two person 2x2 game coordination game. |
Two person 2x2 coordination game with 3 Nash equilibria. |
|
|
Two stage 2x2 game -- 3 Nash equilibria in stage game. |
|
Two person 3 x 3 coordination problem with 7 Nash equilibria. |
|
Three player 3x3x3 coordination game. |
3x3 coordination game with 7 Nash equilibria. |
|
|
Two person 4 x 4 coordination problem with 15 Nash equilibria. |
4x4 coordination game with 15 Nash equilibria. |
|
|
Criss-crossing infosets. |
|
Chain store paradox, with three entrants. |
|
2x2 constant sum game with a continuum of equilibria. |
|
Two person 4x4 constant sum game with a continuum of equilibria. |
|
Two person constant sum game with a continuum of equilibria. |
|
Two person 4x4 constant sum game with a continuum of equilibria. |
|
Degenerate 3x3 game 1. |
|
Degenerate 3x3 game 2. |
|
Selten (IJGT, 75), Figure 1. |
|
Selten (IJGT, 75), Figure 1, normal form. |
|
Selten (IJGT, 75), Figure 2. |
|
Selten (IJGT, 75), Figure 2, normal form. |
|
Selten (IJGT, 75), Figure 3. |
|
Kreps-Wilson (Econometrica, 85), Figures 1,4,9, and 14. |
|
Kreps-Wilson (Econometrica, 85), Figures 1,4,9,14, normal form. |
|
Kreps, Wilson (Econometrica, 85), Figure 8. |
|
Kreps Wilson (Econometrica, 85), Figure 11. |
|
Harsanyi (Managment Sci, 68), Table 1. |
|
Harsanyi (Managment Sci, 68), Table 1. |
|
Plurality Voting, Three alternatives, simultaneous vote. |
|
Binary voting, Successive procedure, no recall. |
|
Nim with 5 stones. |
|
Nim with 5 stones. |
|
Two Stage Prisoners' Dilemma. |
|
Peter's Game. |
|
Cho-Kreps (QJE 87) Fig 1, Beer-Quiche Game. |
|
Banks-Sobel, Example 1. |
|
van der Laan et al. Three person, 2 x 2 x 2 example with no pure Nash . |
|
van der Laan et al. Three person, 2x2x2 example with no pure, 1 totally mixed equilibria. |
|
van der Laan et al. Three person 3 x 3 x 3 example with no pure Nash. |
|
van der Laan et al. Three person 3x3x3 example with no pure, and one mixed equilibrium. |
|
van der Laan et al. Four person, 2 x 2 x 2 x 2 example with no Pure Nash. |
|
van der Laan et al. Four person, 2x2x2x2 example with no pure, and five mixed equilibria. |
Two stage McKelvey McLennan game with 9 equilibria each stage. |
|
|
Two-stage matching pennies game. |
|
Two person 2 x 2 game with unique mixed equilibrium. |
|
Two person 2 x 2 game with unique mixed equilibrium. |
2 x 2 constant sum game with unique mixed equilibrium. |
|
McKelvey McLennan game with 9 equilibria, 2 totally mixed. |
|
2x2x2 Example from McKelvey-McLennan, with 9 Nash equilibria, 2 totally mixed. |
|
2x2x2 example with 3 pure, 2 incompletely mixed, and a continuum of completely mixed NE. |
|
Four person, 2x2x2x2 game with 3 Nash equilibria. |
|
Five person 2x2x2x2x2 game with five equilibria. |
|
Three person 3x3x3 game with five equilibria (two pure). |
|
4 Card poker, from Alix Martin. |
|
Three person random 5x4x3 game. |
|
Three person random 8x2x2 game. |
|
|
Random 8x8 game with 5 equilibria (3 pure). |
|
McKelvey-Palfrey (JET 77), 7 stage version of holdout game. |
|
Harsanyi, Selten (1988): example reanalyzed by Dickhaut Kaplan . |
|
Jury game, majority rule. |
|
Jury game, unanimous vote required. |
|
Kohlberg Mertens, Example 1. |
|
Kohlberg, Mertens, Example 2. |
|
Kohlberg, Mertens, Example 3. |
|
Kohlberg, Mertens, Example 6. |
|
Backward-bending principal logit branch. |
|
Two person 4x4 game needing mixed domination. |
|
Two person 4x4 game needing mixed domination. |
|
The Monty Hall 'Lets make a deal' problem. |
|
Myerson (Game Theory), Exercise 2.1. |
|
Myerson (Game Theory), Exercise 2.4. |
|
Myerson (Game Theory), Exercise 2.8. |
|
Myerson (Game Theory), Exercise 3.3a. |
|
Myerson (Game Theory), Exercise 3.3b. |
|
Myerson (Game Theory), Exercise 3.3c. |
|
Myerson (Game Theory), Exercise 3.3d. |
|
Myerson (Game Theory), Exercise 3.3e. |
|
Myerson (Game Theory), Exercise 3.4. |
|
Myerson - Game with no solution in behavioral strategies. |
Myerson (1991) Fig 4.2. |
|
|
Nim-like game. |
|
Nim-like game. |
|
One-shot trust game. |
|
Oneill's (1987 Proc NAS) game. |
|
McKelvey-Palfrey: one stage mixed strategy learning game. |
|
McKelvey-Palfrey: two stage mixed strategy learning game. |
|
Palfrey one sided incomplete info game with both types mixing. |
|
Princess Bride signaling game (from Watson). |
|
Game with no dominated strategies, and dominated equilibrium. |
|
Game with no dominated pure strategies but with dominated Nash equilibria. |
|
Three person version of perfect2. |
|
A simple Poker game. |
|
A Simple Poker Game with an initial ante. |
|
A simple two person poker game in normal form. |
Two person Prisoner's Dilemma game. |
|
|
Game from van Winden. |
|
Game 2 from van Winden. |
|
Wilson's example of inaccessible equilibria (Shapley, 1974, Math Prog Stud). |
|
Wilson's example of inaccessible equilibria (Shapley, 1974, Math Prog Stud). |
|
Job-market signaling game (version from Watson). |
|
von Stengel's two person 6 x 6 game with 75 equilibria. |
|
Schotter-Weigelt-Wilson (GEB 94), Fig 1. |
|
Schotter-Weigelt-Wilson Fig 1 game in normal form. |
|
Schotter-Weigelt-Wilson (GEB 94), Fig 2. |
|
Schotter-Weigelt-Wilson (GEB 94), Fig 3. |
|
Game from Tim Feddersen. |
|
Todd's (incorrect) example of incaccessible equilibria. |
|
Todd's (corrected) example of incaccessible equilibria. |
|
Todd's second example of incaccessible equilibria. |
|
Tic Tac Toe (Not finished yet). |
|
Van Damme's Game. |
|
Van Damme's burning a dollar Game. |
|
Wilson's ex1. |
|
Wilson's ex2: Two stage battle of the sexes. |
|
Wilson (1991): a game with two weakly stable sets. |
|
Simple example where CBFS != AllNash. |
|
Winkels, 1979 degenerate game with 12 extreme equilibria. |
|
Employer - Employee problem, one stage. |
|
Employer - Employee problem, two stages. |
|
Employer - Employee problem, three stages. |
|
Example game from Yamamoto (IJGT, 1993). |
|
Two person 2 x 2 game with all zero payoffs. |
