3 Outcomes

   3.1.  Game trees
   3.2.  Outcome classes
   3.3.  Impartial games
   3.4.  Sums
   3.5.  Equivalence

3.1 Game trees

When are two games considered the same? This is a bit of a subtle question, for sometimes a game can be disguised to look like a different game even though the gameplay is essentially the same.

Example 3.1 Any game of Nim can be translated into a game of Green Hackenbush by turning a pile of stones into a beanstalk of the same length.

234 ↔
Any Nim move corresponds to chopping off the same number edges from the top of the corresponding beanstalk and vice versa.

Example 3.2 Two players alternate choose distinct numbers from 1 through 9. If either player manages to select 3 numbers that sum to 15, they win; otherwise the game ends in a tie.

Surprisingly, this game is just Tic-Tac-Toe in disguise! To see this, simply arrange the numbers from 1 through 9 in a 3 × 3 grid so that three numbers sum to 15 if and only if they lie on a line.

Because of such examples, we will essentially divorce the game from whatever representation we are using for its positions and instead focus just on the possible move sequences in that game. These can be shown pictorially in terms of the game tree of the game. The game tree has one vertex for each subposition in the game with left options denoted as left children (connected by edges down and to the left) and right options denoted as right children.

For example, consider the Domineering position . It has the following game tree:

Although we have labeled all of the vertices with their corresponding board positions for clarity, actually one can play the game perfectly well with just the unlabeled game tree. Starting at the top, Left is allowed to move down branches to the left, while Right is allowed to move down branches to the right. Because of this, we say that two games G and H are isomorphic, written G≅ ⁡H, if they have the same unlabeled game tree.

You have probably noticed that included in the game tree are situations in which one player makes two moves in a row, which doesn’t occur in actual play. Still, we will keep these branches because if this position occurs as a small piece of a larger position, then it is possible that one player will move twice in this piece while their opponent moves elsewhere.

Since the full game tree can be a bit unwieldy at times, we will sometimes pare it down in various ways that do not change the gameplay. For instance, if two left children or two right children of a given vertex are isomorphic (i.e., have the same subtree), then we don’t need to include both children since they are essentially the same. This often happens when two subpositions are somehow symmetric, for instance, if one of them is a horizontal or vertical reflection of the other in Domineering. If we were to simplify the tree above, it might look something like the following.

Note that we have removed all of the covered squares as well as any singleton boxes. We have also removed the third right option since it is isomorphic to the second right option .In the full game tree, the latter has only one right option while the former has two, but those two options are identical.

3.2 Outcome classes

Naturally, the most interesting question given a combinatorial game G is who wins given best play. As noted in Theorem 2.1, if Left goes first, then either Left or Right has a winning strategy; similarly, if Right goes first, then either Left or Right has a winning strategy. Thus there are four possible combinations of outcomes depending on who goes first and who wins.

Definition 3.3 Let G be a combinatorial game.

  • If Left has a winning strategy regardless of who goes first, we write G ∈ ℒ and say G is positive.

  • If Right has a winning strategy regardless of who goes first, we write G ∈ ℛ and say G is negative.

  • If Left has a winning strategy when Right goes first and Right has a winning strategy when Left goes first, we write G ∈ 𝒫 (since the Previous player to move wins) and say G is a zero game.We will explain why this terminology makes sense in a little bit. For now, note that the game with no options for either player is a zero game.

  • If Left has a winning strategy when Left goes first and Right has a winning strategy when Right goes first, we write G ∈ 𝒩 (since the Next player to move wins) and say G is fuzzy.

The classes ℒ , ℛ, 𝒫 , and 𝒩 are called outcome classes.

These definitions can be summarized in the following table:

We may sometimes write o(G) for the outcome class of G. Note that Left always prefers ℒ positions to either 𝒩 or 𝒫 positions, both of which she always prefers to ℛ positions, while Right has the opposite preferences.The players’ preferences between 𝒩 and 𝒫 depends on whether it is their turn to move.

Example 3.4 All of the outcome classes are represented by simple Hackenbush positions.

∈ ℒ ∈ ℛ ∈ 𝒩 ∈ 𝒫
Similarly, in Domineering:
∈ ℒ ∈ ℛ ∈ 𝒩 ∈ 𝒫

If we know the outcome classes of all the left and right options of G, then we can determine the outcome class of G as follows.

First suppose Left goes first:

Similarly, if Right goes first:

To summarize:

  • Left wins going first if she can move to ℒ or 𝒫 ;

  • Right wins going first if he can move to ℛ or 𝒫 .

