
University of Wrocław Faculty of Mathematics and Computer Science Institute of Computer Science Doctoral Thesis General Game Description Languages Jakub Kowalski Supervisor: prof. Andrzej Kisielewicz Wrocław 2016 ii Abstract General Game Playing (GGP) is a field of Artificial Intelligence whose aim is to develop a system that can play a variety of games with previously unknown rules and without any human intervention. Using games as a testbed, GGP tries to construct universal algorithms that perform well in various situations and environments in order to achieve this aim. The core of GGP is the formalism describing the class of games that should be playable by the programs. The language used to encode game rules should be not only broad enough to provide an appropriate level of challenge, but also easily machine-processable and, if possible, human-readable. In this thesis, we advance the state-of-the-art research in the GGP area by investigating a few specific problems concerning general game description languages. We design new efficient algorithms for the task of learning the rules of chess-like games by observing play. Our experiments conducted on these algorithms show an increase in the quality of results compared to the existing approaches and a significant speedup of the learning process. Our contribution to the field of Procedural Content Generation is a formal method to evaluate the strategic properties of a given game. Based on that evaluation, we use an evolutionary approach to generate complete rules for some novel, non-trivial, and human-playable chess-like games. Further, we propose an extension of Stanford’s Game Description Language (GDL) that supports games with asymmetric player moves and time-dependent events. We present the semantics of this new extension and argue that it is the broadest general game description language described so far. We also develop an efficient GDL compiler, which enables faster computation of game states than other known approaches. Thus, it can be used to increase the quality of the GGP agents based on the Monte-Carlo Tree Search algorithm, which is the most effective search method applied in game playing in recent years. iii iv Streszczenie General Game Playing (GGP) jest dziedziną sztucznej inteligencji, której celem jest stworzenie uniwersalnego gracza – systemu zdolnego do autonomicznej gry w dowolną grę, której zasady poznaje bezpośrednio przed rozgrywką. Wykorzystując gry jako środowisko testowe, ogólnym zadaniem GGP jest stymulowanie rozwoju algorytmów, które umiałyby sobie radzić w różnorod- nych środowiskach i w nieprzewidzianych sytuacjach. Niezwykle ważnym elementem GGP jest formalizm opisujący klasę gier akceptowanych przez programy grające. Język powinien opisy- wać klasę gier dostatecznie obszerną, tak żeby wyzwanie miało odpowiedni stopień trudności, a równocześnie powinien być wygodny do przetwarzania maszynowego oraz w miarę czytelny dla człowieka. Rozprawa ta prezentuje nasz wkład w rozwój dziedziny GGP złożony z rezultatów badań nad kilkoma konkretnymi problemami dotyczącymi ogólnych języków opisu gier. Zaczynamy od przedstawienia nowego efektywnego algorytmu uczenia się zasad gier szachopo- dobnych na podstawie obserwacji przebiegu rozgrywek. Przeprowadzone eksperymenty wykazały poprawę rezultatów oraz znaczne przyspieszenie czasu obliczeń w porównaniu do istniejących roz- wiązań. Dalej prezentujemy nasz wkład do dziedziny proceduralnego generowania zawartości gry po- przez zdefiniowanie formalnej metody oceny strategicznych własności gier. Stworzony system umożliwił wygenerowanie nowych, nietrywialnych gier szachopodobnych, które nadają się rów- nież do grania przez ludzi. Kolejny przedstawiony w rozprawie rezultat to rozszerzenie języka Stanford’s Game Descrip- tion Language (GDL) umożliwiające definiowanie gier zawierających asymetryczne ruchy graczy oraz wydarzenia oparte o upływ czasu. Zdefiniowana została semantyka języka, a także po- kazano, że jest to najbardziej ogólny z dotychczas opublikowanych języków opisujących ogólne klasy gier. Zaprojektowaliśmy również efektywny kompilator języka GDL, pozwalający na szybsze obli- czanie kolejnych stanów gry niż w innych dotychczasowych podejściach. Dzięki temu może on być wykorzystany do podniesienia jakości programów-graczy GGP bazujących na algorytmie Monte Carlo Tree Search, który jest najbardziej efektywną metodą przeszukiwania wykorzystywaną w programach grających w ostatnim czasie. v Acknowledgments Primarily, I would like to express my gratitude to my supervisor prof. Andrzej Kisielewicz for his unwavering support whenever needed. This thesis is the result of his guidance, patience, and encouragement I received during the writing process and my research in general. I would also like to thank prof. Krzysztof Loryś, the director of the PhD studies and my Master Thesis supervisor, for his kind support and constantly watchful eye. I thank Marek Szykuła for fruitful collaboration and the time we spent together on numerous discussions. The research in this thesis was supported by the National Science Centre, Poland, under the project number 2014/13/N/ST6/01817. vii viii Contents 1 Introduction 1 1.1 The General Game Playing Problem . ..... 2 1.2 Contributions................................... ... 3 1.3 OverviewoftheThesis............................. .... 4 2 Preliminaries 5 2.1 GeneralizedChess-likeGames . ....... 5 2.1.1 Metagame.................................... 6 2.1.2 SimplifiedBoardgames. 10 2.2 Stanford’s General Game Playing . ....... 13 2.2.1 GDL....................................... 13 2.2.2 MethodsandResults............................. 16 2.2.3 GDL-II ..................................... 23 2.3 GeneralVideoGamePlaying . 26 2.3.1 Video Game Definition Language . 26 2.3.2 MethodsandResults............................. 28 2.4 OtherDomains .................................... 29 2.4.1 Strategy Game Description Language . ..... 29 2.4.2 Toss ....................................... 31 2.4.3 Card Game Description Language . 32 3 Learning 35 3.1 Preliminaries ................................... 35 3.1.1 LearningbyObserving. 36 3.1.2 RegularLanguageInference . 36 3.2 BoardgameRulesInference . ..... 37 3.2.1 ProblemStatementandModel . 37 3.2.2 Björnsson’s Algorithm Analysis . 38 3.2.3 RPNIAnalysis ................................. 42 3.3 EfficientConsistencyChecking . ...... 43 3.3.1 FastConsistencyCheck . 43 3.3.2 Fractional Acceptance Consistency Check . ........ 44 3.4 SpineCompactionAlgorithm . 45 3.4.1 Spines Selection and Pairs Selection . ....... 45 3.4.2 TheMainAlgorithm.............................. 46 3.5 Experiments and Empirical Evaluation . ......... 47 3.5.1 Games...................................... 48 3.5.2 Results ..................................... 48 3.6 Conclusions ..................................... 51 ix x CONTENTS 4 Generation 53 4.1 Procedural Content Generation in Games . ........ 53 4.1.1 PCGTechniques ................................ 54 4.1.2 Generation of Complete Games . 56 4.2 Evolving Chess-like Games Using Game Features . ......... 58 4.2.1 TheEvolutionarySystem . 58 4.2.2 ExperimentResults ............................. 61 4.2.3 Conclusions................................... 62 4.3 Evolving Chess-like Games Using Relative Algorithm Performance Profiles . 62 4.3.1 Relative Algorithm Performance Profiles . ....... 62 4.3.2 Method ..................................... 63 4.3.3 SelectionoftheModel . 65 4.3.4 EvolvingNewGames ............................. 68 4.3.5 Experiments .................................. 70 4.3.6 Conclusions................................... 72 5 Language Extension 75 5.1 FromGDLtortGDL.................................. 76 5.1.1 Formal Syntax Restrictions . 76 5.2 Semantics: A Game Model for rtGDL . 77 5.2.1 StateTransitionSystem . 78 5.3 ExecutionModel .................................. 79 5.3.1 Communication Protocol . 80 5.3.2 ModelAnalysis................................. 81 5.4 ExpressivenessofrtGDL. ..... 82 5.4.1 Examples .................................... 84 5.5 Real-time GDL with Imperfect Information . ......... 87 5.5.1 Nondeterminism ................................ 87 5.5.2 ImperfectInformation . 88 5.6 Conclusions ..................................... 88 6 Translations 91 6.1 EmbeddingCGDLintoGDL-II . 91 6.1.1 Card Game Description Language . 92 6.1.2 Translation ................................... 93 6.1.3 Translation Properties . 98 6.1.4 Summary .................................... 100 6.2 Comparing Stanford’s GGP and Simplified Boardgames . .......... 101 6.2.1 Reinforcement Learning in Boardgames . 101 6.2.2 ExperimentalSetup ............................. 103 6.2.3 Results ..................................... 105 6.2.4 Conclusions................................... 109 7 Compilation 111 7.1 FastReasoninginGDL .............................. 111 7.1.1 ReasonerImplementations. 112 7.2 GDLCompiler ..................................... 114 7.2.1 Calculating Domains and Flattening . 114 7.2.2 Predicates Dependency Graph and Layering . ....... 116 CONTENTS xi 7.2.3 Defining the Rules Computation Order . 117 7.2.4 FilterTrees ................................... 118 7.2.5 Data Structures for Containers . 119 7.2.6 FinalCodeGeneration. 121 7.3 ExperimentalResults. 121 7.4 Conclusions ..................................... 121 8 Discussion and Future Work 123 A Simplified Boardgames Grammar 127 B Evolved Simplified Boardgames 129 B.1 UsingGameFeatures................................ 129 B.2 Using Relative Algorithm Performance Profiles . ......... 130 C
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages167 Page
-
File Size-