Game Tree - Solving Game Trees

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.

  1. 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).
  2. 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.
  3. 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:

    You are right to demand that an artist engage his work consciously, but you confuse two different things: solving the problem and correctly posing the question.
    Anton Pavlovich Chekhov (1860–1904)

    The savage soul of game is up at once—
    The pack full-opening various, the shrill horn
    Resounded from the hills, the neighing steed
    Wild for the chase, and the loud hunter’s shout—
    O’er a weak, harmless, flying creature, all
    Mixed in mad tumult and discordant joy.
    James Thomson (1700–1748)

    Then now is the chance for the flowers
    That can’t stand mowers and plowers.
    It must be now, though, in season
    Before the not mowing brings trees on....
    Robert Frost (1874–1963)