One can then use this to determine the outcome class of G from the definition: if only Left, only Right, both, or neither can win going first, then G lies in ℒ , ℛ, 𝒩 , or 𝒫 , respectively.

Example 3.5 Consider the Domineering position whose game tree we found above. The left options lie in ℒ and 𝒩 ; the presence of ℒ implies Left wins going first. Likewise, the right options lie in 𝒩 and ℛ; the presence of ℛ implies Right wins going first. Hence this position lies in 𝒩 .

In practice, one can determine the outcome class of a game recursively from its game tree. First, start with the leaves (positions with no options) for they must lie in 𝒫 . Then use the criteria above to work your way up the tree, determining each outcome class as you go.

Example 3.6 Consider the following Domineering game tree. (Note that we use symmetry in several places to simplify the tree.)

The positions corresponding to leaves have no more moves, so they lie in 𝒫 .
We can then find the outcome class of any vertex if the outcomes of all of its children have been determined.
Continuing in this manner, we can find the outcome classes of the rest of the vertices.

3.3 Impartial games

The situation becomes simpler when dealing with impartial games due to the following result.

Proposition 3.7 If G is impartial, then either G ∈ 𝒩 or G ∈ 𝒫 .

Proof. Suppose that Left can win going first. Then since G is impartial, Right can use the same strategy to win going first, so G ∈ 𝒩 . If instead Right can win when Left goes first, Left can use the same strategy to win when Right goes first, so G ∈ 𝒫 .  

Hence if it is your turn, there are only two possibilities.

Example 3.8 The game Subtraction(1,2,3) is played with a single pile of stones. On a player’s turn, she may take either 1, 2, or 3 stones from the pile (provided there are enough stones left). For which initial positions does the first player have a winning strategy?

Solution. Let us determine which positions are 𝒩 positions and which are 𝒫 positions by considering them in order. We will abuse notation and write n for the position with n stones.

  • Clearly 0 ∈ 𝒫 since there are no options.

  • Since 1, 2, and 3 all have 0 ∈ 𝒫 as an option, they all lie in 𝒩 .

  • The options of 4 are 1, 2, and 3, which all lie in 𝒩 , so 4 ∈ 𝒫 .

  • Since 5, 6, and 7 all have 4 ∈ 𝒫 as an option, they all lie in 𝒩 .

  • The options of 8 are 5, 6, and 7, which all lie in 𝒩 , so 8 ∈ 𝒫 .

  • ...and so on.

A simple induction argument shows that n ∈ 𝒫 if and only if n is a multiple of 4.If you would like some practice writing proofs, you should consider writing out this proof in full. See the next footnote for the rest of the proof. We will prove the result by (strong) induction on n. The base cases n < 3 have been done above. For n ≥ 3, the options of n are n − 1, n − 2, and n − 3. If n is a multiple of 4, then n − 1, n − 2, and n − 3 are not multiples of 4, so by the inductive hypothesis, n − 1,n − 2,n − 3 ∈ 𝒩 . Since all of n’s options are in 𝒩 , we have n ∈ 𝒫 . If instead n is not a multiple of 4, then one of n − 1, n − 2, and n − 3 is a multiple of 4 (depending on the remaineder of n when divided by 4), so by the inductive hypothesis, one of n’s options lies in 𝒫 , so n ∈ 𝒩 .  

Although this solution describes how to determine the 𝒩 and 𝒫 positions in this example from scratch, you don’t need to go through this whole process if you can guess what the 𝒩 and 𝒫 positions are. The following theorem gives an easy way to justify that your guess is correct.

Theorem 3.9 Suppose that the positions of an impartial game can be partitioned into two (disjoint) sets A and B such that:

  • every option of a position in A lies in B; and

  • every position in B has an option in A.

Then A is the set of 𝒫 positions and B is the set of 𝒩 positions.

Proof. Induction on the number of subpositions.Let H be any position, and suppose by induction that any option of H that lies in A is a 𝒫 position and any option of H that lies in B is an 𝒩 position. If H ∈ A, then all of its options lie in B and hence in 𝒩 , so H lies in 𝒫 . Conversely, if H ∈ B, then one of its options lies in A and hence in 𝒫 , so H ∈ 𝒩 . 

Hence we could also write the solution to the example above as follows.

Solution. We claim that n ≥ 0 is a 𝒫 position if and only if n is a multiple of 4. Indeed, if n is a multiple of 4, then none of its options (which all lie in {n − 1,n − 2,n − 3}) are a multiple of 4. Conversely, if n is not a multiple of 4, then one of its options—either n − 1, n − 2, or n − 3 depending on the remainder of n when divided by 4—is a (nonnegative) multiple of 4.  

