Notes on Impartial Game Theory

Total Page:16

File Type:pdf, Size:1020Kb

Notes on Impartial Game Theory IMPARTIAL GAMES KENNETH MAPLES In the theory of zero-sum and general-sum games, we studied games where each player made their moves simultaneously. Equivalently, we can think of the moves of the alternate player as hidden until both have made their decision. In this part of the course, we will instead consider games that have complete information; that is, both players know the entire state of the game. This means that players move sequentially and there are no unknown or random factors in the game. We will first consider the theory of impartial games. An impartial game is one where two players move alternately according to a set of rules. If either player has no available moves when it is her turn, that player loses. We also require that both players have the same set of moves from a position. The theory of game of complete information where the players have different sets of moves available is called the theory of partizan games, which we will cover in the next week of the course. For our analysis the following definition is very convenient. Definition. An impartial game is a set. We will call the elements of a game A the options of the game, where they represent the resulting game after the move. Thus the game fg, denoting the empty set, is a game where the player-to-move loses, and the game ffgg, denoting a set containing the empty set, is a game where the player-to-move wins (as after her move, teh opponent is given a losing game). We will call any element A1 3 ⋅ ⋅ ⋅ 3 A of a finite sequence of options to be a position of the game. Equivalently, positions are games that are reachable in a finite number of moves from the given game. We will use the notion of set from the Zermelo-Fraenkel (ZF) theory. In particular, our games will obey the axiom of regularity which says that for every non-empty game A, there is an option B of A that is disjoint from A. This in particular implies that no option of a game is the game itself; i.e. there is no passing, and that there is not an infinite sequence of options A1 3 A2 3 A3 3 ⋅ ⋅ ⋅ that does not terminate. We would like our games to end! 1. Subtraction games and N/P positions The first type of game we will consider is the subtraction game. In this game, we have a pile of n stones where players alternate removing stones Date: 6/28/11. 1 2 KENNETH MAPLES from the pile. A legal move removes a number of stones that lies in the set S, where S is some (possibly infinite) set of allowed moves. For example, we could have the game where n = 4 and S = f1; 2; 3g. Then the first player has the option of removing one, two, or three stones from the pile, leaving three, two, and one, respectively. Then the second player could eliminate the pile (as in all three cases, the number of remaining stones lies in S), which would leave the first player with the game fg, a losing game. Thus the second player wins in each case. To make later analysis easier, we define a P-position to be one where the previous player has a winning strategy (or, if it is the first move of the game, the second player), and we define an N-position to be one where the next player has a winning strategy. Our theory of impartial games lets us cleanly split games into P-positions and N-positions. We first observe that we can deduce whether a game is an N-position or a P-position if we know whether all of its options are N-positions or P-positions. Proposition. A game G is an N-position if one of its options is a P- positions. A game G is a P-position if all of its (possibly empty) options are N-positions. Proof. If a game has a P-position, a winning strategy for the first player is to choose the option that makes the game a P-position. Likewise, if all options available to the current player are N-positions, the second player has a winning strategy regardless of the current player's choice. □ Note that fg is a P-position. Proposition. There is a unique labeling of the positions of a game into N-positions and P-positions. Proof. We know that fg is a P-position. For any game G, we can assume by induction and the axiom of regularity that it is known whether each of its options is an N-position or a P-position. But then Proposition 1 shows that the game must be either an N- or P-position. □ This is typical of the proofs we will employ: because we have an explicit hierarchy of games, we can prove statements for all games using induction. Now lets return to subtraction games. If we let (n) denote the subtrac- tion game on n stones with S = f2; 3; 4g (notice that S has changed!). Thus we have, for example, (7) = f(3); (4); (5)g. We can quickly compute which of (n) is N or P depending on the smaller values; see Table 1. Table 1 has a clear pattern: if n ≡ 0 or 1 mod 6 then (n) is a P-position, and otherwise it is an N-position. (Can you prove this?) 2. Nim, nimbers, and sums of games We will now consider the classic game of nim. Nim is a game played with several heaps of stones. On any turn, a player may choose one heap IMPARTIAL GAMES 3 Table 1. Some N and P values in the subtraction game with S = f2; 3; 4g (0) : P (6) : P (12) : P (1) : P (7) : P (13) : P (2) : N (8) : N (14) : N (3) : N (9) : N (15) : N (4) : N (10) : N (16) : N (5) : N (11) : N (17) : N and remove any number of stones from that heap, as long as she removes at least one. For example, if we have two heaps of size (3; 4), then the first player may remove 4 stones from the second heap and be left with one heap of size 3. This is not an advisable move: the opponent can immediately take all of the stones from the heap of size 3, and since there are no more stones remaining, the first player loses! In this section we will write (n1; :::; nk) to indicate a game of nim with k piles, where there are nj stones in the jth pile. We will have a much better notation by the end. In general, we define the sum of games G1 and G2 to be the game with options defined recursively by G1 + G2 = fA1 + G2;G1 + A2gA12G1;A22G2 Equivalently, each player chooses one of the games G1 and G2 and makes a single move on that game. Thus we can think of the general nim game (n1; :::; nk) as the sum of subtraction games, where the jth game has nj stones and S = f0; 1; 2; :::g = N. Before we can effectively analyze nim, we need to introduce new tools. We define the mex of a set of natural numbers to be the least natural number not contained in that set, i.e. mex(A) := min a ≥ 0 : a2 = A: For example, mex(1; 2; 3) = 0 and mex(0; 1; 3) = 2. We can then define the Grundy value G to be a function on games that assigns to any game A the value G(A) := mex(G(B) j B 2 A) i.e. the mex of the options of A. This function is well-defined: we can assume that G is defined for all options of A by induction, whence the mex is well-defined. We can find the Grundy value of a nim game (n) (i.e. a single pile with n stones) quickly enough: we have (n) = f(0); (1); :::; (n − 1)g, since the first player may remove any number of stones from the pile, so by induction we have G((n)) = n. At this point is is convenient to define new notation: we will define a finite nimber to be the Grundy value of a finite nim pile, and write ∗n for the value of the pile with n stones. We will also abbreviate 4 KENNETH MAPLES ∗0 = 0 and ∗1 = ∗. Thus we think of the Grundy value as being a nim pile and will henceforth always write Grundy values in the form ∗n. This is to prevent confusion when we introduce partizan games. Grundy values tell us whether a game is a win for the first or second player. Proposition. If A is a game with Grundy value G(A) = 0 then A is a P-position. If G(A) = ∗n for n 6= 0 then A is a N-position. Proof. We proceed by induction. For the empty game we have G(fg) = mex(fg) = 0 which verifies the Proposition. For a general game, if A is an N-position then A has an option B which is a P-position. By induction, G(B) = 0 so G(A) = mex(∗0; :::) 6= ∗0. Likewise, if A is a P-position then all of the options of A are N-positions, so by induction G(A) = mex(∗n1; n2; :::) where each nj 6= 0, hence G(A) = ∗0. □ Nimbers have an addition operation, which we will denote by + but some- times by +∗.
Recommended publications
  • Impartial Games
    Combinatorial Games MSRI Publications Volume 29, 1995 Impartial Games RICHARD K. GUY In memory of Jack Kenyon, 1935-08-26 to 1994-09-19 Abstract. We give examples and some general results about impartial games, those in which both players are allowed the same moves at any given time. 1. Introduction We continue our introduction to combinatorial games with a survey of im- partial games. Most of this material can also be found in WW [Berlekamp et al. 1982], particularly pp. 81{116, and in ONAG [Conway 1976], particu- larly pp. 112{130. An elementary introduction is given in [Guy 1989]; see also [Fraenkel 1996], pp. ??{?? in this volume. An impartial game is one in which the set of Left options is the same as the set of Right options. We've noticed in the preceding article the impartial games = 0=0; 0 0 = 1= and 0; 0; = 2: {|} ∗ { | } ∗ ∗ { ∗| ∗} ∗ that were born on days 0, 1, and 2, respectively, so it should come as no surprise that on day n the game n = 0; 1; 2;:::; (n 1) 0; 1; 2;:::; (n 1) ∗ {∗ ∗ ∗ ∗ − |∗ ∗ ∗ ∗ − } is born. In fact any game of the type a; b; c;::: a; b; c;::: {∗ ∗ ∗ |∗ ∗ ∗ } has value m,wherem =mex a;b;c;::: , the least nonnegative integer not in ∗ { } the set a;b;c;::: . To see this, notice that any option, a say, for which a>m, { } ∗ This is a slightly revised reprint of the article of the same name that appeared in Combi- natorial Games, Proceedings of Symposia in Applied Mathematics, Vol. 43, 1991. Permission for use courtesy of the American Mathematical Society.
    [Show full text]
  • Algorithmic Combinatorial Game Theory∗
    Playing Games with Algorithms: Algorithmic Combinatorial Game Theory∗ Erik D. Demaine† Robert A. Hearn‡ Abstract Combinatorial games lead to several interesting, clean problems in algorithms and complexity theory, many of which remain open. The purpose of this paper is to provide an overview of the area to encourage further research. In particular, we begin with general background in Combinatorial Game Theory, which analyzes ideal play in perfect-information games, and Constraint Logic, which provides a framework for showing hardness. Then we survey results about the complexity of determining ideal play in these games, and the related problems of solving puzzles, in terms of both polynomial-time algorithms and computational intractability results. Our review of background and survey of algorithmic results are by no means complete, but should serve as a useful primer. 1 Introduction Many classic games are known to be computationally intractable (assuming P 6= NP): one-player puzzles are often NP-complete (as in Minesweeper) or PSPACE-complete (as in Rush Hour), and two-player games are often PSPACE-complete (as in Othello) or EXPTIME-complete (as in Check- ers, Chess, and Go). Surprisingly, many seemingly simple puzzles and games are also hard. Other results are positive, proving that some games can be played optimally in polynomial time. In some cases, particularly with one-player puzzles, the computationally tractable games are still interesting for humans to play. We begin by reviewing some basics of Combinatorial Game Theory in Section 2, which gives tools for designing algorithms, followed by reviewing the relatively new theory of Constraint Logic in Section 3, which gives tools for proving hardness.
    [Show full text]
  • ES.268 Dynamic Programming with Impartial Games, Course Notes 3
    ES.268 , Lecture 3 , Feb 16, 2010 http://erikdemaine.org/papers/AlgGameTheory_GONC3 Playing Games with Algorithms: { most games are hard to play well: { Chess is EXPTIME-complete: { n × n board, arbitrary position { need exponential (cn) time to find a winning move (if there is one) { also: as hard as all games (problems) that need exponential time { Checkers is EXPTIME-complete: ) Chess & Checkers are the \same" computationally: solving one solves the other (PSPACE-complete if draw after poly. moves) { Shogi (Japanese chess) is EXPTIME-complete { Japanese Go is EXPTIME-complete { U. S. Go might be harder { Othello is PSPACE-complete: { conjecture requires exponential time, but not sure (implied by P 6= NP) { can solve some games fast: in \polynomial time" (mostly 1D) Kayles: [Dudeney 1908] (n bowling pins) { move = hit one or two adjacent pins { last player to move wins (normal play) Let's play! 1 First-player win: SYMMETRY STRATEGY { move to split into two equal halves (1 pin if odd, 2 if even) { whatever opponent does, do same in other half (Kn + Kn = 0 ::: just like Nim) Impartial game, so Sprague-Grundy Theory says Kayles ≡ Nim somehow { followers(Kn) = fKi + Kn−i−1;Ki + Kn−i−2 j i = 0; 1; :::;n − 2g ) nimber(Kn) = mexfnimber(Ki + Kn−i−1); nimber(Ki + Kn−i−2) j i = 0; 1; :::;n − 2g { nimber(x + y) = nimber(x) ⊕ nimber(y) ) nimber(Kn) = mexfnimber(Ki) ⊕ nimber(Kn−i−1); nimber(Ki) ⊕ nimber(Kn−i−2) j i = 0; 1; :::n − 2g RECURRENCE! | write what you want in terms of smaller things Howe do w compute it? nimber(K0) = 0 (BASE CASE) nimber(K1) = mexfnimber(K0) ⊕ nimber(K0)g 0 ⊕ 0 = 0 = 1 nimber(K2) = mexfnimber(K0) ⊕ nimber(K1); 0 ⊕ 1 = 1 nimber(K0) ⊕ nimber(K0)g 0 ⊕ 0 = 0 = 2 so e.g.
    [Show full text]
  • Combinatorial Game Theory
    Combinatorial Game Theory Aaron N. Siegel Graduate Studies MR1EXLIQEXMGW Volume 146 %QIVMGER1EXLIQEXMGEP7SGMIX] Combinatorial Game Theory https://doi.org/10.1090//gsm/146 Combinatorial Game Theory Aaron N. Siegel Graduate Studies in Mathematics Volume 146 American Mathematical Society Providence, Rhode Island EDITORIAL COMMITTEE David Cox (Chair) Daniel S. Freed Rafe Mazzeo Gigliola Staffilani 2010 Mathematics Subject Classification. Primary 91A46. For additional information and updates on this book, visit www.ams.org/bookpages/gsm-146 Library of Congress Cataloging-in-Publication Data Siegel, Aaron N., 1977– Combinatorial game theory / Aaron N. Siegel. pages cm. — (Graduate studies in mathematics ; volume 146) Includes bibliographical references and index. ISBN 978-0-8218-5190-6 (alk. paper) 1. Game theory. 2. Combinatorial analysis. I. Title. QA269.S5735 2013 519.3—dc23 2012043675 Copying and reprinting. Individual readers of this publication, and nonprofit libraries acting for them, are permitted to make fair use of the material, such as to copy a chapter for use in teaching or research. Permission is granted to quote brief passages from this publication in reviews, provided the customary acknowledgment of the source is given. Republication, systematic copying, or multiple reproduction of any material in this publication is permitted only under license from the American Mathematical Society. Requests for such permission should be addressed to the Acquisitions Department, American Mathematical Society, 201 Charles Street, Providence, Rhode Island 02904-2294 USA. Requests can also be made by e-mail to [email protected]. c 2013 by the American Mathematical Society. All rights reserved. The American Mathematical Society retains all rights except those granted to the United States Government.
    [Show full text]
  • Crash Course on Combinatorial Game Theory
    CRASH COURSE ON COMBINATORIAL GAME THEORY ALFONSO GRACIA{SAZ Disclaimer: These notes are a sketch of the lectures delivered at Mathcamp 2009 containing only the definitions and main results. The lectures also included moti- vation, exercises, additional explanations, and an opportunity for the students to discover the patterns by themselves, which is always more enjoyable than merely reading these notes. 1. The games we will analyze We will study combinatorial games. These are games: • with two players, who take turns moving, • with complete information (for example, there are no cards hidden in your hand that only you can see), • deterministic (for example, no dice or flipped coins), • guaranteed to finish in a finite amount of time, • without loops, ties, or draws, • where the first player who cannot move loses. In this course, we will specifically concentrate on impartial combinatorial games. Those are combinatorial games in which the legal moves for both players are the same. 2. Nim Rules of nim: • We play with various piles of beans. • On their turn, a player removes one or more beans from the same pile. • Final position: no beans left. Notation: • A P-position is a \previous player win", e.g. (0,0,0), (1,1,0). • An N-position is a \next player win", e.g. (1,0,0), (2,1,0). We win by always moving onto P-positions. Definition. Given two natural numbers a and b, their nim-sum, written a ⊕ b, is calculated as follows: • write a and b in binary, • \add them without carrying", i.e., for each position digit, 0 ⊕ 0 = 1 ⊕ 1 = 0, 0 ⊕ 1 = 1 ⊕ 0 = 1.
    [Show full text]
  • New Results for Domineering from Combinatorial Game Theory Endgame Databases
    New Results for Domineering from Combinatorial Game Theory Endgame Databases Jos W.H.M. Uiterwijka,∗, Michael Bartona aDepartment of Knowledge Engineering (DKE), Maastricht University P.O. Box 616, 6200 MD Maastricht, The Netherlands Abstract We have constructed endgame databases for all single-component positions up to 15 squares for Domineering. These databases have been filled with exact Com- binatorial Game Theory (CGT) values in canonical form. We give an overview of several interesting types and frequencies of CGT values occurring in the databases. The most important findings are as follows. First, as an extension of Conway's [8] famous Bridge Splitting Theorem for Domineering, we state and prove another theorem, dubbed the Bridge Destroy- ing Theorem for Domineering. Together these two theorems prove very powerful in determining the CGT values of large single-component positions as the sum of the values of smaller fragments, but also to compose larger single-component positions with specified values from smaller fragments. Using the theorems, we then prove that for any dyadic rational number there exist single-component Domineering positions with that value. Second, we investigate Domineering positions with infinitesimal CGT values, in particular ups and downs, tinies and minies, and nimbers. In the databases we find many positions with single or double up and down values, but no ups and downs with higher multitudes. However, we prove that such single-component ups and downs easily can be constructed, in particular that for any multiple up n·" or down n·# there are Domineering positions of size 1+5n with these values. Further, we find Domineering positions with 11 different tinies and minies values.
    [Show full text]
  • Theory of Impartial Games
    Theory of Impartial Games February 3, 2009 Introduction Kinds of Games We’ll Discuss Much of the game theory we will talk about will be on combinatorial games which have the following properties: • There are two players. • There is a finite set of positions available in the game (only on rare occasions will we mention games with infinite sets of positions). • Rules specify which game positions each player can move to. • Players alternate moving. • The game ends when a player can’t make a move. • The game eventually ends (it’s not infinite). Today we’ll mostly talk about impartial games. In this type of game, the set of allowable moves depends only on the position of the game and not on which of the two players is moving. For example, Nim, sprouts, and green hackenbush are impartial, while games like GO and chess are not (they are called partisan). 1 SP.268 - The Mathematics of Toys and Games The Game of Nim We first look at the simple game of Nim, which led to some of the biggest advances in the field of combinatorial game theory. There are many versions of this game, but we will look at one of the most common. How To Play There are three piles, or nim-heaps, of stones. Players 1 and 2 alternate taking off any number of stones from a pile until there are no stones left. There are two possible versions of this game and two corresponding winning strategies that we will see. Note that these definitions extend beyond the game of Nim and can be used to talk about impartial games in general.
    [Show full text]
  • WINNING DOTS-AND-BOXES in TWO and THREE DIMENSIONS By
    WINNING DOTS-AND-BOXES IN TWO AND THREE DIMENSIONS by Abel Romer Submitted in partial fulfillment of the requirements for the Degree of Bachelor of Arts and Sciences Quest University Canada and pertaining to the Question What makes simple complicated? May 3, 2017 Glen Van Brummelen, Ph.D. Abel Emanuel Romer ABSTRACT This paper is divided into three sections. The first section provides basic grounding and mathematical theory behind the children's game of Dots-and- Boxes. It covers basic concepts in combinatorial game theory, including the game of Nim and nimbers, other simple games and the Sprague-Grundy Theorem. We then provide an overview of how these concepts are applied to the game of Dots-and-Boxes, and end with a description of the current mathematical theory on the game. The second section describes the author's design of a Java computer program to play Dots-and-Boxes. Similarly to chess, most Dots-and-Boxes games remain unsolved due to their enormous number of possible game states. This section addresses potential remedies to this time-space problem, and describes their implementation in the author's program. The third section extends the game of Dots-and-Boxes to three- dimensional space and examines three possible ways to play. For each of these cases, the author develops basic equivalencies to the existing strategies for two-dimensional Dots-and-Boxes and examines any significant differences between the games. 1 CONTENTS 1 Combinatorial Game Theory 4 1.1 The Basics . .4 1.2 Impartial Games . .9 1.3 The Sprague-Grundy Theorem . 11 1.4 Two More Complicated Games .
    [Show full text]
  • Models of Combinatorial Games and Some Applications: a Survey
    Journal of Game Theory 2016, 5(2): 27-41 DOI: 10.5923/j.jgt.20160502.01 Models of Combinatorial Games and Some Applications: A Survey Essam El-Seidy, Salah Eldin S. Hussein, Awad Talal Alabdala* Department of Mathematics, Faculty of Science, Ain Shams University, Cairo, Egypt Abstract Combinatorial game theory is a vast subject. Over the past forty years it has grown to encompass a wide range of games. All of those examples were short games, which have finite sub-positions and which prohibit infinite play. The combinatorial theory of short games is essential to the subject and will cover half the material in this paper. This paper gives the reader a detailed outlook to most combinatorial games, researched until our current date. It also discusses different approaches to dealing with the games from an algebraic perspective. Keywords Game theory, Combinatorial games, Algebraic operations on Combinatorial games, The chessboard problems, The knight’s tour, The domination problem, The eight queens problem ([35]). 1. Historical Background The solution of the game of “NIM” in 1902, by Bouton at Harvard, is now viewed as the birth of combinatorial game Games have been recorded throughout history but the theory. In the 1930s, Sprague and Grundy extended this systematic application of mathematics to games is a theory to cover all impartial games. In the 1970s, the theory relatively recent phenomenon. Gambling games gave rise to was extended to a large collection of games called “Partisan studies of probability in the 16th and 17th century. What has Games”, which includes the ancient Hawaiian game called become known as Combinatorial Game Theory was not “Konane”, many variations of “Hacken-Bush”, “Cut-Cakes”, ‘codified’ until 1976-1982 with the publications of “On “Ski-Jumps”, “Domineering”, “Toads-and-Frogs”, etc.… It Numbers and Games” by John H.
    [Show full text]
  • Combinatorial Games on Graphs
    Combinatorial Games on Graphs Éric SOPENA LaBRI, Bordeaux University France 6TH POLISH COMBINATORIAL CONFERENCE September 19-23, 2016 Będlewo, Poland Let’s first play... Take your favorite graph, e.g. Petersen graph. On her turn, each player chooses a vertex and deletes its closed neighbourhood... The first player unable to move looses the game... Éric Sopena – 6PCC’16 2 Let’s first play... Take your favorite graph, e.g. Petersen graph. On her turn, each player chooses a vertex and deletes its closed neighbourhood... Would you prefer to be the first player? the second player? Éric Sopena – 6PCC’16 3 Let’s first play... Take your favorite graph, e.g. Petersen graph. On her turn, each player chooses a vertex and deletes its closed neighbourhood... Would you prefer to be the first player? the second player? Éric Sopena – 6PCC’16 4 Let’s first play... Take your favorite graph, e.g. Petersen graph. On her turn, each player chooses a vertex and deletes its closed neighbourhood... Would you prefer to be the first player? the second player? Éric Sopena – 6PCC’16 5 Let’s first play... Suppose now that the initial graph is the complete graph Kn on n vertices... Would you prefer to be the first player? the second player? Of course, the first player always wins... And if the initial graph is the path Pn on n vertices? Would you prefer to be the first player? the second player? Hum hum... seems not so easy... In that case, the first player looses if and only if either • n = 4, 8, 14, 20, 24, 28, 34, 38, 42, or • n > 51 and n 4, 8, 20, 24, 28 (mod 34).
    [Show full text]
  • ES.268 Theory of Impartial Games, Slides 1
    ES.268 – The Mathematics of Toys and Games 1 Class Overview Instructors: Jing Li (class of '11, course 14 and 18C) Melissa Gymrek (class of '11, course 6 and 18) Supervisor: Professor Erik Demaine (Theory of Computation group at CSAIL) Requirements: Weekly attendance is mandatory! Occasional Readings Final projects 2 Topics Theory of Impartial Games Surreal Numbers Linear Algebra and Monopoly Algorithms/Complexity of Games Dynamic Programming Artificial Intelligence Topics Rubik's Cube and Group Theory Probability Topics Games on Graphs NP-complete games Card Games Constraint Logic Theory Conway's Game of Life 3 Theory of Impartial Games Much of the game theory we will talk about will involve combinatorial games, which have the following properties: There are two players There is a finite set of positions available in the game Players alternate turns The game ends when a player can't make a move The game eventually ends (not infinite) 4 Types of Games Today's topic is impartial games: The set of allowable moves depends only on the positions of the game and not on which of the two players is moving Example impartial games: Jenga, Nim, sprouts, green hackenbush In partisan games, the available moves depend on which player is moving. (GO, checkers, chess) 5 The Game of Nim Much of the foundations for combinatorial game theory came from analyzing the game of Nim Here we use Nim to learn about types of game positions, nimbers, and to lead into an important combinatorial game theory theorem 6 Nim: How to Play The game begins with 3 (or n) piles, or nim- heaps of stones (or coins, or popsicle sticks...) Players 1 and 2 alternate taking off any number of stones from a pile until there are no stones left.
    [Show full text]
  • Exact and Monte-Carlo Algorithms for Combinatorial Games
    Exact and Monte-Carlo algorithms for combinatorial games Anders Leino February 24, 2014 Abstract This thesis concerns combinatorial games and algorithms that can be used to play them. Basic definitions and results about combinatorial games are covered, and an implementation of the minimax algorithm with alpha-beta pruning is presented. Following this, we give a description and implementation of the common UCT (Upper Confidence bounds applied to Trees) variant of MCTS (Monte-Carlo tree search). Then, a framework for testing the behavior of UCT as first player, at various numbers of iterations (namely 2,7, . 27), versus minimax as second player, is described. Finally, we present the results obtained by applying this framework to the 2.2 million smallest non-trivial positional games having winning sets of size either 2 or 3. It is seen that on almost all different classifications of the games studied, UCT converges quickly to near-perfect play. Supervisor: Klas Markstr¨om Department of Mathematics and Mathematical Statistics Ume˚aUniversity 1 Exakta och Monte-Carlo algoritmer f¨orkombinatoriska spel Denna rapport handlar om kombinatoriska spel och algoritmer som kan anv¨andasf¨oratt spela dessa. Grundl¨aggandedefinitioner och resultat som ber¨orkombinatoriska spel t¨acks, och en implementation av minimax-algoritmen med alpha-beta besk¨arning ges. Detta f¨oljsav en beskrivning samt en imple- mentation av UCT varianten av MCTS (Monte-Carlo tree search). Sedan beskrivs ett ramverk f¨oratt testa beteendet f¨orUCT som f¨orstaspelare, vid olika antal iterationer (n¨amligen2, 7, . 27), mot minimax som andra spelare. Till sist beskrivs resultaten vi funnit genom att anv¨andadetta ramverk f¨oratt spela de 2,2 miljoner minsta icke triviala positionella spelen med vinstm¨angder av storlek antingen 2 eller 3.
    [Show full text]