Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • Compute Services
  • System Modeler
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • AI & Linguistic Understanding

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

Wolfram Consulting

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM/STEAM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Notebook Assistant + LLM Kit
    • Compute Services
    • System Modeler
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

    We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM/STEAM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
TreeGame
  • See Also
    • MatrixGame
    • TreeGamePlot
    • FindTreeGameStrategies
    • Tree
  • Related Guides
    • Game Theory
    • See Also
      • MatrixGame
      • TreeGamePlot
      • FindTreeGameStrategies
      • Tree
    • Related Guides
      • Game Theory

TreeGame[{player1,action1,…,actionk}]

specifies an action node for player1 with possible actions actionj.

TreeGame[Tree[playera1,{actiont1,…,actiontk}]]

specifies an action node using Tree notation, with playera1 association and actiontj action trees.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Basic Uses  
Properties  
Information Sets  
Options  
ColorFunction  
Applications  
Historical Games  
Board Games  
Economics Games  
Military Games  
Possible Issues  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • MatrixGame
    • TreeGamePlot
    • FindTreeGameStrategies
    • Tree
  • Related Guides
    • Game Theory
    • See Also
      • MatrixGame
      • TreeGamePlot
      • FindTreeGameStrategies
      • Tree
    • Related Guides
      • Game Theory

TreeGame

TreeGame[{player1,action1,…,actionk}]

specifies an action node for player1 with possible actions actionj.

TreeGame[Tree[playera1,{actiont1,…,actiontk}]]

specifies an action node using Tree notation, with playera1 association and actiontj action trees.

Details and Options

  • TreeGame is also known as extensive form game, sequential move game or game tree.
  • A tree game is described as a tree with action nodes where players have a finite number of actions to take and end nodes where the game is over with a resulting payoff for each player. There can be finitely many players taking turns, resulting in a finite game tree.
  • TreeGame is typically used to model decision problems with two or more players acting sequentially. Examples include card and board games, but also economic or business games such as market entry, labor negotiations or oligopoly market actions.
  • Possible actions actionj include:
  • {playerj,action1,…,actionm}an action node where playerj has m possible actions actionj
    {payoff1,…,payoffn}an end node with payoffs payoffk for the n players
  • Additional information for action nodes include action labels and action probabilities:
  • {playerj,…,actionilabeli,…}using labeli for actioni
    {playerj,…,actioniprobi,…}choosing actioni with probability probi
    {playerj,…,actioni{labeli,probi},…}specify both label and probability
  • When using probabilistic actions at an action node, then all actions need to have probabilities for that action node.
  • To model players having imperfect information about which node they are in, the concept of information set is used, which is a label attached to all the action nodes in the same set:
  • {playerjilabelk,action1,…,actionm}using ilabelk for an action node
  • The possible information sets need to be at the same level in the game tree.
  • A typical example of imperfect information is in a card game where you do not know the cards of all the players and hence you do not know which node you are in.
  • Using the alternative Tree notation, an action tree may have two forms:
  • Tree[<|"Player"playerj|>,{actiont1,…,actiontk}]an action node where playerj has m possible actions actionj
    Tree[<|"Payoffs"{payoff1,…,payoffn}|>,{}]an end node with payoffs payoffk for the n players
  • Additional information for action nodes and end nodes includes action labels and action probabilities that refer to the incoming edge:
  • "Label"label
  • use label for the parent action edge
  • "Probability"probspecify the probability prob for the parent edge
  • When using probabilistic actions at an action node, then all actions need to have probabilities for that action node.
  • Imperfect information can be indicated in action nodes:
  • "InformationSet"ilabspecify the information set of the action tree actionti
  • If different players use the same information set, they will treated as different information sets.
  • If the same player has nodes in the same information set but with a different number of actions, they will be treated as different information sets.
  • For a TreeGame g, the following properties "prop" can be accessed as g["prop"]:
  • "Graph"Graph represention of the game
    "InformationSets"dictonaries of the information sets and the node included
    "MatrixGame"convert a tree game to a matrix game
    "PayoffArray"a vector of all payoff values in the game
    "Players"list of players
    "Plot"represent the game as a tree plot; see TreeGamePlot
    "Rules"a Rule representation of the game
    "Summary"basic data for the game
    "Tree"a Tree representation of the game
    "Validity"validation of the tree game
  • TreeGame can be used in functions such as TreeGamePlot, FindTreeGameStrategies, VerifyTreeGameStrategy and TreeGamePayoff.

Examples

open all close all

Basic Examples  (5)

