Impartial Games. Lemma: In any finite impartial game G, either Player 1 has a winning strategy, or Player 2 has.

Similar documents
OPTION-CLOSED GAMES RICHARD J. NOWAKOWSKI AND PAUL OTTAWAY

Introduction to Combinatorial Game Theory

Toppling Conjectures

Misère canonical forms of partizan games

SUMBERS SUMS OF UPS AND DOWNS. Kuo-Yuan Kao National Penghu Institute of Technology, Taiwan. Abstract

Wen An Liu College of Mathematics and Information Science, Henan Normal University, Xinxiang, P.R. China

Binary dicots, a core of dicot games

PARTIAL NIM. Chu-Wee Lim Department of Mathematics, University of California Berkeley, Berkeley, CA , USA.

PLAYING END-NIM WITH A MULLER TWIST

AN INTRODUCTION TO CONWAY S GAMES AND NUMBERS

arxiv: v2 [math.co] 9 Aug 2011

TEMPERATURE THEORY AND THE THERMOSTATIC STRATEGY

Combinatorial Games, Theory and Applications. Brit C. A. Milvang-Jensen

#G03 INTEGERS 10 (2010), MIN, A COMBINATORIAL GAME HAVING A CONNECTION WITH PRIME NUMBERS

Some Results on Combinatorial Game Theory. Saúl A. Blanco Rodríguez

Theoretical Computer Science

The Reduced Canonical Form of a Game

Combinatorial Game Theory, Well-Tempered Scoring Games, and a Knot Game

IMPARTIAL COMBINATORIAL MISÈRE GAMES

Poset-Game Periodicity

IMPROVEMENTS ON CHOMP. Xinyu Sun Department of Mathematics, Temple University, Philadelphia, PA 19122, USA.

arxiv: v1 [math.co] 27 Aug 2015

Dicots, and a taxonomic ranking for misère games

Geometrical extensions of Wythoff s game

At the start of the term, we saw the following formula for computing the sum of the first n integers:

COMPUTER-ASSISTED AND COMPUTER-GENERATED RESEARCH IN COMBINATORIAL GAMES AND PATTERN-AVOIDANCE

One Pile Nim with Arbitrary Move Function

COMBINATORIAL GAMES AND SURREAL NUMBERS

Math576: Combinatorial Game Theory Lecture note IV

A misère-play -operator

Ordinal Partizan End Nim

7.5 Taking-and-Breaking Games

Single Pile (Move Size) Dynamic Blocking Nim

arxiv: v1 [math.co] 21 Sep 2015

Aperiodic Subtraction Games

The key is that there are two disjoint populations, and everyone in the market is on either one side or the other

arxiv: v1 [math.co] 18 May 2018

Analysis of odd/odd vertex removal games on special graphs

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 1

Reduced Canonical Forms of Stoppers

Greedy Codes. Theodore Rice

MATH4250 Game Theory 1. THE CHINESE UNIVERSITY OF HONG KONG Department of Mathematics MATH4250 Game Theory

SF2972 Game Theory Exam with Solutions March 15, 2013

Hot Games and Theory. * G n * B n. * G n * C n

Chapter 2. Mathematical Reasoning. 2.1 Mathematical Models

Uncertainty. Michael Peters December 27, 2013

Algorithms for quantum computers. Andrew Childs Department of Combinatorics & Optimization and Institute for Quantum Computing University of Waterloo

Guaranteed Scoring Games

1 Proof by Contradiction

Who Wins Domineering on Rectangular Boards?

Slow k-nim. Vladimir Gurvich a

Champion Spiders in the Game of Graph Nim

This article appeared in a journal published by Elsevier. The attached copy is furnished to the author for internal non-commercial research and

Mathematical Olympiad for Girls

The domination game played on unions of graphs

A Family of Nim-Like Arrays: The Locator Theorem

Sprague-Grundy Values of the R-Wythoff Game

AN UPDATE ON DOMINEERING ON RECTANGULAR BOARDS

CSC304 Lecture 5. Game Theory : Zero-Sum Games, The Minimax Theorem. CSC304 - Nisarg Shah 1

On Aperiodic Subtraction Games with Bounded Nim Sequence

#G4 INTEGERS 15 (2015) IMPARTIAL CHOCOLATE BAR GAMES

Abstract. We dene the family of locally path-bounded digraphs, which is a

2.1 Definition. Let n be a positive integer. An n-dimensional vector is an ordered list of n real numbers.

, p 1 < p 2 < < p l primes.

