Episode Summary: It’s more common to ask what AI can to do to win at games, but less common to ask what games can do to help develop AI. This is a particularly fitting topic after Google’s DeepMind’s defeat of Go, and in this episode we talk with New York University’s Julian Togelius about his research in how games can help us develop AI. We discuss how simple AI has been used in more common video games; the ‘smoke and mirrors’ effect that is often used to mimic AI; and the more innovative ways that AI in gaming is being used at present, setting precedents for the future of the industry.
Expertise: AI in gaming and computational intelligence
Recognition in Brief: Julian’s research centers on artificial intelligence techniques for making computer games more fun, and on games for making artificial intelligence smarter. His current focus is on search-based procedural content generation, which means using evolutionary algorithms (or other global optimization algorithms) to search the space of game content, such as levels, maps or game rules. He has published over 150 peer-reviewed publications in this area of research, including journal articles, conference papers, book chapters, and workshop papers. His work and expertise has been covered by numerous media outlets, including New Scientist, VICE Motherboard, Le Monde, and The Guardian.
Current Affiliations: Associate professor in the Department of Computer Science and Engineering, Tandon School of Engineering at New York University; tutorials and keynotes chair of IEEE Computational Intelligence and Games 2016; track chair for the DETA track of GECCO 2016; co-organizer of the General Video Game Playing Competition
Simple AI in Gaming Increases Profit Potential
After Google’s DeepMind’s successful win at Go, it may seem logical to think that deep learning could be used in lots of other games, both as a way of posing a challenge to players and in developing more realistic, intelligent characters. But if you bring this ‘great’ idea to a game developer, chances are you’ll hear “we’re not interested”. The reason, says Dr. Julian Togelius, is simple: “In most games, you don’t really want super intelligent AI, it would be simple to put it into a game and have it beat it every time.”
Instead, Togelius says that AI is traditionally used in more simple ways, such as in pathfinding algorithms, which help a character figure out how to get from place a to place b; this sounds simple, but Togelius says it’s an area that has developed a lot in recent years, with characters better able to detect different movements. Another more common use of AI in games is that of behavior trees. When a minor character goes from being angry to patrolling to attacking to dying, perhaps in that order, there are clearly defined states of transition between them. In each state, characters try to do one of a set of given options, all of which are hand authored. These characters are not learning what’s going on in the game or doing any form of adaptation, and they don’t usually need to because players only briefly interact with these characters.
Games are not an area in which most AI researchers are working, and Togelius is acutely aware of the disconnect between AI and the game industry. Likewise, most game developers are not interested in developing real AI because there hasn’t existed a strong business case for incorporating more advanced AI into games. Most of where AI has and is being applied in game design and making games ‘more fun’ for humans to play; in many cases, all a developer needs is the illusion of intelligence to make a game entertaining.
Julian gives some examples of unique games that have incorporated more AI in the past, such as the explicitly designed intelligent characters in Creatures, released back in the 1990s and now somewhat of a legend amongst old-school gamers. Another example of games using intelligently-designed characters is SkyRim. There are also games that have been turned out by the research community. Both Galactic Arms Race, and Assault are strategy games that were made to showcase how humans can use more advanced AI in games. Still, the big game companies are conservative in this area, not willing to bet on innovative ideas for how to incorporate next-level AI if they’re not sure how successful a game will be with players.
AI as a Game Changer
More recently, games have started using deeper AI to generate “endless” worlds and more unpredictable levels. Great graphics are difficult and expensive to make, and in this sense game content has really been in what Togelius describes as a “pre-industrial revolution phase”, but progress is happening in using AI to create more believable game worlds and features. Togelius names Spelunky as one of the first successful games that uses AI technology to rearrange levels each time it’s played.
The game No Man’s Sky, which received a lot of attention when it was released in 2014, uses a “procedural generation” algorithm to produce an entire universe with a seemingly infinite number of unique virtual planets, right down to the plant and animal life that can actually evolve over time in the game. The effort is a historical feat in the gaming world, and unexpected endless world and randomly generated levels is what people really seem to want, says Julian.
“Here is where modern AI really could make a difference, with algorithms that create game worlds as you go along…it’s already being done but people are using pretty using simple algorithms for it, whereas things like evolutional computation in particular but also machine learning…could have a lot to do in creating content,” he says.
The game Tuebor, released to the public in Spring 2016, incorporates the use of Darwinian evolution artificial intelligence by adapting the game to the player’s behavior. This attribute, in the words of Michigan State Professor and Developer of the game’s AI prowess Arend Mintze, “…provides never-ending new challenges for players.” An AI-endowed game that gets smarter the more times you play sounds counter-intuitive, but a slew of “endless play” games seems to be where a portion of the gaming industry is headed by incorporating such technologies.
Another aspect of AI in gaming deals with social-emotionally intelligent character interaction. Experimentation with this type of technology dates back to 1985 with the game Little Computer People (Tamagotchi and Creatures were evolutions of this form of AI), but has continued in sometimes surprising forms since, like in the text-based adventure Versu. In this narrative-based, choose-your-own-adventure type game, characters are programmed with given beliefs and abilities, but learn and react to the user’s behavior as the story unfolds.
Experimentations with smart characters is starting to spill over into more mainstream games, setting a potential future tone for more complex character-based escapades. Companies and university-based labs like SpiritAI and Expressive Intelligence Studio are hard at work building deeper, more engaging and intelligent characters for video games using natural language understanding and other systems. This is the kind of AI for gaming technology that could have important ramifications for other areas of AI like robotics and intelligent virtual agents.
Unsurprisingly, the research is starting to move fast in these areas, and Julian believes there’s a real opportunity to use these types of AI algorithms in creating the next generation of ‘smart’ games.
Can Playing Games Make an AI More Intelligent?
There may be another advantage to using more complex AI algorithms in games, and that goes towards producing more adaptable, intelligent AI.
“Some methods of developing AI such as particularly evolutional computation and genetic algorithms, they are all dependent on testing, coming up with something testing it against the real world…by putting it into a game, you can speed it up to 1,000 times in real time, test parallel versus non-parallel, this is much faster and cheaper” says Togelius.
Togelius sees this process as a valid and very effective way to further robotics research, by testing multiple algorithms over and over in a real-world simulated game context. As we discuss this topic, the question of how to define intelligence crops up. Julian offers one definition, which he says was shared with him by Shane Legg, a former colleague and also a co-founder of Deep Mind: “Performance on all possible tasks weighted by the inverse complexity of tasks.” In simpler terms, one way to consider intelligence is how well you would do on all possible tasks, with more weight placed on simple tasks. Of course, no one can actually measure such a phenomenon, but there are ways to approximate performance, and versions of measuring intelligence in this way are already used in the smart gaming world.
In the annual General Video Game AI (GVG-AI) competition, participants submit and test single agents to play games that they haven’t previously encountered. The winning agent is the one that plays best on all of the unseen games.
“This is a much more fair test of general intelligence than playing one particular game or doing one particular task, because if you do one particular task you can optimize your AI to do one particular thing…in the end we need to generate hundreds of these games automatically to test AI,” says Togelius.
While some often preach to kids about how playing too many games will turn their minds to mush, it could be that testing and building AI capabilities through gaming turns out to be a valid method for building a more adaptive, more general, and more intelligent AI.
Editor’s note: Dr. Togelius makes reference in the interview to AI being close to beating the game of Go, but not yet having achieved a win against a human player; this interview was recorded prior to DeepMind’s defeat of Champion Go Player Lee Se-dol.
[This interview has been updated as of January 2017.]
Image credit: Julian Togelius