Create a two-player game:

Create a two-player game where all actions have a probability:

Show the graph:

Create a three-player game using trees:

Show the graph:

Create a three-player game where each player only has one action:

Each of their actions is part of the same information set:

Create a two-player game where some actions are probabilities, some have labels and some have both:

Show the graph:

Scope  (7)

Basic Uses  (4)

Create a two-player game:

Create a three-player game where each choice has a probability:

Create a three-player game where each player only has one action, meaning each of their actions is part of the same information set:

Consider a tree game:

Consider the array of all payoffs:

To determine if a tree game is zero sum, verify that the total payoff is always 0:

Properties  (1)

TreeGame objects include properties that give information about the game:

The "Properties" property gives a list of the properties available:

The "Object" property gives the object type of the game:

The "Summary" property gives a brief summary of information about the game:

The "NumberOfPlayers" property gives the number of players in the game:

The "NumberOfActions" property gives the number of actions in the game:

"MinMaxPayoffs" gives the lists of minimum and maximum payoffs for each player:

The "Tree" property gives a Tree representation of the game:

The "Plot" property plots the tree game in the same fashion as the default TreeGamePlot:

The "MatrixGame" property converts any TreeGame into a MatrixGame:

Information Sets  (2)

Create a two-player game where both players only have one information set each:

Plot the game:

Create a two-player game where one player is not time aware:

Plot the game:

Options  (2)

ColorFunction  (2)

Specify the color function used for the graph and tree of the tree game:

This changes the appearance of the tree:

Specify the color function used for the graph and tree of the tree game:

This changes the appearance of the tree:

It also changes the appearance of the graph:

Applications  (11)

Historical Games  (6)

A prize is concealed behind one of three curtains, and game show host Monty Hall asks you to guess where the prize is. After you guess, Monty opens one of the curtains that does not conceal a prize, leaving closed only your original choice and one other curtain. You are given the option of staying with your original choice or switching to the other closed curtain.

Generate the Monty Hall problem:

Plot the game:

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.

Generate the Escalation game:

Consider the tree:

The Revolution game is defined as follows. A colony has the choice to either rebel of 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.

Generate the Revolution game:

Consider the tree:

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

Generate the Naval Deployment game:

Show the graph:

Consider the Centipede game:

Generate a Centipede game with "double-or-nothing" increasing payoffs:

Show the graph:

The Beer-Quiche game is a signaling game defined as follows. Player B is considering dueling player A. B does not know whether A is a wimp or surly. B prefers a duel if A is a wimp. Player A wants to avoid a duel. First, B observes 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 type of A. Moreover, Player A is often called the "sender" of the signal, and player B is the "receiver".

Generate a Beer-Quiche game:

Show the graph:

Board Games  (2)

Consider a two-by-two game of tic-tac-toe where two adjacent X's or O's are required to win (for example, in

, X wins, but
is a tie):

Consider the array of all payoffs:

To determine if a tree game is zero sum, verify that the total payoff is always 0:

Consider the tree of all named openings from chess tournaments above 2200 ELO, 2005–2015:

Note the payoffs denote the proportion of games won in these tournaments for each player.

For example, the payoff for a given opening implies over all games with that opening, on average, White has won of them, Black has won of them, and there was a draw in of them.

Plot the tree game:

Economics Games  (2)

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.

Create the corresponding game:

Show the tree:

This is equivalent to the Entry game:

Compute the sub-game perfect equilibrium:

Consider a small firm and a large firm choosing between a high price and a low price for the same product.

Create the corresponding game:

Show the tree:

Compute the sub-game perfect equilibria:

Military Games  (1)

The legend of Li Guang and his 100 horsemen is a signaling game where a general is either strong or weak, and the hero, Li Guang, has to either retreat or prepare.

Generate the game:

Plot the battle:

Possible Issues  (1)

For a given action, if one choice has a probability, all choices must have a probability:

See Also

MatrixGame  TreeGamePlot  FindTreeGameStrategies  Tree

Related Guides

    ▪
  • Game Theory

History

Introduced in 2025 (14.2)

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2025_treegame, author="Wolfram Research", title="{TreeGame}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/TreeGame.html}", note=[Accessed: 04-February-2026]}

BibLaTeX

@online{reference.wolfram_2025_treegame, organization={Wolfram Research}, title={TreeGame}, year={2025}, url={https://reference.wolfram.com/language/ref/TreeGame.html}, note=[Accessed: 04-February-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2026 Wolfram
© 2026 Wolfram | Legal & Privacy Policy |
English