Impartial games with entailing moves

Combinatorial Game Theory has also been called `additive game theory', whenever the analysis involves sums of independent game components. Such disjunctive sums invoke comparison between games, which allows abstract values to be assigned to them. However, there are rulesets with entailing moves that break the alternating play axiom and/or restrict the other player's options within the disjunctive sum components. These situations are exemplified in the literature by a ruleset such as nimstring, a normal play variation of the classical children's game dots & boxes, and top entails, an elegant ruleset introduced in the classical work Winning Ways, by Berlekamp Conway and Guy. Such rulesets fall outside the scope of the established normal play theory. Here, we axiomatize normal play via two new terminating games, ∞ (Left wins) and ∞ (Right wins), and a more general theory is achieved. We define affine impartial, which extends classical impartial games, and we analyze their algebra by extending the established Sprague-Grundy theory, with an accompanying minimum excluded rule. Solutions of nimstring and top entails are given to illustrate the theory.

READ FULL TEXT VIEW PDF

page 1

page 2

page 3

page 4

07/23/2022

Constructive comparison in bidding combinatorial games

A class of discrete Bidding Combinatorial Games that generalize alternat...
07/12/2022

Sprague-Grundy values and complexity for LCTR

Given a Young diagram on n boxes as a non-increasing sequence of integer...
07/17/2022

Bidding combinatorial games

Combinatorial Game Theory is a branch of mathematics and theoretical com...
03/11/2021

A Reinforcement Learning Based Approach to Play Calling in Football

With the vast amount of data collected on football and the growth of com...
09/28/1998

Evolution of Neural Networks to Play the Game of Dots-and-Boxes

Dots-and-Boxes is a child's game which remains analytically unsolved. We...
04/19/2018

Making Change in 2048

The 2048 game involves tiles labeled with powers of two that can be merg...
07/20/2017

Inapproximability of the Standard Pebble Game and Hard to Pebble Graphs

Pebble games are single-player games on DAGs involving placing and movin...

1 Introduction

Combinatorial Game Theory (CGT), as described in [1, 3, 5, 8], considers disjunctive sums of normal play games. In order to evaluate the outcome of a sum of such games, it suffices to analyze the components individually, and then add the individual values.

However, some classical impartial rulesets, such as nimstring and top entails fall slightly outside the usual CGT axioms. In nimstring, certain moves require a player to play again, or carry-on, which is a violation of the alternating play axiom. And in top entails, certain moves enforce the next player to play in the same component, which violates the standard definition of a disjunctive sum. Thus, values of individual components is no longer a relevant measure, given the standard CGT axioms. The type of moves mentioned in this paragraph will be gathered under the term entailing moves.444Entailing means “involve something as a necessary or inevitable part or consequence”.

The purpose of this paper is to extend impartial normal play games sufficiently to include games with entailing moves. While accomplishing this, we expand the classical Sprague-Grundy theory to fit this extension.

We will rebuild the normal play axioms by using so-called terminating games, or infinities, and . Here we focus on the impartial setting, and the general comprehensive theory for partizan games will appear in [6].555There are partizan rulesets, in the literature and in recreational play, with similar entailing and terminating

moves. Probably the most prominent ones are the game of

chess, and a version of go called atari go. These theories are called affine impartial and affine normal play respectively.

Although we consider only impartial games in this paper, we will keep the players distinguished as Left and Right. In particular, Left wins if either player plays to , in any component, and Right wins in case of play to . Note that the normal play zero is restored by defining , a first player losing position.

It is well-known that, in classical Combinatorial Game Theory, the impartial values are nimbers. We will prove that there is exactly one more value modulo affine impartial, a game , called the moon. This value was anticipated in the classical work Winning Ways, by Berlekamp, Conway and Guy. In [3], volume 2, page 398, one can read “A loony move is one that loses for a player, no matter what other components are.”. Before developing the theory, we illustrate how the infinities are used in the motivating rulesets, nimstring ([2, 3]) and top entails ([3], volume 2).

Let us first briefly mention the organization of the paper. To facilitate the development of the new impartial theory, Section 2 considers the basic properties of unrestricted affine normal play, aiming for a game comparison result, Theorem 14.The affine impartial theory is developed in Section 3. The main result is Theorem 34 which shows that values in this extension are the nimbers plus one more value. Theorem 39 gives an algorithm to find the value of a given position, and notably, if there are no infinities in the options, then the nimbers are obtained by the usual mex-rule. We finish off with two case studies. In Section 4, we compute the value of an interesting nimstring position, anticipated in Section 1.1. In Section 5, we compute the values for top entail heaps of sizes through , and Theorem 41 provides theoretical justification for computing top entails values.

1.1 The ruleset nimstring

In nimstring, a player draws a line between two horizontally or vertically adjacent points, in a finite grid, not already joined by a line. If a player completes a square, then they must draw another line, and if they cannot do so, they lose.

Figure 1 shows an example position, where no square can be completed in the next move. Later, through the new theory, we will see that the position equals modulo affine impartial.

Figure 1: A nimstring position, .

In Figure 2, we show a position, , with two options, one of which is an entailing move. Namely, if the the top bar is drawn, the next player continues, but if the middle bar is drawn, then the current player has to carry-on.

Figure 2: A nimstring position, , with its two options, a ‘double-box’ and an entailing carry-on position.

When we develop the theory, we will see that the position , to the left in Figure 2, is the abstract game

(1)

The option 0 is obtained by drawing the top bar. The intuition for this is as follows: the player who moves inside the ‘double box’ loses, if is played in isolation, because they have to play again.

If a player draws the middle bar in , then they have to carry-on, and this is represented by the abstract option , if Left moved. There is an infinite urgency in this game: Right has to play here, or lose. And so, the effect is the desired: Left plays again, and alternating play is restored. Hence disjunctive sum play is also restored, within the affine impartial convention. Moreover, the Right option in this threat should be 0, because Left loses by playing this option if is played alone. If the sum is , with as in Figure 1, then the next player wins, by playing this entailing middle bar in .

1.2 The ruleset top entails

Top entails is played on heaps of tokens. A player may either remove the top token from exactly one heap, or split a heap into two non-empty heaps. If the top token is removed from a heap, then the next move (in alternating play) must be played on the same heap.

A heap with one token, say , is a first player win, in any situation. Namely, a move in forces the opponent to play in the same heap, where no move remains. Note that the abstract game settles this behaviour. The player who moves first in wins independently of existence of other components. The point we wish to make here is that this abstract representation settles the problem of independecny of a heap of size one with other disjunctive sum components.

Consider , in Figure 3, a pile of size 3. There are two options, as depicted in Figures 4 and 5.

Figure 3: A pile of top entails, of size 3.

The option in Figure 4 splits into two piles and the next player’s options are unrestricted. By the terminating effect of playing in a heap of size one, this composite game should be equal to the game .

Figure 4: The game is split into two components.

The option in Figure 5 is an entailing move, and the next player must continue in this component, even if other moves are available. Therefore, the game form of the entailing option in Figure 5 is

if Left just moved, and where 1 denotes a heap of size one. The terminating threat forces Right to play here, instead of possibly using other options.

Figure 5: An entailing option.

Intuitively, either way of responding reduces to a game of the form . In conclusion, the heap of size three should be equal to the game , and disjunctive sum play has been restored. All this intuition will be rigorously justified in the coming complete theory for affine impartial play.

It turns out that affine impartial games require only a small extension to the Sprague-Grundy theory. Namely, the game in (1), obtained from the nimstring position in Figure 2, equals the game in the previous paragraph, modulo affine impartial, and later we will devote the value ‘ ’ to the equivalence class of such games.

2 Affine literal forms and order

This section aims at Theorem 13, a comparison theorem for affine normal play that suffices for the purpose of this paper. We begin by defining the fundamental concepts for affine normal play, and we wait with the restriction to affine impartial until the next section.

In classical Combinatorial Game Theory, the normal play forms, , are recursively constructed from the empty set. The form is the only form of day zero and the only form without options. The forms , , , are born on day 1, and so on.

The forms of affine normal play, denoted , are recursively constructed from the games (infinity) and (minus infinity) [6]. The forms and are the only forms without options. The forms and are born on day zero. And so on.

The order of is defined in the standard way. Consider the four perfect play outcome classes (Left wins), (Next player wins), (Previous player wins), and (Right wins). From Left’s perspective, the first outcome is the best (she wins, regardless of playing first or second) and the fourth is the worst (she loses, regardless of whether playing first or second). On the other hand, regarding and , the victory depends on playing first or second, so these outcomes are not comparable. These considerations explain the partial order in an ‘outcome diamond’:


We write , or equivalently , if the outcome of is Left wins, and so on. The evaluation of games in is based on the following axiomatic list:

Axiom 1 (Absorbing Nature of Infinities).

The infinities satisfy

  1. ;

  2. ;

  3. For all , ;

  4. For all , ;

  5. ’ is not defined.

Addition of games is defined as usual, apart from items 3 and 4. The fifth item is natural in terms of perfect play, since if  appears, then  cannot appear and vice versa.

The definitions of equality and partial order of games are based on the outcome diamond.

Definition 2 (Order and Equality of Games).

Let . Then, if, for every form , . Moreover if and .

Note that the exclusion of the infinities does not diminish the generality of the definition, but is necessary due to Axiom 5. As usual, we have the following observations. If then replacing by or by do not hurt the players under any circumstances. Similarly, if then replacing by does not hurt Left, and replacing by does not hurt Right.

Theorem 3.

Let . Then and .

Proof.

If then, by Axiom 3, . Hence, by Axiom 1, . Therefore, for every , we have , and so . Proving that is analogous. ∎

The concept of a check is fundamental to . Indeed, this is an alternative, and perhaps more explicit, at least for those Chess playing readers, term for an entailing move, as seen in the Introduction.

Definition 4 (Check Games).

Consider . If () then is a Left-check (Right-check). If is a Left-check or a Right-check then is a check. Denote by () a Left (Right) option of that is a Left-check (Right-check).

Of course, all checks are asymmetric, apart from the ‘trivial check’, . A player would not use this check, because the opponent ‘check mates’ by defending.

Definition 5 (Quiet Games).

Let . If () and is not a Left-check (Right-check) then is Left-quiet (Right-quiet). If is Left-quiet and Right-quiet then is quiet.

Definition 6 (Conway Forms and Games).

A game is a Conway form if , and has no checks as followers. Let denote the substructure of Conway forms. A game is a Conway game if it equals a Conway form.

Example 7.

The game is a Conway form (no checks as followers). The game is not a Conway form because there are checks as followers. However, later, we will see that . Therefore, is a Conway game.

In general, when we say form, we mean the literal form, and when we say game, we usually mean (any member in) the full equivalence class of games. When we write , we usually refer to the literal form, but the context may decide.

Some classical theorems are still available in .

Theorem 8 (Fundamental Theorem of Affine Normal Play).

If then if and only if .

Proof.

Assume that . We have , and so, by order of outcomes, .

Suppose now that . If , by Theorem 3, ; hence, assume . Let .

If, playing first, Left wins with the option , then she also wins with the option . Essentially, she mimics the strategy used when is played alone, answering locally when Right plays in . Due to the assumption , this is a winning strategy for Left in .

If Left, playing second, wins . Then, on , she can respond to each of Right’s moves locally, with a winning move on the same component, because . Thus Left can win playing second.

Therefore, and so, . ∎

Corollary 9 (Order-Outcome Bijection).

If then

  • if and only if ;

  • if and only if ;

  • if and only if ;

  • if and only if .

Proof.

The statement of Theorem 8 can equivalently be “ if and only if ”, so we can use that fact too.

Suppose that . By Theorem 8, . But, we cannot have , for otherwise and . Therefore, . Conversely, suppose that . By Theorem 8, we have . But, we cannot have , for otherwise , and . Hence, . Thus, the first equivalence holds.

The proof of the fourth equivalence is analogous.

For the second equivalence, if , then . So, .

The third equivalence is a consequence of eliminating all other possibilities. ∎

It is known that is a group. By Corollary 9 we may deduce that is only a monoid. Namely, if then, for any , (playing first, Left wins). Hence, for all , and is non-invertible. Thus, in general, the comparison of with cannot be done by playing the game ‘’, because, sometimes, ‘’ does not exist.

However, the following theorem shows that not everything is lost.

The conjugate of a given game switches roles of the players.

Definition 10 (Conjugate).

The conjugate of is

where denotes the set of literal forms , for , and similarly for .

Theorem 11.

If is a Conway game, then is invertible and .

Proof.

Suppose first that is a Conway form. If then , and thetheorem holds. Otherwise, let us verify that is a -position. If Left, playing first, chooses , because this game is not ( is not a check), Right can answer with and, by induction, because is a Conway form with no checks as followers, that option is equal to zero. Because of that, by Corollary 9, that option is a -position, and Right wins. Analogous arguments work for the other options of the first player, and so, is a -position. Again, by Corollary 9, .

Suppose now that is not a Conway form. Because it is a Conway game, by definition, it is equal to some . The first paragraph proved that . Also, by symmetry, is equal to . Therefore, implies . ∎

Lemma 12.

Let , and let be an invertible form of . Then

Proof.

() Consider any and let . Since is invertible, is neither nor , and so, is neither nor . Definition of order implies , that is . Thus, the arbitrariness of implies .

() Consider any and let ( is invertible, i.e. exists and ). Since is invertible, is neither nor , and so, is neither nor . By definition of order, , that is . Hence, , and so, given the arbitrariness of , . ∎

Theorem 13.

Let be any form of and suppose that is an invertible form of . Then,

Proof.

By Lemma 12, . Therefore, we have . By Theorem 8, this is the same as .

Finally, , by . ∎

Theorem 14.

Let be any form of and let be a Conway game. Then

  • if and only if

  • if and only if .

Proof.

These are direct consequences of Theorems 11 and 13. ∎

In a follow up paper [6], where we study the full game space , we provide a solution of the general case of .

3 Affine impartial theory

In order to propose an extension of the Sprague-Grundy theory, we first define the concept of an affine impartial game.666In terms of ruleset: here ‘affine impartial’ is an abbreviation of affine normal play impartial, in the sense that if the player to move cannot complete their move they lose. Of course, rulesets like nimstring should be impartial.

Definition 15 (Symmetric Game).

Consider a form . Then is symmetric if and .

Definition 16 (Affine Impartial).

A form is affine impartial if it is symmetric and all quiet followers of are symmetric. The subset of affine impartial games is .

Of course, a non-quiet game either has no option, or is a check, and so (unless a trivial check) is by definition asymmetric. But this is the only exception of symmetry in the world of affine impartial impartial games. It is easy to check that satisfies the standard closure properties of combinatorial games, i.e. closure of taking options, addition, and conjugates.

The following result must hold for any class of games that claims to be “impartial”.

Theorem 17 (Affine Impartial Outcomes).

If is a symmetric form, then .

Proof.

This proof uses a strategy-stealing argument. Suppose that . Then Left wins playing first with some option . Hence, by symmetry, Right wins playing first with . That contradicts . A similar argument holds against . ∎

We want to restrict our analysis to . Therefore, we define equality modulo .

Definition 18 (Impartial Equality).

Consider forms . Then, if, for every form , .

Observation 19.

Of course, in implies . The opposite direction is not true. We can have and in , if the there is no distinguishing game in . A simple example is and . As we will see, these games are indistinguishable modulo . However, the game distinguishes them in ; playing first, Left wins , but loses .

It is easy to verify if a form in equals a nimber.

Theorem 20 (Nimbers).

Let . Then, if and only if .

Proof.

Suppose that . By Theorem 14, modulo , and so .

Suppose now that . By Theorem 17, , since impartiality is closed under addition. If , then and , contradicting . Hence, . ∎

Notation 21.

Let denote the subset of affine impartial games that equal nimbers.

It is well-known that, in classical Combinatorial Game Theory, the impartial values are nimbers. We will prove that there is exactly one more value modulo , a game , called moon. In [3], volume 2, page 398, one can read “A loony move is one that loses for a player, no matter what other components are.”. The following general definition is motivated by that idea.

Definition 22 (Loony Game).

A game is loony if, for all quiet , .

Thus, in our interpretation, a ‘loony move’ exposes a loony game.

There are no loony games in . Suppose that is a loony game. Of course, and that is a contradiction. Suppose that is a loony game. In that case, if is large enough, , and that is a contradiction, since is quiet.

There are loony games in . The obvious one is , but we can also have impartial quiet loony moves. Consider and a quiet such that . If , the first player wins moving to . If , the first player wins moving to (Left) or to (Right).

Notation 23.

The moon is the game form .

When a player moves to , for any , he “goes to the moon” and loses.

Theorem 24 (Loony Uniqueness).

All loony games are equal modulo .

Proof.

Consider and , two loony games. We know that all quiet belong to . By definition of a loony game, we have and . On the other hand, if is not quiet then and , and hence and . In all cases, and the theorem holds. ∎

Observation 25.

Two loony games may be different modulo , but equal modulo . The games and are loony. These games are different modulo . Left, playing first, loses and wins . However, as will follow by theory developed here, one cannot distinguish these two games modulo .

In order to prove an affine impartial minimum excluded rule, we separate the options into two classes.

Definition 26 (Immediate Nimbers).

Let . The set of -immediate nimbers, denoted is the set .

Not that, by symmetry, , and note that .

Definition 27 (Protected Nimbers).

Conisder a game form . The set of -protected nimbers is

  1. , if ;

  2. , otherwise.

The second item says: if then if there is a check such that Right, playing first, loses . That is, playing first, Left is protected against those nimbers in a disjunctive sum.

Similar to Definition 26, we could have defined with respect to Right options, to obtain the same set.

Note that . This statement holds for the literal form . However, one can show that by using instead the form , as in (1), then . The output of “protected” is sensitive to which form we choose.

When the underlying game form is understood, we simply refer to the immediate and protected nimbers, respectively.

Example 28.

Let be such that the Left options are , , and . Of course, . On the other hand, playing first, Left can use the check to win . Because of that, . An important observation is that, although Left is protected against the nimber , Left cannot force a Left move to in . But if Right moves to 0, Left wins anyway

Sometimes, Right can manoeuvre Left’s eventual play to a nimber, or worse, via a sequence of ‘check upon check’.

Definition 29 (Manoeuvrable Form).

A quiet form is manoeuvrable if after each Left move that is neither a nimber nor , Right can force, with checks, a Left move to a nimber or a move by either player to .

Example 30.

The form is manoeuvrable. If Left avoids the immediate nimber , by checking, then Right can still force Left to move to one of the nimbers or .

Lemma 31.

If is manoeuvrable, then is finite.

Proof.

After a Left first move in , if needed, Right can force with checks a Left move to a nimber or a move by either player to . Let be the set of nimbers that can arise through this forcing strategy by Right. Then is finite, because we study short games. Let be a nimber such that, for all , we have . In , after a first check, say, to , Right forces with checks a move by either player to or a Left move to (). In the second case, after the sequence, Right wins with a TweedleDee-TweedleDum move. Thus, Left can protect against at most a finite number of nimbers. That explains why is finite in case of manoeuvrable games. ∎

Let denote the smallest nonnegative integer not in . Let denote the set of Sprague-Grundy values of a set of nimbers, i.e. if , then .

Lemma 32.

If is manoeuvrable then equals the nimber , where .

Proof.

By Lemma 31, we know that is finite. Let . Let us argue that the game . If the first player moves in to a nimber , because is excluded from , he loses. If the first player moves in to a quiet not nimber , because is not a nimber, (Theorem 20), and the first player also loses. If the first player moves in , giving a check, because is excluded from , he also loses. Finally, if the first player moves to (), because is the minimum excluded from , he loses because the opponent has a direct TweedleDee-TweedleDum move or wins with a check. Hence, by Theorem 20, . ∎

Lemma 33.

If are not nimbers, then .

Proof.

Consider . For a contradiction, assume that the sum of the birthdays, , is the smallest possible such that . Note that, by the assumptions on and , . Without loss of generality, we will analyze the move from to . First, we prove two claims that concern local play in and respectively.

Claim 1. Playing second in , Left can avoid Left moves to nimbers and moves by either player to until the first Right-quiet move.

Proof of Claim 1. Suppose that Right, playing first in , could force a Left move to a nimber or a move by either player to . If so, in , by giving checks in , Right could force some (Right’s turn) or a move by either player to

. Of course, the second situation would be a victory for Right. Regarding the first case, at that moment, the position would be

. And, because is not a nimber, by Theorem 20, we would have , which is a winning move for Right. In either case, Right, as first player, would win. That would contradict .

Claim 2. There is an such that Left can avoid Left moves to nimbers and moves by either player to , until the first Right-quiet move.

Proof of Claim 2. This is exactly the same as saying that is non-manoeuvrable. If it was manoeuvrable, by Lemma 32, it would be a nimber, and we would have a contradiction again.

Let us return to the move from to . Because , Right has a winning move from . But, by Claims 1 and 2, Left can play such that, at any stage before a Right-quiet move, Right is moving on , where is a follower of and is a follower of , such that neither nor is a nimber.

Either way, by assumption, there is a winning quiet Right-move or . Since these are impartial games, we must have or . But, because and are not nimbers, it follows by Theorem 20 that and are not nimbers.

Therefore, we have or with both components not nimbers. But this contradicts the smallest birthday assumption. The result follows. ∎

Theorem 34 (Affine Impartial Values).

Every affine impartial form equals a nimber or the game .

Proof.

Let . If there is some such that , then , by Theorem 20.

Suppose next that , for all , so that does not equal a nimber modulo . By Lemma 33, for all , we also have . Hence, for all , we have , and therefore is a loony game. Because, by Theorem 24, all loony games are equal modulo , and is a loony game, we have . ∎

Observation 35.

A form can be loony modulo and not loony modulo . An example is the form . This game is not loony modulo because, if , playing first, Left loses . However, . This follows, by Theorem 34, since does not equal any nimber; if Right starts , he wins, by an appropriate parity consideration.

Theorem 36.

The game is absorbing modulo , that is, , for all .

Proof.

Since , regardless of what is, the first player wins both and . Therefore, by definition of equality of games, . ∎

Corollary 37.

The game is an idempotent modulo , that is, .

Proof.

This is a trivial consequence of Theorem 36. ∎

Definition 38.

The Sprague-Grundy value of the moon is .

The following theorem explains how the Sparague-Grundy value of is determined by the set .

Theorem 39 (Affine Impartial Minimum Excluded Rule).

Let . We have the following possibilities:

  • If , then and ;

  • If , then .

Proof.

If , we have for all . Because of that, is not a nimber and, by Theorem 34, . If , we use the same argument of the proof of Lemma  32. ∎

Corollary 40.

If all the options of a game are quiet then is a nimber.

Proof.

If all the options of a game are quiet, then . Therefore, and, by Theorem 39, . ∎

4 Case study: nimstring

In the introduction, we promised to show that the following component equals .

Study the positions:

All (a), (b), (c), (d), and (e) are -positions. The game value of (f) is .

Other positions that equal  are the following.

In the position (l), the central horizontal move is the option (d), that is equal to . The other options are (f) and (g), that are equal to . Therefore, the literal form is

with , and . Applying the affine impartial minimum excluded rule, we conclude that the position is .

The position (m) is also equal to , i.e. .

Now, we are ready for (n), a more complex situation. The literal form is

that is,

Hence, , and . Applying the affine impartial minimum excluded rule, we conclude that the position is .

Going back to the original question, we have the following.

The form is , that is, . Here n represents a play of the top or bottom bar, m represents a play of some middle bar, and c represents play of the left line.

5 Case study: top entails

We denote by the literal form of a stack of size . The literal form of the Left removal of the top coin from a stack of size is (and the symmetric from Right’s point of view). With that in mind, let us compute the first few values. First, we do it the tedious way, and then later after Theorem 41, we propose the slick recursive way for a few more values, in a table format.

Of course, . The first player loses. Moreover,

  • . Therefore, and . Using the affine impartial minimum excluded rule, . In the next step, for ease, we will use the form .

  • . Therefore, and . Using the affine impartial minimum excluded rule, .

  • . This game is equal to . Therefore, and . Using the affine impartial minimum excluded rule, . In the next step, for ease, we will use the form .

  • . This game is equal to. Therefore, and . Using the affine impartial minimum excluded rule, .

  • . This game is equal to . Therefore, and . Using the affine impartial minimum excluded rule, .

  • . This game is equal to . Therefore, and . Using the affine impartial minimum excluded rule, .