This is a book about games, intelligence, and artificial intelligence. In particular, it is a book about how these three things relate to each other. I explain how games help us understand what intelligence is and what artificial intelligence is, and how artificial intelligence helps us understand games. I also explain how artificial intelligence can help us make better games and how games can help us invent better artificial intelligence. My whole career has been based on my conviction that games, intelligence, and artificial intelligence are deeply and multiply intertwined. I wrote this book to help you see these topics in the light of each other.
This is a popular science book in the sense that it does not require you to be trained in, or even familiar with, any particular field of inquiry to read it. You don’t need to know anything about artificial intelligence, and although I explain several important algorithms throughout the book, it is entirely free of mathematical notation—you can follow the argument even if you only skim the descriptions of algorithms. Some familiarity with basic programming concepts is useful but not necessary. You don’t need to know anything about game studies, game design, or psychology, either. The only real prerequisite is that you care about games and occasionally play games. It doesn’t really matter which games.
In other words, I wrote this book for both members of the general public who are curious about games and AI and people who work with games in some way (perhaps by making them, studying them, or writing about them) but don’t know much about AI. If you are already knowledgeable about AI, I hope you will still find the book interesting, though you may want to skim some parts.
This book is also a scholarly argument, or rather several arguments. It is an argument that games have always been important—perhaps even a driving force—in artificial intelligence research, and that the role of games in AI research is about to become even more important, with the ongoing switch from board games to video games as the AI benchmarks of choice and the advent of general video game playing, which allows us to benchmark the general thinking skills of programs. Conversely, artificial intelligence has always been important in games, even though many game developers have been unaware of AI research. But we are likely to see AI becoming much more important to future games—in particular, video games—both because of advances in AI methods and because of new ideas on which roles AI can be used in in games. Although in the past it was commonly assumed that the AI in a game was all about how the computer-controlled characters you met in a game behaved, we now see AI being used to understand players, adapt games by changing the levels, and even help us create new games.
I make three primary claims in this book:
The book is fairly liberally sprinkled with footnotes.1 I’ve tried to relegate everything that would break the flow of the text into the footnotes. In particular, I put almost all my citations in footnotes. Feel free to entirely disregard these if you want to.
I have also written this book in a relatively informal and relaxed, sometimes even playful, tone. This is both in order to make it more readable outside the ivory tower of academia and because this is the way I naturally write. I think that most academic writing is needlessly formal and rather boring. I promise you that nothing I say is less true because I use the active tense and even the first-person singular pronoun.
This is where I give you an overview of the book. Chapter 1 starts from the beginning, with the origin of computers and some ancient games and fundamental algorithms. The very first computer scientists tried to develop programs that could play classic board games such as Chess, as these were thought to embody the core of intelligence. Eventually we succeeded in constructing software that beat us at all board games. But does this mean that this software is intelligent? Chapter 2 asks whether you need to be intelligent to play games (or to play games well). It seems that not only do games do a good job of exercising your brain in a number of different ways, they also teach you to play them; in fact, well-designed games are finely tuned to the abilities of humans. But if they require intelligence from you, how can an algorithm play them without being intelligent? Chapter 3 digs into the question of whether a game-playing program can be (or have) artificial intelligence, and if not, what AI actually is. There are several ideas about what intelligence and artificial intelligence are, but none of these ideas is without its own problems. While we may still not know just what intelligence or AI is, we now know a lot more about what it is not.
Next, in chapter 4, we look at what kind of AI you actually would find in a modern video game. I describe a couple of important algorithms in the context of a fairly standard shooter game and point out some of the severe limitations of current game AI. But do we even know what AI in a video game would be like if it were not so limited? I try to give some ideas about what it could be like and some ideas about why we do not already have such awesome AI. This certainly has to do with the current state of AI research, but just as much with game design and game development practices. The next three chapters look at some new ways in which AI could be used in games. Chapter 5 describes how nonplayer characters (NPCs)—and other things in a game—could learn by experience, from playing the game, using principles from biology (evolution) and psychology (learning from reinforcements). Chapter 6 describes how games can learn from the humans that play them, and perhaps adapt themselves, and chapter 7 describes how AI can be used in a creative role, to construct or generate parts of games or even complete games. These uses of AI do not necessarily fit well into standard game design and game development practices. Chapter 8 is therefore dedicated to ways of designing games that foreground interesting AI capabilities. For the penultimate chapter, chapter 9, we again turn to the use of games as tests of (artificial) intelligence. Building on the discussion in the previous chapters, I discuss testing and developing AI though general video game playing. Finally, chapter 10 returns to the three claims I advanced above, showing how progress on artificial intelligence for games and progress on games for artificial intelligence are dependent on each other. If you finish this book and still want to know more about games, intelligence, and artificial intelligence, you will be delighted to find a “further reading” section following chapter 10 that suggests books, conference proceedings, and journals that will satisfy your curiosity—or get you started on your own research.