Example 3.10 Wythoff’s Game (also called Wythoff’s Nim) is played with two piles of stones. On a player’s turn, she may take any number of stones from one of the piles or the same number of stones from both piles.

We can visualize the possible positions in a matrix indexed by the sizes of the two piles. Then from any position, one can move up within that column, to the left within that row, or along the diagonal to the northwest (like the queen in Chess). Now, the upper left corner, when there are no stones in either pile, is clearly a 𝒫 position, so any position that has it as an option is an 𝒩 position. For clarity, we will represent 𝒫 positions with ×, and 𝒩 positions with ⋅.

Any position whose only options lie in 𝒩 , namely (1,2) and (2,1), must lie in 𝒫 , and any position with either of these as an option lies in 𝒩 .
Continuing in this manner gives the following.
Therefore,
(0,0),(1,2),(2,1),(3,5),(5,3),(4,7),(7,4),… ⁡ ∈𝒫 .

This doesn’t give us a general formula for determining whether a position is in 𝒫 , but for any particular position we could theoretically compute whether it lies in 𝒫 or 𝒩 .The set of 𝒫 positions in Wythoff’s Game is known explicitly and is related to the golden ratio. See here for more details.

3.4 Sums

Often a large combinatorial game will break up into smaller pieces in the sense that the player must choose one of the pieces and then play in that piece, leaving the other pieces unchanged. For instance, in Domineering, if two parts of the board get separated by dominoes, then they are more or less independent.

Similarly, parts of a Hackenbush position that are not connected (except by the ground) are independent, as are the individual piles in Nim. Because of this phenomenon, it is natural to define the sum of two games in the following way.

Definition 3.11 Let G and H be games. The sum G + H is the game played on the disjoint union of G and H (placed next to each other), in which a player’s turn consists of choosing one of G and H and making a move in it, leaving the other unchanged.Obviously, you cannot choose to play in G if you have no legal moves to play in it.

Similarly, one can sum more than two games by choosing exactly one of the many pieces to play in and leaving the others unchanged. One can even sum games with different rulesets since the different pieces do not interact in any way.

With this definition, we see that the complete Domineering position shown above is just the sum of the four (oddly shaped) positions shown to its right, a Nim position is just the sum of its piles, and so forth.

Since smaller positions are usually easier to analyze, we would hope to be able to analyze a larger game by analyzing its disjoint pieces. In other words, if we know the outcome classes of G and H, what can we say about the outcome class of G + H?

Our first result will finally explain why 𝒫 positions (second-player wins) are called zero games.

Proposition 3.12 Let Z ∈ 𝒫 . Then for any game G, G and G + Z lie in the same outcome class.

In other words, if a player can win in G, she can also win in G + Z, so adding a zero game will not change the outcome. To see this informally, neither player will want to play in Z since it is a first-player loss. Therefore they’ll both try to play in G, and the player who loses G will be forced to play in Z first and then lose.

Proof. Suppose Alice has a winning strategy in G.Fix either Alice or Bob to go first.Then Alice can also win in G + Z by using the following strategy: she only plays in Z if Bob did on the previous turn; otherwise she plays in G. If she can do this, then:

  • The moves played in Z will alternate between Alice and Bob, with Bob going first.

  • The moves played in G will also alternate between Alice and Bob, with the same player going first as in the whole game G + Z.

Hence when moving in Z, she can ignore moves made in G and play according to the second player’s winning strategy (which exists since Z ∈ 𝒫 ), while when moving in G, she can ignore moves made in Z and play according to her winning strategy in G. If she does this, then she will never be forced to move in Z since she will not lose in G, and she will always have a move to play in Z since she will not lose in Z. Thus Alice can win in G + Z.

Similarly, if Bob has a winning strategy in G, he can win in G + Z. It follows that G and G + Z lie in the same outcome class.  

Conversely, suppose Z is a game such that G and G + Z lie in the same outcome class for all games G. Then we must have Z ∈ 𝒫 , for we could take G to be the empty game with no moves.In that case, G + Z≅ ⁡Z, so since G ∈ 𝒫 , we would have to have Z ∈ 𝒫 .Hence the class of zero games 𝒫 consists precisely of those games that can be added to any game without changing its outcome.

Games in ℒ are better for Left than games in 𝒫 , so we should expect that adding a game in ℒ should only help Left.

Proposition 3.13 Let L ∈ ℒ . If Left has a winning strategy in a game G, then she also has one in G + L.

Similarly, if R ∈ ℛ, then whenever Right has a winning strategy in a game G, he also has one in G + R.

