GameTheoryData

GameTheoryData["game"]

gives the mathematical game "game".

GameTheoryData[{"game",n}]

gives an n-player version of "game" if available.

GameTheoryData[,property]

gives the value of the property for the specified game.

GameTheoryData["class"]

gives a list of available named games in the specified "class".

Details

  • GameTheoryData is typically used to generate and learn about well-known games in game theory.
  • GameTheoryData[] gives a list of classical named games.
  • GameTheoryData["Properties"] gives a list of possible properties for games.
  • These properties are:
  • "Classes"classes where the game belongs
    "Description"description of the game
    "Source"source description for the game
  • GameTheoryData["Classes"] gives a list of possible classes for well-known games.
  • Different types of games:
  • "MatrixGame"matrix games (simultaneous, normal form)
    "TreeGame"tree games (sequential, extensive form)
  • Games in different application domains:
  • "Coordination"coordination games, e.g. Stag Hunt
    "Economics"economic games, e.g. Oligopoly
    "Military"military games, e.g. Colonel Blotto
    "Recreation"recreational games, e.g. Rock Paper Scissors
    "Social"social games, e.g. Prisoner's Dilemma
  • Games with specific properties:
  • "2Player"games that are well defined for only two players
    "3Player"games that are well defined for only three players
    "Intransitive"zero-sum games where any pairwise competition contains a cycle, e.g. Rock Paper Scissors
    "NPlayer"games that are well defined for any number of players
    "Random"games where payoffs are randomly generated
    "Symmetric"games where the payoff array is symmetric
    "ZeroSum"games where the sum of payoffs for all outcomes is zero
  • GameTheoryData["game", "class"] gives True if "game" is a member of "class" and False otherwise.

Examples

open allclose all

Basic Examples  (5)

Generate the Prisoner's Dilemma game:

Generate the El Farol Bar game for 4 players:

Show the dataset:

Generate a Welfare game:

Show the dataset:

Generate a random game of 2 players:

Show the dataset:

Consult the games available on the theme of economics:

Learn more about the Inspection game:

Generate an Inspection game:

Scope  (4)

Basic Uses  (3)

Generate a Matching Pennies game:

Read the description of this game:

Find the classes the Matching Pennies game belongs to:

Visualize your own MatchingPennies:

Generate a Platonia Dilemma game of 4 players:

Show the dataset:

Generate the Pure Coordination game for 3 players:

Show the dataset:

Workflow  (1)

A typical workflow when using GameTheoryData is as follows.

Consult the games available:

Learn more about a game:

Consult the source if you want to learn more about the origins of this game:

Generate a game based on these indications:

Show the results using either MatrixGamePlot or TreeGamePlot:

Applications  (41)

Social Games  (19)

The Prisoner's Dilemma game is one of the most well-known games in game theory. It models a situation in which two players have an individual advantage in defecting, but the best global strategy is only possible when both players cooperate. Here is the description:

Generate the Prisoner's Dilemma game:

Visualize as a dataset:

The Nash equilibrium is when both players defect:

The Beer Quiche tree game is a sequential game where player A may potentially signal to player B their nature by player A's actions. Here is the description:

Generate the Beer-Quiche game:

Visualize as a tree:

Find the subgame perfect equilibrium:

The Optional Prisoner's Dilemma, as known as OPD game, is an three-actions extension of the Prisoner's Dilemma. The three actions are cooperate, defect and abstain. If either player abstains, the abstain payoff is given for all players:

Generate your own Optional Prisoner's Dilemma game:

Visualize as a dataset:

This game has an infinite number of Nash equilibria; here are some:

The Diner's Dilemma, also known as the Unscrupulous Diner's Dilemma, is the -player extension of the Prisoner's Dilemma. Here is a description:

Generate a Diner's Dilemma game with 3 players:

Visualize as a plot:

Determine the Nash equilibria of this game:

The Centipede tree game is an increasing betting game between two players. Here is the description:

Generate the Centipede game:

Visualize as a tree:

Find the subgame perfect equilibrium:

The Volunteer's Dilemma game models a situation in which each player can either make a small sacrifice that benefits everybody or instead wait in hope of benefiting from someone else's sacrifice. Here is a description:

Generate the Volunteer's Dilemma game with 4 players:

Visualize as a dataset:

Visualize as a plot:

Determine the Nash equilibria of this game:

The Pure Coordination game models a situation where two players have an equal payoff if they choose the same action. Here is a description:

Generate the Pure Coordination game with 2 players:

Visualize as a plot:

Find the Nash equilibria:

The 3 Coordination game is a variant of coordination games where the players are only rewarded when their preferred option is chosen by at least two players. Here is a description:

Generate a 3 Coordination game:

Visualize as a dataset:

An infinity of Nash equilibria may be found:

The Dangerous Coordination game is an asymmetric variant of coordination games, where one of the players has a significant disadvantage in the case of uncoordinated actions. Here is a description:

Generate the Dangerous Coordination game:

Visualize as a dataset:

Find the Nash equilibria:

The Bach or Stravinsky game, also known as the Battle of the Sexes game, is a famous coordination games. While coordinated action is rewarded, the highest payoff is given to coordination on a player's preferred action. Here is a description:

Generate the game:

Visualize as a dataset:

Find the Nash equilibria:

The Traveler's Dilemma game models two players' bids within a given range, and the payoff is the lowest bid with some bonus for the player who had the lowest bid. Here is a description:

Generate the Traveler's Dilemma game:

