TreeGamePlot
Details and Options




- TreeGamePlot is typically used to communicate and understand a tree game.
- TreeGamePlot shows a game tree where each interior node represents a player, with the outgoing edges representing the possible actions that player can take. The leaf nodes represent game over with a payoff for each player.
- A tree game is plotted as a tree graph, where action nodes represent choices for a given player, and end nodes represent the end of the game and the consequent payoffs for all players:
- TreeGamePlot uses as a second argument a game strategy, which specifies the probability of each choice. For example, the strategy <"A" <{} {0.8, 0.2} >, "B" <{1} {0.4, 0.6}, {2} {0.1, 0.9} > > is shown by the shade of the actions (edges):
- Actions and players may be labeled. Some choices may be based on probabilities, denoted by the thickness of the actions:
- Some action nodes may not be distinguishable to a player. These nodes are thus part of the same information, where each information set is represented by a set of connected dashed edges.
- TreeGamePlot has the same options as Graphics, with the following additions and changes: [List of all options]
-
Appearance All choose to show probability and information sets ColorFunction Automatic color of the player nodes and payoffs EdgeLabelStyle Automatic style of the action labels EdgeWeight Automatic weights for edges GameActionLabels Automatic show the action labels GamePlayerLabels Automatic show the player labels GraphHighlight Automatic graph elements to highlight GraphHighlightStyle Automatic style for highlight GraphLayout "LayeredDigraphEmbedding" how to lay out vertices and edges PlotLegends False show legends PlotTheme Automatic overall theme for edges VertexCoordinates Automatic coordinates for vertices VertexLabelStyle Automatic style of the player labels - GraphLayout settings most relevant for TreeGamePlot are structured layouts for trees, including:
-
"BalloonEmbedding" vertices on a circle with the center at the parent vertex "RadialEmbedding" vertices on a circular segment "LayeredDigraphEmbedding" vertices on parallel lines for directed acyclic graphs "LayeredEmbedding" vertices on parallel lines -
AlignmentPoint Center the default point in the graphic to align with Appearance All choose to show probability and information sets AspectRatio Automatic ratio of height to width Axes False whether to draw axes AxesLabel None axes labels AxesOrigin Automatic where axes should cross AxesStyle {} style specifications for the axes Background None background color for the plot BaselinePosition Automatic how to align with a surrounding text baseline BaseStyle {} base style specifications for the graphic ColorFunction Automatic color of the player nodes and payoffs ContentSelectable Automatic whether to allow contents to be selected CoordinatesToolOptions Automatic detailed behavior of the coordinates tool EdgeLabelStyle Automatic style of the action labels EdgeWeight Automatic weights for edges Epilog {} primitives rendered after the main plot FormatType TraditionalForm the default format type for text Frame False whether to put a frame around the plot FrameLabel None frame labels FrameStyle {} style specifications for the frame FrameTicks Automatic frame ticks FrameTicksStyle {} style specifications for frame ticks GameActionLabels Automatic show the action labels GamePlayerLabels Automatic show the player labels GraphHighlight Automatic graph elements to highlight GraphHighlightStyle Automatic style for highlight GraphLayout "LayeredDigraphEmbedding" how to lay out vertices and edges GridLines None grid lines to draw GridLinesStyle {} style specifications for grid lines ImageMargins 0. the margins to leave around the graphic ImagePadding All what extra padding to allow for labels etc. ImageSize Automatic the absolute size at which to render the graphic LabelStyle {} style specifications for labels Method Automatic details of graphics methods to use PlotLabel None an overall label for the plot PlotLegends False show legends PlotRange All range of values to include PlotRangeClipping False whether to clip at the plot range PlotRangePadding Automatic how much to pad the range of values PlotRegion Automatic the final display region to be filled PlotTheme Automatic overall theme for edges PreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphic Prolog {} primitives rendered before the main plot RotateLabel True whether to rotate y labels on the frame Ticks Automatic axes ticks TicksStyle {} style specifications for axes ticks VertexCoordinates Automatic coordinates for vertices VertexLabelStyle Automatic style of the player labels




List of all options




Examples
open allclose allBasic Examples (5)Summary of the most common use cases
Generate a two-player tree game:

https://wolfram.com/xid/0n4ltynxoma-b7kxeo


https://wolfram.com/xid/0n4ltynxoma-dqi7bg


https://wolfram.com/xid/0n4ltynxoma-d6p1wz


https://wolfram.com/xid/0n4ltynxoma-g5rfz4


https://wolfram.com/xid/0n4ltynxoma-jlq8pp

Plot the game with a strategy:

https://wolfram.com/xid/0n4ltynxoma-b0xklj


https://wolfram.com/xid/0n4ltynxoma-iqn9hw

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

https://wolfram.com/xid/0n4ltynxoma-decmvc

Simulate a game with a monopoly and a newcomer:

https://wolfram.com/xid/0n4ltynxoma-47zyv


https://wolfram.com/xid/0n4ltynxoma-mg3f83

Scope (3)Survey of the scope of standard use cases
Generate a two-player tree game:

https://wolfram.com/xid/0n4ltynxoma-uhg6h


