Solving Game Trees
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 either a win or tie. The algorithm (which is generally called backward induction or retrograde analysis) can be described recursively as follows.
-
- 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).
- Look at the next ply up. If there exists a node colored opposite as the current player, color this node for that player as well. If all immediately lower nodes are colored for the same player, color this node for the same player as well. Otherwise, color this node a tie.
- Repeat for each ply, moving upwards, until all nodes are colored. The color of the root node will determine the nature of the game.
The diagram shows a game tree for an arbitrary game, colored using the above algorithm.
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).
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.
Read more about this topic: Game Tree
Famous quotes containing the words solving, game and/or trees:
“Certainly, young children can begin to practice making letters and numbers and solving problems, but this should be done without workbooks. Young children need to learn initiative, autonomy, industry, and competence before they learn that answers can be right or wrong.”
—David Elkind (20th century)
“Vanessa wanted to be a ballerina. Dad had such hopes for her.... Corin was the academically brilliant one, and a fencer of Olympic standard. Everything was expected of them, and they fulfilled all expectations. But I was the one of whom nothing was expected. I remember a game the three of us played. Vanessa was the President of the United States, Corin was the British Prime Ministerand I was the royal dog.”
—Lynn Redgrave (b. 1943)
“Your soul ... is a dark forest. But the trees are of a particular species, they are genealogical trees.”
—Marcel Proust (18711922)