TreeGamePlot

TreeGamePlot[tgame]

generates a plot of the TreeGame tgame.

TreeGamePlot[tgame,strat]

highlights the game strategy strat.

Details and Options

Examples

open allclose all

Basic Examples  (5)

Generate a two-player tree game:

Plot the game:

Generate the Escalation game:

Plot the game with a legend:

Generate the Revolution game:

Plot the game with a strategy:

Generate a tree game:

Show the strategy "A"{}{0.7,0.3},"B"{1}{0.5,0.5},{2}{0.9,0.1}:

Simulate a game with a monopoly and a newcomer:

Plot it:

Scope  (3)

Generate a two-player tree game:

Plot the game:

Generate a Centipede game:

Plot the game using a radial embedding, to make it look like an actual centipede:

Generate a one-player game where a cat chooses its activity and location:

Plot the game. Note the cat's highest payoff activity is sleeping on the bed:

Options  (12)

ColorFunction  (1)

Generate a game:

To change the colors of the player nodes and payoffs, change the ColorFunction option:

EdgeLabelStyle  (1)

Generate a game:

GraphHighlight  (1)

Generate a game:

To highlight vertices or edges, use GraphHighlight:

GraphHighlightStyle  (1)

Generate a game:

To change the style of the highlighted vertices or edges, use GraphHighlightStyle with GraphHighlight:

GraphLayout  (1)

Generate a game:

The default GraphLayout is the "LayeredDigraphEmbedding".

Alternative graph embeddings for games may be used:

PlotLegends  (1)

Generate a game:

To show the payoff legend for each player, set PlotLegends to True:

PlotTheme  (1)

Generate a game:

To change the theme of the edges, use PlotTheme:

Appearance  (1)

Generate a game:

By default, TreeGamePlot shows both edge probability (lighter edges from the blue player) and information sets:

To show the probability edges without information sets, set Appearance to "ActionProbabilities":

To show the information sets without probabilities, set Appearance to "InformationSets":

Use None to show neither:

GameActionLabels  (1)

Generate a game:

To show the action labels, set GameActionLabels to Automatic:

To hide the action labels, set GameActionLabels to None:

Specify the individual labels using a list of GameActionLabels:

GamePlayerLabels  (1)

Generate a game:

To show the player labels, set GamePlayerLabels to Automatic:

To hide the player labels, set GamePlayerLabels to None:

VertexCoordinates  (1)

Generate a game:

To specify the coordinates of the tree nodes, use VertexCoordinates:

VertexLabelStyle  (1)

Generate a game:

To change the style of the player labels, set VertexLabelStyle to a style and specify the vertex label style:

Applications  (6)

Economic Games  (1)

The Entry game is well known in economics and motivates the avoidance of monopolies. A potential entrant chooses whether to enter a market controlled by a monopolist. If the entrant enters, the monopolist can either begin a price war or share the market:

Plot the game:

This is equivalent to the "Monopoly" game:

Military Games  (3)

The Escalation game is defined as follows. Two nations are in conflict. One nation has the choice to initiate or not initiate, and another nation has the choice to either acquiesce or escalate. Note a third player, "Nature", is often used to portray the randomness of the payoffs. This game is also called the "Nuclear" game, in reference to the atomic threats during the Cold War. Plot the game:

The Revolution game is as follows. A colony has the choice to either rebel or concede to the status quo. The country can either grant independence or suppress the rebellion. If the colony concedes to the status quo, the country can either tax or not tax the colony. This game is usually studied in cases where the payoffs for the suppressed rebellion are unknown. Plot the game:

The Naval Deployment game is an extension of the Battle of Bismarck game to an army that flees and another that is pursuing:

Show the graph:

Social Games  (2)

The Centipede game has two players who alternate in making decisions. At each turn, a player can choose between going "down" and ending the game or going "across" and continuing it (except at the last node, where going "across" also ends the game). The longer the game goes on, the higher the total payoff. However, a player who ends the game early will get a larger share. Generate that game:

Show the graph:

The Beer-Quiche game is a signaling game defined as follows. An individual B is considering whether to duel with another individual A. B knows that A is either a wimp or is surly but not which. B would prefer a duel if A is a wimp but not if A is surly. Player A, regardless of type, wants to avoid a duel. Before making the decision, B has the opportunity to see whether A chooses to have beer or quiche for breakfast. Both players know that wimps prefer quiche while surly people prefer beer. Note a third player, "Nature", is often used to portray the randomness of the payoffs:

Plot it:

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

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