arxiv: v2 [math.co] 23 Mar 2012

Graph Theory. Thomas Bloom. February 6, 2015

Institute for Applied Information Processing and Communications (IAIK) Secure & Correct Systems. Decidability

We set up the basic model of two-sided, one-to-one matching

arxiv: v2 [math.co] 19 May 2017

PS2 - Comments. University of Virginia - cs3102: Theory of Computation Spring 2010

Independent Events. The multiplication rule for independent events says that if A and B are independent, P (A and B) = P (A) P (B).

SF2972 Game Theory Written Exam with Solutions June 10, 2011

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 3

Lecture 2: Connecting the Three Models

2. Syntactic Congruences and Monoids

POLYNOMIAL SPACE QSAT. Games. Polynomial space cont d

Combinatorial Game Complexity: An Introduction with Poset Games

Modal Dependence Logic

Atomic Weight Calculus of Subversion

CONSTRUCTION OF THE REAL NUMBERS.

Theorem 1. Every P -position of the game can be written in the form (T n ; m 1 ; : : : ; m k?1 ), where the (k? 1)-tuples (m 1 ; : : : ; m k?1 ) range

Final Examination. Adrian Georgi Josh Karen Lee Min Nikos Tina. There are 12 problems totaling 150 points. Total time is 170 minutes.

ALGEBRA. 1. Some elementary number theory 1.1. Primes and divisibility. We denote the collection of integers

Nondeterministic finite automata

Pistol-Dueling and the Thue-Morse Sequence

Notes on induction proofs and recursive definitions

Introducing Proof 1. hsn.uk.net. Contents

10 Propositional logic

IMPARTIAL CHOCOLATE BAR GAMES WITH A PASS. Ryohei Miyadera Kwansei Gakuin, Hyogo, Japan Maakito Inoue.

Dean Thomas Allemang Trinity College. Machine Computation with Finite Games

Prompt. Commentary. Mathematical Foci

Variants of the Game of Nim that have Inequalities as Conditions

COFINITE INDUCED SUBGRAPHS OF IMPARTIAL COMBINATORIAL GAMES: AN ANALYSIS OF CIS-NIM

Reductions of partizan games

A four parametric generalization of the Wythoff NIM and its recursive solution

Math 300 Introduction to Mathematical Reasoning Autumn 2017 Inverse Functions

CMPSCI 250: Introduction to Computation. Lecture 11: Proof Techniques David Mix Barrington 5 March 2013

Lecture 8 : Structural Induction DRAFT

Math 016 Lessons Wimayra LUY

ECO 199 GAMES OF STRATEGY Spring Term 2004 Precepts Week 7 March Questions GAMES WITH ASYMMETRIC INFORMATION QUESTIONS

Transcription:

1 Impartial Games An impartial game is a two-player game in which players take turns to make moves, and where the moves available from a given position don t depend on whose turn it is. A player loses if they can t make a move on their turn (i.e. a player wins if they move to a position from which no move is possible). In games which are not impartial, the two players take on different roles (e.g. one controls white pieces and the other black), so the moves available in a given position depend on whose turn it is. Before we treat these more complicated games, we first consider the special case of impartial games. Any nim position is an impartial game. Write n for the nim position with a single heap of size n. In particular, 0 is the zero game, written 0: the player to move immediately loses. We consider a position in a game as a game in itself. We can specify a game by giving the set of its options - the games to which the first player can move. e.g. 0 =, 1 = {0}, n = { 0, 1, 2,..., (n 1)}. For impartial games G and H, G + H is the game where the two games are played side-by-side, with a player on their turn getting to decide which of the two to move in. So e.g. 2 + 2 + 3 is the nim position with two heaps of size 2 and one of size 3. If G = {G 1,..., G n } and H = {H 1,..., H n }, then G + H = {G 1 + H,..., G n + H, G + H 1,..., G + H n }. Remark: G + H = H + G (G + H) + K = G + (H + K) We refer to the player who is to move first as Player 1, and their opponent as Player 2. So after a move, Player 1 in the new game was Player 2 in the original game, and vice versa. The finite (or short) games are defined recursively by: 0 is finite if G 1,..., G n are finite, then {G 1,..., G n } is finite. In any finite impartial game G, either Player 1 has a winning strategy, or Player 2 has.

