Symbolic Search in Planning and General Game Playing

Total Page:16

File Type:pdf, Size:1020Kb

Symbolic Search in Planning and General Game Playing Symbolic Search in Planning and General Game Playing Peter Kissmann Dissertation zur Erlangung des Grades eines Doktors der Ingenieurwissenschaften – Dr.-Ing. – Vorgelegt im Fachbereich 3 (Mathematik und Informatik) der Universitat¨ Bremen im Mai 2012 ii Gutachter: Prof. Dr. Stefan Edelkamp Universitat¨ Bremen Prof. Dr. Malte Helmert Universitat¨ Basel Datum des Kolloquiums: 17. September 2012 Contents Acknowledgements vii Zusammenfassung ix 1 Introduction 1 1.1 Motivation . .1 1.2 State Space Search . .3 1.3 Binary Decision Diagrams and Symbolic Search . .4 1.4 Action Planning . .5 1.5 General Game Playing . .6 1.6 Running Example . .8 I Binary Decision Diagrams9 2 Introduction to Binary Decision Diagrams 11 2.1 The History of BDDs . 12 2.2 Efficient Algorithms for BDDs . 13 2.2.1 Reduce . 13 2.2.2 Apply . 14 2.2.3 Restrict, Compose, and Satisfy . 14 2.3 The Variable Ordering . 15 3 Symbolic Search 19 3.1 Forward Search . 20 3.2 Backward Search . 21 3.3 Bidirectional Search . 22 4 Limits and Possibilities of BDDs 23 4.1 Exponential Lower Bound for Permutation Games . 24 4.1.1 The Sliding Tiles Puzzle . 24 4.1.2 Blocksworld . 24 4.2 Polynomial Upper Bounds . 27 4.2.1 Gripper . 27 4.2.2 Sokoban . 30 4.3 Polynomial and Exponential Bounds for Connect Four . 31 4.3.1 Polynomial Upper Bound for Representing Reachable States . 32 4.3.2 Exponential Lower Bound for the Termination Criterion . 35 4.3.3 Experimental Evaluation . 37 4.4 Conclusions and Future Work . 37 iii iv CONTENTS II Action Planning 41 5 Introduction to Action Planning 43 5.1 Planning Tracks . 44 5.2 The Planning Domain Definition Language PDDL . 44 5.2.1 The History of PDDL . 45 5.2.2 Structure of a PDDL Description . 47 6 Classical Planning 53 6.1 Step-Optimal Classical Planning . 54 6.1.1 Symbolic Breadth-First Search . 54 6.1.2 Symbolic Bidirectional Breadth-First Search . 55 6.2 Cost-Optimal Classical Planning . 56 6.2.1 Running Example with General Action Costs . 57 6.2.2 Symbolic Dijkstra Search . 58 6.2.3 Symbolic A* Search . 61 6.3 Heuristics for Planning . 66 6.3.1 Pattern Databases . 67 6.3.2 Partial Pattern Databases . 73 6.4 Implementation and Improvements . 74 6.4.1 Replacing the Matrix . 75 6.4.2 Reordering the Variables . 76 6.4.3 Incremental Abstraction Calculation . 78 6.4.4 Amount of Bidirection . 78 6.5 International Planning Competitions (IPCs) and Experimental Evaluation . 79 6.5.1 IPC 2008: Participating Planners . 80 6.5.2 IPC 2008: Results . 82 6.5.3 Evaluation of the Improvements of Gamer . 82 6.5.4 IPC 2011: Participating Planners . 85 6.5.5 IPC 2011: Results . 87 7 Net-Benefit Planning 91 7.1 Running Example in Net-Benefit Planning . 92 7.2 Related Work in Over-Subscription and Net-Benefit Planning . 94 7.3 Finding an Optimal Net-Benefit Plan . 95 7.3.1 Breadth-First Branch-and-Bound . 96 7.3.2 Cost-First Branch-and-Bound . 97 7.3.3 Net-Benefit Planning Algorithm . 98 7.4 Experimental Evaluation . 100 7.4.1 IPC 2008: Participating Planners . 100 7.4.2 IPC 2008: Results . 100 7.4.3 Improvements of Gamer . 101 III General Game Playing 105 8 Introduction to General Game Playing 107 8.1 The Game Description Language GDL . 108 8.1.1 The Syntax of GDL . 109 8.1.2 Structure of a General Game . 110 8.2 Differences between GDL and PDDL . 113 8.3 Comparison to Action Planning . 114 CONTENTS v 9 Instantiating General Games 117 9.1 The Instantiation Process . 118 9.1.1 Normalization . 118 9.1.2 Supersets . 119 9.1.3 Instantiation . 123 9.1.4 Mutex Groups . 124 9.1.5 Removal of Axioms . 126 9.1.6 Output . 126 9.2 Experimental Evaluation . 128 10 Solving General Games 133 10.1 Solved Games . 134 10.2 Single-Player Games . 141 10.3 Non-Simultaneous Two-Player Games . 143 10.3.1 Two-Player Zero-Sum Games . 143 10.3.2 General Non-Simultaneous Two-Player Games . 144 10.3.3 Layered Approach to General Non-Simultaneous Two-Player Games . 147 10.4 Experimental Evaluation . 150 10.4.1 Single-Player Games . 150 10.4.2 Two-Player Games . 153 11 Playing General Games 157 11.1 The Algorithm UCT . 158 11.1.1 UCB1 . 158 11.1.2 Monte-Carlo Search . 159 11.1.3 UCT . 159 11.1.4 UCT Outside General Game Playing . 160 11.1.5 Parallelization of UCT . 163 11.2 Other General Game Players . 165 11.2.1 Evaluation Function Based Approaches . 165 11.2.2 Simulation Based Approaches . 168 11.3 The Design of the General Game Playing Agent Gamer . 171 11.3.1 The GGP Server . 171 11.3.2 The Communicators . 172 11.3.3 The Instantiators . ..
Recommended publications
  • Paper and Pencils for Everyone
    (CM^2) Math Circle Lesson: Game Theory of Gomuku and (m,n,k-games) Overview: Learning Objectives/Goals: to expose students to (m,n,k-games) and learn the general history of the games through out Asian cultures. SWBAT… play variations of m,n,k-games of varying degrees of difficulty and complexity as well as identify various strategies of play for each of the variations as identified by pattern recognition through experience. Materials: Paper and pencils for everyone Vocabulary: Game – we will create a working definition for this…. Objective – the goal or point of the game, how to win Win – to do (achieve) what a certain game requires, beat an opponent Diplomacy – working with other players in a game Luck/Chance – using dice or cards or something else “random” Strategy – techniques for winning a game Agenda: Check in (10-15min.) Warm-up (10-15min.) Lesson and game (30-45min) Wrap-up and chill time (10min) Lesson: Warm up questions: Ask these questions after warm up to the youth in small groups. They may discuss the answers in the groups and report back to you as the instructor. Write down the answers to these questions and compile a working definition. Try to lead the youth so that they do not name a specific game but keep in mind various games that they know and use specific attributes of them to make generalizations. · What is a game? · Are there different types of games? · What make something a game and something else not a game? · What is a board game? · How is it different from other types of games? · Do you always know what your opponent (other player) is doing during the game, can they be sneaky? · Do all of games have the same qualities as the games definition that we just made? Why or why not? Game history: The earliest known board games are thought of to be either ‘Go’ from China (which we are about to learn a variation of), or Senet and Mehen from Egypt (a country in Africa) or Mancala.
    [Show full text]
  • Bibliography of Traditional Board Games
    Bibliography of Traditional Board Games Damian Walker Introduction The object of creating this document was to been very selective, and will include only those provide an easy source of reference for my fu- passing mentions of a game which give us use- ture projects, allowing me to find information ful information not available in the substan- about various traditional board games in the tial accounts (for example, if they are proof of books, papers and periodicals I have access an earlier or later existence of a game than is to. The project began once I had finished mentioned elsewhere). The Traditional Board Game Series of leaflets, The use of this document by myself and published on my web site. Therefore those others has been complicated by the facts that leaflets will not necessarily benefit from infor- a name may have attached itself to more than mation in many of the sources below. one game, and that a game might be known Given the amount of effort this document by more than one name. I have dealt with has taken me, and would take someone else to this by including every name known to my replicate, I have tidied up the presentation a sources, using one name as a \primary name" little, included this introduction and an expla- (for instance, nine mens morris), listing its nation of the \families" of board games I have other names there under the AKA heading, used for classification. and having entries for each synonym refer the My sources are all in English and include a reader to the main entry.
    [Show full text]
  • Ai12-General-Game-Playing-Pre-Handout
    Introduction GDL GGP Alpha Zero Conclusion References Artificial Intelligence 12. General Game Playing One AI to Play All Games and Win Them All Jana Koehler Alvaro´ Torralba Summer Term 2019 Thanks to Dr. Peter Kissmann for slide sources Koehler and Torralba Artificial Intelligence Chapter 12: GGP 1/53 Introduction GDL GGP Alpha Zero Conclusion References Agenda 1 Introduction 2 The Game Description Language (GDL) 3 Playing General Games 4 Learning Evaluation Functions: Alpha Zero 5 Conclusion Koehler and Torralba Artificial Intelligence Chapter 12: GGP 2/53 Introduction GDL GGP Alpha Zero Conclusion References Deep Blue Versus Garry Kasparov (1997) Koehler and Torralba Artificial Intelligence Chapter 12: GGP 4/53 Introduction GDL GGP Alpha Zero Conclusion References Games That Deep Blue Can Play 1 Chess Koehler and Torralba Artificial Intelligence Chapter 12: GGP 5/53 Introduction GDL GGP Alpha Zero Conclusion References Chinook Versus Marion Tinsley (1992) Koehler and Torralba Artificial Intelligence Chapter 12: GGP 6/53 Introduction GDL GGP Alpha Zero Conclusion References Games That Chinook Can Play 1 Checkers Koehler and Torralba Artificial Intelligence Chapter 12: GGP 7/53 Introduction GDL GGP Alpha Zero Conclusion References Games That a General Game Player Can Play 1 Chess 2 Checkers 3 Chinese Checkers 4 Connect Four 5 Tic-Tac-Toe 6 ... Koehler and Torralba Artificial Intelligence Chapter 12: GGP 8/53 Introduction GDL GGP Alpha Zero Conclusion References Games That a General Game Player Can Play (Ctd.) 5 ... 18 Zhadu 6 Othello 19 Pancakes 7 Nine Men's Morris 20 Quarto 8 15-Puzzle 21 Knight's Tour 9 Nim 22 n-Queens 10 Sudoku 23 Blob Wars 11 Pentago 24 Bomberman (simplified) 12 Blocker 25 Catch a Mouse 13 Breakthrough 26 Chomp 14 Lights Out 27 Gomoku 15 Amazons 28 Hex 16 Knightazons 29 Cubicup 17 Blocksworld 30 ..
    [Show full text]
  • A Scalable Neural Network Architecture for Board Games
    A Scalable Neural Network Architecture for Board Games Tom Schaul, Jurgen¨ Schmidhuber Abstract— This paper proposes to use Multi-dimensional II. BACKGROUND Recurrent Neural Networks (MDRNNs) as a way to overcome one of the key problems in flexible-size board games: scalability. A. Flexible-size board games We show why this architecture is well suited to the domain There is a large variety of board games, many of which and how it can be successfully trained to play those games, even without any domain-specific knowledge. We find that either have flexible board dimensions, or have rules that can performance on small boards correlates well with performance be trivially adjusted to make them flexible. on large ones, and that this property holds for networks trained The most prominent of them is the game of Go, research by either evolution or coevolution. on which has been considering board sizes between the min- imum of 5x5 and the regular 19x19. The rules are simple[5], I. INTRODUCTION but the strategies deriving from them are highly complex. Players alternately place stones onto any of the intersections Games are a particularly interesting domain for studies of the board, with the goal of conquering maximal territory. of machine learning techniques. They form a class of clean A player can capture a single stone or a connected group and elegant environments, usually described by a small set of his opponent’s stones by completely surrounding them of formal rules and clear success criteria, and yet they often with his own stones. A move is not legal if it leads to a involve highly complex strategies.
    [Show full text]
  • A Scalable Neural Network Architecture for Board Games
    A Scalable Neural Network Architecture for Board Games Tom Schaul, Jurgen¨ Schmidhuber Abstract— This paper proposes to use Multi-dimensional II. BACKGROUND Recurrent Neural Networks (MDRNNs) as a way to overcome one of the key problems in flexible-size board games: scalability. A. Flexible-size board games We show why this architecture is well suited to the domain There is a large variety of board games, many of which and how it can be successfully trained to play those games, even without any domain-specific knowledge. We find that either have flexible board dimensions, or have rules that can performance on small boards correlates well with performance be trivially adjusted to make them flexible. on large ones, and that this property holds for networks trained The most prominent of them is the game of Go, research by either evolution or coevolution. on which has been considering board sizes between the min- imum of 5x5 and the regular 19x19. The rules are simple[4], I. INTRODUCTION but the strategies deriving from them are highly complex. Players alternately place stones onto any of the intersections Games are a particularly interesting domain for studies of of the board, with the goal of conquering maximal territory. machine learning techniques. They form a class of clean and A player can capture a single stone or a connected group elegant environments, usually described by a small set of of his opponent’s stones by completely surrounding them formal rules, have very clear success criteria, and yet they with his own stones. A move is not legal if it leads to a often involve highly complex strategies.
    [Show full text]
  • Chapter 6 Two-Player Games
    Introduction to Using Games in Education: A Guide for Teachers and Parents Chapter 6 Two-Player Games There are many different kinds of two-person games. You may have played a variety of these games such as such as chess, checkers, backgammon, and cribbage. While all of these games are competitive, many people play them mainly for social purposes. A two-person game environment is a situation that facilitates communication and companionship. Two major ideas illustrated in this chapter: 1. Look ahead: learning to consider what your opponent will do as a response to a move that you are planning. 2. Computer as opponent. In essence, this makes a two-player game into a one- player game. In addition, we will continue to explore general-purpose, high-road transferable, problem-solving strategies. Tic-Tac-Toe To begin, we will look at the game of tic-tac-toe (TTT). TTT is a two-player game, with players taking turns. One player is designated as X and the other as O. A turn consists of marking an unused square of a 3x3 grid with one’s mark (an X or an O). The goal is to get three of one’s mark in a file (vertical, horizontal, or diagonal). Traditionally, X is the first player. A sample game is given below. Page 95 Introduction to Using Games in Education: A Guide for Teachers and Parents X X X O X O Before X's O's X's game first first second begins move move move X X X X O X X O X O O O X O X O X O X O X O O's X's O's X wins on second third third X's fourth move move move move Figure 6.1.
    [Show full text]
  • Ultimate Tic-Tac-Toe
    ULTIMATE TIC-TAC-TOE Scott Powell, Alex Merrill Professor: Professor Christman An algorithmic solver for Ultimate Tic-Tac-Toe May 2021 ABSTRACT Ultimate Tic-Tac-Toe is a deterministic game played by two players where each player’s turn has a direct effect on what options their opponent has. Each player’s viable moves are determined by their opponent on the previous turn, so players must decide whether the best move in the short term actually is the best move overall. Ultimate Tic-Tac-Toe relies entirely on strategy and decision-making. There are no random variables such as dice rolls to interfere with each player’s strategy. This is rela- tively rare in the field of board games, which often use chance to determine turns. Be- cause Ultimate Tic-Tac-Toe uses no random elements, it is a great choice for adversarial search algorithms. We may use the deterministic aspect of the game to our advantage by pruning the search trees to only contain moves that result in a good board state for the intelligent agent, and to only consider strong moves from the opponent. This speeds up the efficiency of the algorithm, allowing for an artificial intelligence capable of winning the game without spending extended periods of time evaluating each potential move. We create an intelligent agent capable of playing the game with strong moves using adversarial minimax search. We propose novel heuristics for evaluating the state of the game at any given point, and evaluate them against each other to determine the strongest heuristics. TABLE OF CONTENTS 1 Introduction1 1.1 Problem Statement............................2 1.2 Related Work...............................3 2 Methods6 2.1 Simple Heuristic: Greedy.........................6 2.2 New Heuristic...............................7 2.3 Alpha- Beta- Pruning and Depth Limit.................
    [Show full text]
  • Inventaire Des Jeux Combinatoires Abstraits
    INVENTAIRE DES JEUX COMBINATOIRES ABSTRAITS Ici vous trouverez une liste incomplète des jeux combinatoires abstraits qui sera en perpétuelle évolution. Ils sont classés par ordre alphabétique. Vous avez accès aux règles en cliquant sur leurs noms, si celles-ci sont disponibles. Elles sont parfois en anglais faute de les avoir trouvées en français. Si un jeu vous intéresse, j'ai ajouté une colonne « JOUER EN LIGNE » où le lien vous redirigera vers le site qui me semble le plus fréquenté pour y jouer contre d'autres joueurs. J'ai remarqué 7 catégories de ces jeux selon leur but du jeu respectif. Elles sont décrites ci-dessous et sont précisées pour chaque jeu. Ces catégories sont directement inspirées du livre « Le livre des jeux de pions » de Michel Boutin. Si vous avez des remarques à me faire sur des jeux que j'aurai oubliés ou une mauvaise classification de certains, contactez-moi via mon blog (http://www.papatilleul.fr/). La définition des jeux combinatoires abstraits est disponible ICI. Si certains ne répondent pas à cette définition, merci de me prévenir également. LES CATÉGORIES CAPTURE : Le but du jeu est de capturer ou de bloquer un ou plusieurs pions en particulier. Cette catégorie se caractérise souvent par une hiérarchie entre les pièces. Chacune d'elle a une force et une valeur matérielle propre, résultantes de leur capacité de déplacement. ELIMINATION : Le but est de capturer tous les pions de son adversaire ou un certain nombre. Parfois, il faut capturer ses propres pions. BLOCAGE : Il faut bloquer son adversaire. Autrement dit, si un joueur n'a plus de coup possible à son tour, il perd la partie.
    [Show full text]
  • CONNECT6 I-Chen Wu1, Dei-Yen Huang1, and Hsiu-Chen Chang1
    234 ICGA Journal December 2005 NOTES CONNECT6 1 1 1 I-Chen Wu , Dei-Yen Huang , and Hsiu-Chen Chang Hsinchu, Taiwan ABSTRACT This note introduces the game Connect6, a member of the family of the k-in-a-row games, and investigates some related issues. We analyze the fairness of Connect6 and show that Connect6 is potentially fair. Then we describe other characteristics of Connect6, e.g., the high game-tree and state-space complexities. Thereafter we present some threat-based winning strategies for Connect6 players or programs. Finally, the note describes the current developments of Connect6 and lists five new challenges. 1. INTRODUCTION Traditionally, the game k-in-a-row is defined as follows. Two players, henceforth represented as B and W, alternately place one stone, black and white respectively, on one empty square2 of an m × n board; B is assumed to play first. The player who first obtains k consecutive stones (horizontally, vertically or diagonally) of his own colour wins the game. Recently, Wu and Huang (2005) presented a new family of k-in-a-row games, Connect(m,n,k,p,q), which are analogous to the traditional k-in-a-row games, except that B places q stones initially and then both W and B alternately place p stones subsequently. The additional parameter q is a key that significantly influences the fairness. The games in the family are also referred to as Connect games. For simplicity, Connect(k,p,q) denotes the games Connect(∞,∞,k,p,q), played on infinite boards. A well-known and popular Connect game is five-in-a-row, also called Go-Moku.
    [Show full text]
  • Gomoku-Narabe" (五 目 並 べ, "Five Points in a Row"), the Game Is Quite Ancient
    Gomoku (Japanese for "five points") or, as it is sometimes called, "gomoku-narabe" (五 目 並 べ, "five points in a row"), the game is quite ancient. The birthplace of Gomoku is considered to be China, the Yellow River Delta, the exact time of birth is unknown. Scientists name different dates, the oldest of which is the 20th century BC. All this allows us to trace the history of similar games in Japan to about 100 AD. It was probably at this time that the pebbles played on the islands from the mainland. - presumably in 270 AD, with Chinese emigrants, where they became known under different names: Nanju, Itsutsu-ishi (old-time "five stones"), Goban, Goren ("five in a row") and Goseki ("five stones "). In the first book about the Japanese version of the game "five-in-a-row", published in Japan in 1858, the game is called Kakugo (Japanese for "five steps). At the turn of the 17th-18th centuries, it was already played by everyone - from old people to children. Players take turns taking turns. Black is the first to go in Renju. Each move the player places on the board, at the point of intersection of the lines, one stone of his color. The winner is the one who can be the first to build a continuous row of five stones of the same color - horizontally, vertically or diagonally. A number of fouls - illegal moves - have been determined for the player who plays with black. He cannot build "forks" 3x3 and 4x4 and a row of 6 or more stones, as well as any forks with a multiplicity of more than two.
    [Show full text]
  • Knots, Molecules, and the Universe: an Introduction to Topology
    KNOTS, MOLECULES, AND THE UNIVERSE: AN INTRODUCTION TO TOPOLOGY AMERICAN MATHEMATICAL SOCIETY https://doi.org/10.1090//mbk/096 KNOTS, MOLECULES, AND THE UNIVERSE: AN INTRODUCTION TO TOPOLOGY ERICA FLAPAN with Maia Averett David Clark Lew Ludwig Lance Bryant Vesta Coufal Cornelia Van Cott Shea Burns Elizabeth Denne Leonard Van Wyk Jason Callahan Berit Givens Robin Wilson Jorge Calvo McKenzie Lamb Helen Wong Marion Moore Campisi Emille Davie Lawrence Andrea Young AMERICAN MATHEMATICAL SOCIETY 2010 Mathematics Subject Classification. Primary 57M25, 57M15, 92C40, 92E10, 92D20, 94C15. For additional information and updates on this book, visit www.ams.org/bookpages/mbk-96 Library of Congress Cataloging-in-Publication Data Flapan, Erica, 1956– Knots, molecules, and the universe : an introduction to topology / Erica Flapan ; with Maia Averett [and seventeen others]. pages cm Includes index. ISBN 978-1-4704-2535-7 (alk. paper) 1. Topology—Textbooks. 2. Algebraic topology—Textbooks. 3. Knot theory—Textbooks. 4. Geometry—Textbooks. 5. Molecular biology—Textbooks. I. Averett, Maia. II. Title. QA611.F45 2015 514—dc23 2015031576 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 select pages 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. Permissions to reuse portions of AMS publication content are handled by Copyright Clearance Center’s RightsLink service.
    [Show full text]
  • RENJU for BEGINNERS Written by Mr. Alexander NOSOVSKY and Mr
    RENJU FOR BEGINNERS written by Mr. Alexander NOSOVSKY and Mr. Andrey SOKOLSKY NEW REVISED EDITION 4 9 2 8 6 1 X 7 Y 3 5 10 1999 PREFACE This excellent book on Renju for beginners written by Mr Alexander Nosovsky and Mr Andrey Sokolsky was the first reference book for the former USSR players for a long time. As President of the RIF (The Renju International Federation) I am very glad that I can introduce this book to all the players around the world. Jonkoping, January 1990 Tommy Maltell President of RIF PREFACE BY THE AUTHORS The rules of this game are much simpler, than the rules of many other logical games, and even children of kindergarten age can study a simple variation of it. However, Renju does not yield anything in the number of combinations, richness in tactical and strategical ideas, and, finally, in the unexpectedness and beauty of victories to the more popular chess and checkers. A lot of people know a simple variation of this game (called "five-in-a-row") as a fascinating method to spend their free time. Renju, in its modern variation, with simple winnings prohibited for Black (fouls 3x3, 4x4 and overline ) becomes beyond recognition a serious logical-mind game. Alexander Nosovsky Vice-president of RIF Former two-times World Champion in Renju by mail. Andrey Sokolsky Former vice-president of RIF . CONTENTS CHAPTER 1. INTRODUCTION. 1.1 The Rules of Renju . 1.2 From the History and Geography of Renju . CHAPTER 2. TERMS AND DEFINITIONS . 2.1 Accessories of the game .
    [Show full text]