encyclopegia.org

Game tree

, in the game tree for tic-tac-toe.[src] The rotations and reflections of positions are equivalent, so the first player has three choices of move: in the center, at the edge, or in the corner.[src] The second player has two choices for the reply if the first player played in the center, otherwise five choices.[src] And so on.[src] In the context of combinatorial game theory, a game tree is a graph representing all possible game states within a sequential game that has perfect information.[src] Such games include chess, checkers, Go, and tic-tac-toe.[src] A game tree can be used to measure the complexity of a game, as it represents all the possible ways that the game can pan out.[src] Due to the large game trees of complex games such as chess, algorithms that are designed to play this class of games will use partial game trees, which makes computation feasible on modern computers.[src] Various methods exist to solve game trees.[src] If a complete game tree can be generated, a deterministic algorithm, such as backward induction or retrograde analysis can be used.[src] Randomized algorithms and minmax algorithms such as MCTS can be used in cases where a complete game tree is not feasible.[src]

, in the game tree for tic-tac-toe.[src] The rotations and reflections of positions are equivalent, so the first player has three choices of move: in the center, at the edge, or in the corner.[src] The second player has two choices for the reply if the first player played in the center, otherwise five choices.[src] And so on.[src] In the context of combinatorial game theory, a game tree is a graph representing all possible game states within a sequential game that has perfect information.[src] Such games include chess, checkers, Go, and tic-tac-toe.[src] A game tree can be used to measure the complexity of a game, as it represents all the possible ways that the game can pan out.[src] Due to the large game trees of complex games such as chess, algorithms that are designed to play this class of games will use partial game trees, which makes computation feasible on modern computers.[src] Various methods exist to solve game trees.[src] If a complete game tree can be generated, a deterministic algorithm, such as backward induction or retrograde analysis can be used.[src] Randomized algorithms and minmax algorithms such as MCTS can be used in cases where a complete game tree is not feasible.[src] ==Solving game trees== ===Deterministic algorithm version=== With a complete game tree, it is possible to "solve" the game – that is to say, find a sequence of moves that either the first or second player can follow that will guarantee the best possible outcome for that player (usually a win or a tie).[src] The deterministic algorithm (which is generally called backward induction or retrograde analysis) can be described recursively as follows.[src] Color the final ply of the game tree so that all wins for player 1 are colored one way (Blue in the diagram), all wins for player 2 are colored another way (Red in the diagram), and all ties are colored a third way (Grey in the diagram).[src] Look at the next ply up.[src] If there exists a node colored opposite as the current player, color this node for that player as well.[src] If all immediately lower nodes are colored for the same player, color this node for the same player as well.[src] Otherwise, color this node a tie.[src] Repeat for each ply, moving upwards, until all nodes are colored.[src] The color of the root node will determine the nature of the game.[src] The diagram shows a game tree for an arbitrary game, colored using the above algorithm.[src] It is usually possible to solve a game (in this technical sense of "solve") using only a subset of the game tree, since in many games a move need not be analyzed if there is another move that is better for the same player (for example alpha-beta pruning can be used in many deterministic games).[src] Any subtree that can be used to solve the game is known as a decision tree, and the sizes of decision trees of various shapes are used as measures of game complexity.[src] ===Randomized algorithms version=== Randomized algorithms can be used in solving game trees.[src] There are two main advantages in this type of implementation: speed and practicality.[src] Whereas a deterministic version of solving game trees can be done in , the following randomized algorithm has an expected run time of if every node in the game tree has degree 2.[src] Moreover, it is practical because randomized algorithms are capable of "foiling an enemy", meaning an opponent cannot beat the system of game trees by knowing the algorithm used to solve the game tree because the order of solving is random.[src] The following is an implementation of randomized game tree solution algorithm: def gt_eval_rand(u) -> bool: """Returns True if this node evaluates to a win, otherwise False""" if u.leaf: return u.win else: random_children = (gt_eval_rand(child) for child in random_order(u.children)) if u.op == "OR": return any(random_children) if u.op == "AND": return all(random_children) The algorithm makes use of the idea of "short-circuiting": if the root node is considered an " " operator, then once one is found, the root is classified as ; conversely, if the root node is considered an " " operator then once one is found, the root is classified as .[src] ==See also== Alpha-beta pruning Extensive form game Shannon number Game complexity ==References== ==Further reading== Judea Pearl, Heuristics, Addison-Wesley, 1984[src]

40 sentences · 40 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Game tree." encyclopegia.org, 2025, https://encyclopegia.org/wiki/game-tree. Accessed 25 November 2026.

Chicago

"Game tree." encyclopegia.org. Accessed November 25, 2026. https://encyclopegia.org/wiki/game-tree.

APA

encyclopegia.org. (2025). Game tree. Retrieved November 25, 2026, from https://encyclopegia.org/wiki/game-tree

Accessed November 25, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Ti -Tree

stub · references available

Wicked Game

stub · references available

National Hockey League All-Star Game

stub · references available

game of chicken

stub · references available

Siberian Tree Frog

stub · references available

Olive-tree Warbler

stub · references available

seventh generation of video game consoles

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1304729341 · 0.5 · snapshot enwiki-001304729341

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.