ebook img

Artificial Intelligence and Games PDF

385 Pages·2017·4.06 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Artificial Intelligence and Games

Arti(cid:12)cial IntelligenTce and F Games A (Second Public Draft) R D Georgios N. Yannakakis and Julian Togelius June 27, 2017 2 T F A R D Contents I Background 11 1 Introduction 13 1.1 This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 T 1.1.1 Why Did we Write this Book? . . . . . . . . . . . . . 15 1.1.2 Who Should Read this Book? . . . . . . . . . . . . . . 16 1.1.3 A Short Note on Terminology . .F. . . . . . . . . . . . 17 1.2 A Brief History of Arti(cid:12)cial Intelligence and Games. . . . . . 18 1.2.1 Academia . . . . . . . . . A. . . . . . . . . . . . . . . . 21 1.2.2 Industry . . . . . . . . . . . . . . . . . . . . . . . . . . 22 1.2.3 The \Gap" . . . . . . . . . . . . . . . . . . . . . . . . 24 1.3 Why Games for Arti(cid:12)cial IRntelligence . . . . . . . . . . . . . . 26 1.3.1 Games are Hard and Interesting Problems . . . . . . . 26 1.3.2 Rich Human Computer Interaction . . . . . . . . . . . 29 D 1.3.3 Games are Popular . . . . . . . . . . . . . . . . . . . . 29 1.3.4 There Are Challenges for All AI Areas . . . . . . . . . 31 1.3.5 Games Best Realize Long-Term Goals of AI . . . . . . 32 1.4 Why Arti(cid:12)cial Intelligence for Games . . . . . . . . . . . . . . 35 1.4.1 AI Plays and Improves your Game . . . . . . . . . . . 35 1.4.2 More Content, Better Content . . . . . . . . . . . . . 36 1.4.3 Player Experience and Behavioral Data Analytics. . . 36 1.5 Structure of This Book . . . . . . . . . . . . . . . . . . . . . . 37 1.5.1 What We (Don’t) Cover in this Book . . . . . . . . . 38 1.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 2 AI Methods 41 2.1 General Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 2.1.1 Representation . . . . . . . . . . . . . . . . . . . . . . 43 2.1.2 Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 2.1.3 Learning = Maximize Utility(Representation) . . . . . 44 2.2 Ad-Hoc Behavior Authoring . . . . . . . . . . . . . . . . . . . 45 2.2.1 Finite State Machines . . . . . . . . . . . . . . . . . . 45 2.2.2 Behavior Trees . . . . . . . . . . . . . . . . . . . . . . 47 2.2.3 Utility-Based AI . . . . . . . . . . . . . . . . . . . . . 49 3 4 CONTENTS 2.2.4 Further Reading . . . . . . . . . . . . . . . . . . . . . 52 2.3 Tree Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 2.3.1 Uninformed Search . . . . . . . . . . . . . . . . . . . . 52 2.3.2 Best-(cid:12)rst Search . . . . . . . . . . . . . . . . . . . . . 53 2.3.3 Minimax . . . . . . . . . . . . . . . . . . . . . . . . . 55 2.3.4 Monte Carlo Tree Search . . . . . . . . . . . . . . . . 58 2.3.5 Further Reading . . . . . . . . . . . . . . . . . . . . . 61 2.4 Evolutionary Computation . . . . . . . . . . . . . . . . . . . 62 2.4.1 Local Search . . . . . . . . . . . . . . . . . . . . . . . 63 2.4.2 Evolutionary Algorithms . . . . . . . . . . . . . . . . . 65 2.4.3 Further Reading . . . . . . . . . . . . . . . . . . . . . 71 2.5 Supervised Learning . . . . . . . . . . . . . . . . . . . . . . . 71 2.5.1 Arti(cid:12)cial Neural Networks . . . . . . . . . . . . . . . . 73 2.5.2 Support Vector Machines . . .T. . . . . . . . . . . . . 80 2.5.3 Decision Tree Learning. . . . . . . . . . . . . . . . . . 83 2.5.4 Further Reading . . . . . . . . . . . . . . . . . . . . . 86 F 2.6 Reinforcement learning . . . . . . . . . . . . . . . . . . . . . . 87 2.6.1 Core Concepts and a High-Level Taxonomy . . . . . . 88 2.6.2 Q-learning . . . .A. . . . . . . . . . . . . . . . . . . . . 90 2.6.3 Further reading . . . . . . . . . . . . . . . . . . . . . . 92 2.7 Unsupervised learning . . . . . . . . . . . . . . . . . . . . . . 92 R 2.7.1 Clustering . . . . . . . . . . . . . . . . . . . . . . . . . 93 2.7.2 Frequent Pattern Mining . . . . . . . . . . . . . . . . 96 2.7.3 FuDrther Reading . . . . . . . . . . . . . . . . . . . . . 98 2.8 Notable Hybrid Algorithms . . . . . . . . . . . . . . . . . . . 98 2.8.1 Neuroevolution . . . . . . . . . . . . . . . . . . . . . . 99 2.8.2 TD Learning with ANN Function Appoximators . . . 101 2.8.3 Further Reading . . . . . . . . . . . . . . . . . . . . . 104 2.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 II Ways of Using AI in Games 107 3 Playing Games 109 3.1 Why Use AI to Play Games? . . . . . . . . . . . . . . . . . . 110 3.1.1 Playing to Win in the Player Role . . . . . . . . . . . 111 3.1.2 Playing to Win in a Non-player Role . . . . . . . . . . 113 3.1.3 Playing for Experience in the Player Role . . . . . . . 113 3.1.4 Playing for Experience in a Non-player Role . . . . . . 114 3.1.5 Summary of AI Game-playing Goals and Roles . . . . 116 3.2 Game Design and AI Design considerations . . . . . . . . . . 116 3.2.1 Characteristics of Games . . . . . . . . . . . . . . . . 116 3.2.2 Characteristics of AI Algorithm Design . . . . . . . . 124 3.3 How Can AI Play Games? . . . . . . . . . . . . . . . . . . . . 128 CONTENTS 5 3.3.1 Tree Search-based Approaches . . . . . . . . . . . . . 128 3.3.2 Reinforcement Learning . . . . . . . . . . . . . . . . . 134 3.3.3 Supervised Learning . . . . . . . . . . . . . . . . . . . 137 3.3.4 Chimeric Game Players . . . . . . . . . . . . . . . . . 138 3.4 Which Games Can AI Play? . . . . . . . . . . . . . . . . . . . 138 3.4.1 Board Games . . . . . . . . . . . . . . . . . . . . . . . 139 3.4.2 Classic Arcade Games . . . . . . . . . . . . . . . . . . 140 3.4.3 Strategy Games. . . . . . . . . . . . . . . . . . . . . . 149 3.4.4 Racing Games . . . . . . . . . . . . . . . . . . . . . . 154 3.4.5 Shooters and Other First-Person Games . . . . . . . . 156 3.4.6 Card Games . . . . . . . . . . . . . . . . . . . . . . . 159 3.4.7 Serious Games . . . . . . . . . . . . . . . . . . . . . . 162 3.4.8 Interactive Fiction . . . . . . . . . . . . . . . . . . . . 164 3.4.9 Other Games . . . . . . . . . . . . . . .T. . . . . . . . 166 3.5 Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . 170 3.6 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 F 3.6.1 Why Ms Pac-Man? . . . . . . . . . . . . . . . . . . . . 170 3.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 A 4 Generating Content 173 4.1 Why Generate Content? . . . . . . . . . . . . . . . . . . . . . 174 R 4.2 Taxonomy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 4.2.1 Taxonomy for Content . . . . . . . . . . . . . . . . . . 176 4.2.2 Taxonomy for Methods . . . . . . . . . . . . . . . . . 177 D 4.2.3 Taxonomy of Roles . . . . . . . . . . . . . . . . . . . . 178 4.3 How Could We Generate Content? . . . . . . . . . . . . . . . 179 4.3.1 Search-based Methods . . . . . . . . . . . . . . . . . . 179 4.3.2 Solver-based Methods . . . . . . . . . . . . . . . . . . 183 4.3.3 Grammar-based Methods . . . . . . . . . . . . . . . . 185 4.3.4 Cellular Automata . . . . . . . . . . . . . . . . . . . . 188 4.3.5 Noise and Fractals . . . . . . . . . . . . . . . . . . . . 192 4.3.6 Machine Learning . . . . . . . . . . . . . . . . . . . . 195 4.4 Roles of PCG in Games . . . . . . . . . . . . . . . . . . . . . 198 4.4.1 Mixed-Initiative . . . . . . . . . . . . . . . . . . . . . 199 4.4.2 Autonomous . . . . . . . . . . . . . . . . . . . . . . . 202 4.4.3 Experience-Driven . . . . . . . . . . . . . . . . . . . . 203 4.4.4 Experience-Agnostic . . . . . . . . . . . . . . . . . . . 205 4.5 What Could be Generated? . . . . . . . . . . . . . . . . . . . 206 4.5.1 Levels and maps . . . . . . . . . . . . . . . . . . . . . 207 4.5.2 Visuals . . . . . . . . . . . . . . . . . . . . . . . . . . 209 4.5.3 Audio . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 4.5.4 Narrative . . . . . . . . . . . . . . . . . . . . . . . . . 212 4.5.5 Rules and Mechanics . . . . . . . . . . . . . . . . . . . 214 4.5.6 Games . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 6 CONTENTS 4.6 Evaluating Content Generators . . . . . . . . . . . . . . . . . 220 4.6.1 Why is it Di(cid:14)cult? . . . . . . . . . . . . . . . . . . . . 220 4.6.2 Function vs. Aesthetics . . . . . . . . . . . . . . . . . 221 4.6.3 How Can we Evaluate a Generator? . . . . . . . . . . 222 4.7 Further Readings . . . . . . . . . . . . . . . . . . . . . . . . . 224 4.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 4.8.1 Maze Generation . . . . . . . . . . . . . . . . . . . . . 225 4.8.2 Platformer Level Generation . . . . . . . . . . . . . . 225 4.9 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 5 Modeling Players 227 5.1 What Player Modeling Is and What Is Not . . . . . . . . . . 228 T 5.2 Why Model Players? . . . . . . . . . . . . . . . . . . . . . . . 230 5.3 A High-Level Taxonomy of Approaches . . . . . . . . . . . . 232 5.3.1 Model-based (Top-downF) Approaches . . . . . . . . . 232 5.3.2 Model-free (Bottom-up) Approaches . . . . . . . . . . 237 5.3.3 Hybrids . . . . .A. . . . . . . . . . . . . . . . . . . . . 237 5.4 What Is the Model’s Input Like? . . . . . . . . . . . . . . . . 238 5.4.1 Gameplay . . . . . . . . . . . . . . . . . . . . . . . . . 238 R 5.4.2 Objective . . . . . . . . . . . . . . . . . . . . . . . . . 239 5.4.3 Game Context . . . . . . . . . . . . . . . . . . . . . . 241 D 5.4.4 Player Pro(cid:12)le . . . . . . . . . . . . . . . . . . . . . . . 242 5.4.5 Web of Data . . . . . . . . . . . . . . . . . . . . . . . 243 5.5 What Is the Model’s Output Like? . . . . . . . . . . . . . . . 244 5.5.1 Modeling Behavior . . . . . . . . . . . . . . . . . . . . 244 5.5.2 Modeling Experience . . . . . . . . . . . . . . . . . . . 244 5.5.3 No Output . . . . . . . . . . . . . . . . . . . . . . . . 253 5.6 How Can we Model Players? . . . . . . . . . . . . . . . . . . 254 5.6.1 Supervised Learning . . . . . . . . . . . . . . . . . . . 254 5.6.2 Reinforcement Learning . . . . . . . . . . . . . . . . . 259 5.6.3 Unsupervised Learning . . . . . . . . . . . . . . . . . . 261 5.7 What Can We Model? . . . . . . . . . . . . . . . . . . . . . . 262 5.7.1 Player Behavior. . . . . . . . . . . . . . . . . . . . . . 262 5.7.2 Player Experience . . . . . . . . . . . . . . . . . . . . 270 5.8 Further Readings . . . . . . . . . . . . . . . . . . . . . . . . . 277 5.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 5.9.1 Player Behavior. . . . . . . . . . . . . . . . . . . . . . 277 5.9.2 Player Experience . . . . . . . . . . . . . . . . . . . . 278 5.10 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 CONTENTS 7 III The Road Ahead 281 6 Game AI Panorama 283 6.1 Panoramic Views of Game AI . . . . . . . . . . . . . . . . . . 284 6.1.1 Methods (Computer) Perspective . . . . . . . . . . . . 285 6.1.2 End User (Human) Perspective . . . . . . . . . . . . . 287 6.1.3 Player-Game Interaction Perspective . . . . . . . . . . 289 6.2 How Game AI Areas Inform Each Other . . . . . . . . . . . . 291 6.2.1 Play Games . . . . . . . . . . . . . . . . . . . . . . . . 291 6.2.2 Generate Content . . . . . . . . . . . . . . . . . . . . 295 6.2.3 Model Players. . . . . . . . . . . . . . . . . . . . . . . 299 6.3 The Road Ahead . . . . . . . . . . . . . . . . . . . . . . . . . 302 6.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 T 7 Frontiers of Game AI Research 305 7.1 General General Game AI . . . . . . . . . . . . . . . . . . . . 305 7.1.1 General Play . . . . . . . . . . .F. . . . . . . . . . . . 307 7.1.2 General Game Generation and Orchestration . . . . . 308 7.1.3 General Game A(cid:11)ective Loop . . . . . . . . . . . . . . 310 A 7.2 AI in Other Roles in Games . . . . . . . . . . . . . . . . . . . 312 7.3 Ethical Considerations . . . . . . . . . . . . . . . . . . . . . . 314 7.4 Summary . . . . . . . . .R. . . . . . . . . . . . . . . . . . . . 317 D 8 CONTENTS T F A R D Website www.gameaibook.org T This book is associated with the above website. The website comple- ments the material covered in the book with up-to-date exercises, lecture slides and readings. F A R D 9 10 CONTENTS T F A R D

Description:
Indeed, to some extent the fun in playing a game consists in learning it putational intelligence and AI tools to enhance NPC behavior in generally 101. Figure 2.18: Neuroevolution in Ms Pac-Man. The figure visualizes step 2. (ANN encoding) and step 3 (fitness assignment) of the algorithm for
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.