https://wolfram.com/xid/0n4ltynxoma-ceelw8


https://wolfram.com/xid/0n4ltynxoma-hugwi

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

https://wolfram.com/xid/0n4ltynxoma-frin7b

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

https://wolfram.com/xid/0n4ltynxoma-bry9a7

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

https://wolfram.com/xid/0n4ltynxoma-l75174

Options (12)Common values & functionality for each option
Appearance (1)

https://wolfram.com/xid/0n4ltynxoma-ckqy4

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

https://wolfram.com/xid/0n4ltynxoma-bl6ftm

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

https://wolfram.com/xid/0n4ltynxoma-erh413

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

https://wolfram.com/xid/0n4ltynxoma-e1aew

Use None to show neither:

https://wolfram.com/xid/0n4ltynxoma-cv05mz

ColorFunction (1)

https://wolfram.com/xid/0n4ltynxoma-d1ji9t

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

https://wolfram.com/xid/0n4ltynxoma-hlmjtp

EdgeLabelStyle (1)

https://wolfram.com/xid/0n4ltynxoma-b3kpiu

To change the style of the action labels, set GameActionLabels to Automatic and specify the EdgeLabelStyle:

https://wolfram.com/xid/0n4ltynxoma-bibiva

GameActionLabels (1)

https://wolfram.com/xid/0n4ltynxoma-mu2r2

To show the action labels, set GameActionLabels to Automatic:

https://wolfram.com/xid/0n4ltynxoma-1n7g3

To hide the action labels, set GameActionLabels to None:

https://wolfram.com/xid/0n4ltynxoma-ercln

Specify the individual labels using a list of GameActionLabels:

https://wolfram.com/xid/0n4ltynxoma-dj9wbv

GamePlayerLabels (1)

https://wolfram.com/xid/0n4ltynxoma-cwt5v4

To show the player labels, set GamePlayerLabels to Automatic:

https://wolfram.com/xid/0n4ltynxoma-fkptde

To hide the player labels, set GamePlayerLabels to None:

https://wolfram.com/xid/0n4ltynxoma-eu0l0x

GraphHighlight (1)

https://wolfram.com/xid/0n4ltynxoma-lger1

To highlight vertices or edges, use GraphHighlight:

https://wolfram.com/xid/0n4ltynxoma-dytv4x

GraphHighlightStyle (1)

https://wolfram.com/xid/0n4ltynxoma-uyz16

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

https://wolfram.com/xid/0n4ltynxoma-x4a4x

GraphLayout (1)

https://wolfram.com/xid/0n4ltynxoma-idbb05

The default GraphLayout is the "LayeredDigraphEmbedding".
Alternative graph embeddings for games may be used:

https://wolfram.com/xid/0n4ltynxoma-f2dp9b


https://wolfram.com/xid/0n4ltynxoma-bpq339


https://wolfram.com/xid/0n4ltynxoma-fwzl2d

PlotLegends (1)

https://wolfram.com/xid/0n4ltynxoma-d3r8ub

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

https://wolfram.com/xid/0n4ltynxoma-c4exdo

PlotTheme (1)

https://wolfram.com/xid/0n4ltynxoma-lwip4

To change the theme of the edges, use PlotTheme:

https://wolfram.com/xid/0n4ltynxoma-oua0y

VertexCoordinates (1)

https://wolfram.com/xid/0n4ltynxoma-cs7s1h

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

https://wolfram.com/xid/0n4ltynxoma-lsayqg

VertexLabelStyle (1)

https://wolfram.com/xid/0n4ltynxoma-e4mulf

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

https://wolfram.com/xid/0n4ltynxoma-e74q0v

Applications (6)Sample problems that can be solved with this function
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:

https://wolfram.com/xid/0n4ltynxoma-f5zoyk


https://wolfram.com/xid/0n4ltynxoma-mq1vo9

This is equivalent to the "Monopoly" game:

https://wolfram.com/xid/0n4ltynxoma-cgo5dp

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:

https://wolfram.com/xid/0n4ltynxoma-bc0ibi

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:

https://wolfram.com/xid/0n4ltynxoma-d1ljqu

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

https://wolfram.com/xid/0n4ltynxoma-h2xrps


https://wolfram.com/xid/0n4ltynxoma-jvkrf

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:

https://wolfram.com/xid/0n4ltynxoma-bpww3q


https://wolfram.com/xid/0n4ltynxoma-tig1g

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:

https://wolfram.com/xid/0n4ltynxoma-f46ujo


https://wolfram.com/xid/0n4ltynxoma-qrrhzi

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.
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.
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
Wolfram Language. (2025). TreeGamePlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/TreeGamePlot.html
BibTeX
@misc{reference.wolfram_2025_treegameplot, author="Wolfram Research", title="{TreeGamePlot}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/TreeGamePlot.html}", note=[Accessed: 11-July-2025
]}
BibLaTeX
@online{reference.wolfram_2025_treegameplot, organization={Wolfram Research}, title={TreeGamePlot}, year={2025}, url={https://reference.wolfram.com/language/ref/TreeGamePlot.html}, note=[Accessed: 11-July-2025
]}