Proof. As in the proof of Proposition 3.12, Left will win if she plays in L immediately after Right does (following her winning strategy in L) and otherwise plays in G (following her winning strategy in G).  

In particular, this result implies that the sum of two positive games ( ∈ ℒ ) is again positive, while the sum of a positive and a fuzzy game ( ∈ 𝒩 ) is either positive or fuzzy (and both possibilities can occur, as seen in the example below). Likewise, the sum of two negative games ( ∈ ℛ) is again negative, while the sum of a negative and a fuzzy game can be either negative or fuzzy.

Example 3.14 Let G be the positive Domineering position .

The position H1 given by is fuzzy, but G + H1 is positive.Left can win by playing in H1 if going first and in G if going second.

The position H2 given by is also fuzzy, but now G + H2 is fuzzy.The first player can always win by playing in H2 first.

As one might expect, the sum of a positive and negative game can lie in any outcome class. Finally, living up to their name, the sum of two fuzzy games can also lie in any outcome class. (This is left as an exercise for the reader.)

3.5 Equivalence

Although isomorphism is a reasonable notion for what it means for two games to be the same, it is lacking in one key respect: it is too strong!

Example 3.15 Consider the following two Hackenbush positions.

These two games are not isomorphic: in the first position, Left cannot eliminate both edges at once, but she can in the second position (by cutting the bottom edge). And yet if this second position appeared as part of a larger game, it would never make sense for Left to take both edges at once since that would just waste an edge that she could potentially use later. So these two positions behave identically in practice even though they are not isomorphic.

Because of this, we will define the following weaker notion of equivalence of games.

Definition 3.16 Two games G and H are equivalent or equal, written G = H, if G + X and H + X lie in the same outcome class for all games X.

In other words, two games are equal if one can be substituted for the other in any sum of games without changing the outcome. Hence the two Hackenbush positions in the example above are equal. Similarly, Proposition 3.12 shows that any two zero games are equal. On the other hand, the fuzzy positions H1 and H2 in Example 3.14 are not equal (for the outcomes of G + H1 and G + H2 in that example are different).

You may find it a bit troubling that games can be equal but not isomorphic. A reasonable analogy is that two rational numbers can be equal even if they are written differently, like 2 4 and 3 6. Since we generally only care about arithmetic operations with rational numbers, and 2 4 and 3 6 behave the same way with respect to such operations, we may as well think of them as equal. Similarly, we say two games are equal if they are basically indistinguishable when we only care about outcomes and sums, even if they may not be strictly isomorphic. Constructions like this are common in mathematics and go by the name of equivalence relations.

Definition 3.17 A relation ∼ on a set S is an equivalence relation if it satisfies, for all x,y,z ∈ S:

  • (reflexivity) x ∼ x;

  • (symmetry) if x ∼ y, then y ∼ x;

  • (transitivity) if x ∼ y and y ∼ z, then x ∼ z.

Proposition 3.18 Equality of games is an equivalence relation.

Proof. For reflexivity, if G is a game, then the outcome of G + X is always the same as itself, so G = G.

For symmetry, if G = H, then the outcomes of G + X and H + X are always the same, so the outcomes of H + X and G + X are as well, meaning H = G.

For transitivity, if G = H and H = J, then the outcomes of G + X and H + X are always the same, as are those of H + X and J + X, so the outcomes of G + X and J + X are always the same, meaning G = J.  

It might also seem that our definition of equality of games is either (a) useless because there will not be many interesting positions that are equal to one another, or (b) hopeless to check in practice since one needs to verify the definition for every game X. But as we shall see, it is both an effective definition and one that yields a deep and interesting theory.

Example 3.19 All games in 𝒫 (i.e. zero games) are equal. This is an immediate consequence of Proposition 3.12.

Example 3.20 Consider the following Domineering positions:

G = H = .
We claim that H + H = G.Note that G represents a free move for Right. This suggests that H somehow represents a free half-move for Right.To see this, let G′ = . It is straightforward to check that both G + G′ and H + H + G′ lie in 𝒫 .For H + H + G′, if Left goes first, as long as Right responds in an empty copy of H (in the leftmost of the two possible moves), the game will always end after Right’s second move. Likewise, if Right goes first, Left can respond in the other copy of H, and the game will end after Left’s second move.

In fact, this is enough to ensure that H + H and G are equal! Indeed, using Proposition 3.12, we have that for any game X,

o(X + H + H) = o(X + H + H + (G + G′)) = o(X + G + (H + H + G′)) = o(X + G).

In the next chapter, we will develop some formalism that will make it easier to work with these definitions.