Visualize as a dataset:

Find the Nash equilibrium:

The Hawk-Dove game models a situation where two players desire the same resource. Here is a description:

Two shoppers want the last cookie box. They both value (2) the cookie, but want to avoid having to fight for it (1). Generate the corresponding Hawk-Dove game:

Visualize as a dataset:

Find some of the Nash equilibria:

The Welfare game models an asymmetric game where one player has an interest in coordinated action, while the other has an interest in uncoordinated outcomes. Here is the description:

Generate the Welfare game:

Visualize as a dataset:

Find the Nash equilibria:

The Contribution game is a generalization of two-player games that have three equilibria: two asymmetric equilibria in pure strategies and one symmetric equilibrium in mixed strategy.

Generate a Contribution game:

Visualize as a plot:

Find some of the Nash equilibria:

Here is the description of the Discoordination game:

Generate the Discoordination game:

Visualize as a dataset:

Find the Nash equilibrium:

The Guess Two-Thirds Average game models a situation where the goal of all players is to guess the actions of all other players:

Generate a Guess Two-Thirds Average game:

Visualize as a plot:

Find the Nash equilibrium:

The Hero game is a variation of the Bach or Stravinsky game, where the uncoordinated cases are more advantageous than the coordinated cases:

Generate a Hero game:

Visualize as a dataset:

Find 5 Nash equilibria:

The Inspection game examines the problem of verifying or not the work of an employee and serves as a simple model to conceptualize it. Here is the description:

Generate the Inspection game:

Visualize as a dataset:

The Small Pig game, also known as the Rational Pigs game, models an asymmetric volunteer's game. Here is the description:

Generate a Small Pig game:

Visualize as a dataset:

Recreational Games  (7)

Consider the description of the Rock Paper Scissors game:

Generate the Rock Paper Scissors game:

Consider the classes of this game:

Visualize as a dataset:

Find the Nash equilibrium:

Find the description of the Morra game:

Generate the Morra game:

Visualize as a dataset:

Find the description of the Matching Pennies game:

Generate a Matching Pennies game:

Visualize as a plot:

The Matching Pennies game also has a tree form:

Generate the tree Matching Pennies game:

Plot the game:

Find the description of the Chicken game:

Generate the Chicken game:

Visualize as a dataset:

Find the Nash equilibria:

Find the description of the Nash Poker game:

Generate the Nash Poker game:

Visualize by plotting:

Find the description of the Platonia Dilemma game:

Generate the Platonia Dilemma game:

Visualize as a dataset:

Find the description of the Shapley game:

Generate a Shapley game:

Visualize as a dataset:

Military Games  (4)

Find the description of the Colonel Blotto game:

Generate the Colonel Blotto game:

Visualize as a dataset:

Find the description of the Battle of the Bismarck game:

Generate the Battle of the Bismarck game:

Visualize as a dataset:

This game also has a tree form:

Visualize as a tree:

The Revolution tree game is a sequential game often used to represent the political tension between a country and its colony. Here is the description:

Generate the Revolution game:

Plot the game:

Find the subgame perfect equilibrium:

The Escalation game is a sequential game where player A may potentially signal their nature by player A's actions. Here is the description:

Generate the Prisoner's Dilemma game:

Visualize as a tree:

Find the subgame perfect equilibrium:

Economic Games  (4)

Find the description of the Cournot Oligopoly game:

Generate the Cournot Oligopoly game:

Visualize as a dataset:

Find the description of the Linear Cournot Oligopoly game:

Generate the Linear Cournot Oligopoly game:

Visualize as a dataset:

Find the description of the Bertrand Oligopoly game:

Generate the Bertrand Oligopoly game:

Visualize as a dataset:

Find the description of the Buying Stock game:

Generate the Buying Stock game:

Visualize as a dataset:

Mathematical Games  (4)

Find the description of the Compound game:

Generate a Compound game similar to a Prisoner's Dilemma game:

This is similar to the Prisoner's Dilemma game:

Find the description of the Exponential game:

Generate the Exponential game:

Visualize as a dataset:

Find the description of the Simple Inspection game:

Generate the Simple Inspection game:

Visualize as a plot:

Find the description of the Greedy game:

Generate the Greedy game:

Visualize as a dataset:

Random Games  (3)

Find the description of the Random game:

Generate the Random game:

Visualize as a dataset:

Find the description of the Zero Sum Random game:

Generate the Zero Sum Random game:

Visualize as a dataset:

Find the description of the Multivariate Random game:

Generate the Multivariate Random game:

Visualize as a dataset:

Wolfram Research (2025), GameTheoryData, Wolfram Language function, https://reference.wolfram.com/language/ref/GameTheoryData.html.

Text

Wolfram Research (2025), GameTheoryData, Wolfram Language function, https://reference.wolfram.com/language/ref/GameTheoryData.html.

CMS

Wolfram Language. 2025. "GameTheoryData." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/GameTheoryData.html.

APA

Wolfram Language. (2025). GameTheoryData. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GameTheoryData.html

BibTeX

@misc{reference.wolfram_2024_gametheorydata, author="Wolfram Research", title="{GameTheoryData}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/GameTheoryData.html}", note=[Accessed: 15-January-2025 ]}

BibLaTeX

@online{reference.wolfram_2024_gametheorydata, organization={Wolfram Research}, title={GameTheoryData}, year={2025}, url={https://reference.wolfram.com/language/ref/GameTheoryData.html}, note=[Accessed: 15-January-2025 ]}