2 We say that G is a first/second-player win accordingly, and that the outcome of G is a win for Player 1/2. Suppose inductively that the lemma holds for all options of G. If some option of G is a win for Player 2, then Player 1 can win in G by making that move. Else, Player 2 can win in G, since they have a winning strategy in whatever game Player 1 moves to. Green Hackenbush A green hackenbush game consists of some dots joined by lines, with some dots on the ground ; a move comprises deleting a line, and then deleting all lines which are no longer connected to the ground. Example: / \ \ / / \ / \ / \ / \ \ / / \ / \ / \ = {,,,, } \ / \ / \ / / \ \ / \ / \ / \ / / \ \ / / \ \ / \ / \ \ / \ = {,,, } / / / / / / / / P + Q = [picture where we draw P and Q side by side, with no connections between them]

3 Equivalence of impartial games Definition: Two games G and H are equivalent, G H, if for any game K, G + K has the same outcome as H + K. Remark: If G H then G has the same outcome as H; 0 + G G; if G H then G + K H + K for any K. G 0 iff G is a second-player win. : If G 0, then G = G + 0 has the same outcome as 0 + 0 = 0, which is a second-player win. : Suppose G is a second player win, and K is any game. We want to show G + K has the same outcome as 0 + K = K. The following is a winning strategy in G + K for whichever player has the winning strategy in K: On our turn, play the next move in the winning strategy for K, unless our opponent just played in G - then play the next move in the winning strategy for G as Player 2. Example: G + G 0 Indeed, the second player wins by mirroring any move made in one copy of G in the other copy of G. G + H 0 iff G H If G H, then G + H G + G 0 by the above example. If G + H 0, then G = G + 0 G + H + H 0 + H = H.

4 Confirm, by finding a winning strategy for Player 2 in the sum, that / \ == 1 / \ \ / \ / Remark: One easily checks that games with equivalent options are equivalent, i.e. if G i G i, then {G 1,..., G n } {G 1,..., G n}. From now on, we will just write = in place of - we are only interested in games up to equivalence. Our winning strategy for nim tells us how to add nim heaps: Proposition: n + m = (n m) n m (n m) = 0, so as we proved when discussing Nim, n + m + (n m) is a second-player win. It follows that every nim game is equivalent to a single heap, with size the nim sum of the sizes of the heaps in the original game. Example: \ \ / \ / = 1 + 3 = (1 (+) 3) = 2 / \ / \ / \ /

5 Impartial games are secret heaps Now we show that not only every Nim game, but every impartial game is equivalent to a Nim heap. Theorem [Sprague-Grundy]: Any finite impartial game G is equivalent to a nim heap; G = n where n is the smallest non-negative integer such that G has no option equivalent to n. Suppose inductively that the theorem holds for all options of G. We show that we can win in G + n as the second player. If Player 1 moves in n, say to m with m < n, then by definition of n we can move in G to a game equivalent to m, yielding a game equivalent to m + m = 0. So we win. If Player 1 moves in G, picking an option G i of G, then by the inductive hypothesis, G i is equivalent to some m. So we have to win as first player in m + n, but by definition of n, m n, so m + n = (m n) 0. Again, we win.

6 Confirm by using the Sprague-Grundy theorem that / \ = 1 / \ \ / \ / By using the Sprague-Grundy theorem to find the nim heaps equivalent to each component, and then applying the winning strategy from nim, find a winning move for the first player in the following Green Hackenbush game. / \ \ / / \ / \ \ / / \ ----- \ / \ / \ / \ /

7 Bonus: Games Now, we consider dropping the impartiality condition. A (combinatorial) game is played by two players, Left and Right, taking turns. A player who can t move loses. A game is given by the moves available to Left (Left-options) and to Right (Right-options). We write G = {L 1,..., L n R 1,..., R m } for the game with Left-options L i and Right-options R i, which are themselves games. Finiteness is defined as in the impartial case. A game is impartial iff the set of Right-options is equal to the set of Leftoptions, and all options are impartial. Real-life games Chess nearly fits into this framework - but it s possible for the game to end in a draw, which we haven t allowed in our formalism, and it isn t finite. Go fits even better, though rare loopy situations make it technically infinite. Some other games of variable notoriety which fit, at least roughly, our definition of a game: draughts/chequers, pente, gess, khet, dots-and-boxes, sprouts, connect 4, gomoku, tic-tac-toe, hex, Y, shogi, xiàngqí, hnefatafl. See https://en.wikipedia.org/wiki/list of abstract strategy games for many more. Red-Blue Hackenbush Like Green Hackenbush, but each line is either red or blue. Only Right can cut Red lines, only Left can cut blue lines. Domineering Played on an 8x8 (say) chess board; players take turns to place 2x1 dominoes on free squares. Left places her dominoes vertically, Right places his horizontally. Basic theory We still have the impartial games n, n = { 0, 1,..., (n 1) 0, 1,..., (n 1)}. We call these nimbers. We write for 1 = {0 0}.

8 G + H is the game where players choose which of G and H to move in; Left plays as Left in both, Right as Right in both. Outcomes: Now there are four possibilities: Right wins (whoever moves first); Left wins (whoever moves first); Player 1 (whether that s Left or Right) wins; Player 2 (whether that s Left or Right) wins. Determine the outcomes of these four basic domineering games: We define equivalence ( G = H ) as in the impartial case, but with this notion of outcome. By the same arguments as in the impartial case, we have: G = 0 iff G is a second-player win. Definition: The negative of a game G = {L 1,..., L n R 1,..., R m } is the game G in which Left and Right switch roles, i.e. G := { R 1,..., R m L 1,..., L n }. Note that G is impartial iff G = G. Write G H for G + ( H). G G = G + ( G) is a second-player win, by mirroring moves made in one component in the other. Just as in the impartial case, we have G H = 0 iff G = H

9 If G = H, then G H = H H = 0. If G H = 0, then G = G + 0 = G + H H = G H + H = 0 + H = H. Definition: For games G and H, we say G > H if G H is a win for Left; G < H if G H is a win for Right; G = H if G H is a win for Player 2; G H ( G is confused with H ) if G H is a win for Player 1. is a partial order, and addition respects it, i.e. G H G + K H + K. Numbers 1 = {0 }, 2 = {1 }, 3 = {2 }, etc. So 1 = { 0}, 2 = { 1}, 3 = { 2}, etc. 1 2 = {0 1}. By e.g. considering the following red-blue hackenbush position (L means blue, R means Red), prove 1 2 + 1 2 1 = 0 R R L L R 1 = {0 1}. 4 2

10 Confirm that R 1 R = - 4 L Generally, we can define 1 1 = {0 }. 2 n+1 2 n and then for m N, m = m 1 1 = [the sum of m copies of 2 n 2 m n = (m 1 ) 2 n 2 n 2 n ] Definition: A finite game is a number if it is equivalent to one of these games m 2 n m Z, n N). (with The usual ordering on numbers agrees with the definition of < for games. If G is a finite game, and every Left-option is less than every Right-option, then G is the simplest number m which is greater than every Left-option 2 n and less than every Right-option, where m is simpler than m if n < n, or if n = n and m < m. 2 n 2 n We show m 2 n G = 0. Say Left plays first. If she plays in G, it is to a number k with k > m 2 n, so Right wins the resulting game m 2 n k. If she plays in m 2 n, it follows from the definitions (exercise) that it must be to a simpler number k < m 2 n. So since m is simplest, 2 n k must be less than some Left-option H of G. So Right can play the Right-option H of G, and win the resulting game k H.

11 Use this lemma to confirm the following values of domineering games: 1-1 3 = - = - = - 2 2 4 The usual addition of numbers agrees with addition of games. Confirm, both by using addition and by thinking through strategies, that = 0 More on Domineering Confirm = = { 1 1 } = 1 + There is however much more to games than numbers and nimbers. Consider = { 1-1 } =: +/- 1 Whoever moves in this game gets a free move for their efforts. Confirm that for a number x, ±1 > x if x < 1, ±1 < x if x > 1, ±1 x if 1 x 1.

12 Games like ±1, where there is an advantage to moving, are called hot games. For a positive number x, define ±x := {x x}. These games are called switches. If x and y are numbers with x y, then {x y} = x+y ± x y. 2 2 Example: = { 2-1/2 } = 3/4 +/- 5/4. Roughly, it is sound strategy to play in the hottest component first. Certainly this is true of games which are sums of switches, numbers and nimbers: on your turn, you should play in the largest switch if there is one, else if there are impartial components you should use the nim strategy to deal with them, and finally you should (always) only play in a number if there s nothing else left. This advice is far from being enough to let you win any domineering game (it s actually a hard game, tournaments have been played), but it s a start! See pp114-121 of On Numbers and Games for much more on Domineering. Further reading The classic texts are E. Berlekamp, J. Conway, and R. Guy, Winning Ways for your Mathematical Plays, vol 1 ; John Conway, On Numbers and Games. There are also two more recent books, M. Albert, R. Nowakowski, D. Wolfe, Lessons in Play: An Introduction to Combinatorial Game Theory ; Aaron Siegel, Combinatorial Game Theory.