Game AI: why do we teach AI to play games?

AI researchers seem to have a fascination with games. From AI taking on chess grandmasters, to taking part in game shows, the history of AI is littered with game playing.

As cool as it is for AI programs to be able to win on Jeopardy!, or to play video games like DOTA 2 and Starcraft, it’s not immediately clear on its value. Surely, it’d be better to focus AI efforts on more serious pursuits.

Why, then, are researchers spending time and resources teaching AI fun pastimes? Why do we teach AI to play games?

AI in games

Game AI can be understood as two things: AI in games, and AI playing games. Or, AI NPCs (non-playable characters), and AI opponents/players.

It’s the latter that, from the outside, is most baffling. For as long as we’ve been developing artificial intelligence, we’ve been teaching it to play games. And it isn’t a few games, either. Artificial intelligence has either conquered or tried quite the mix of games over the decades.

As strange as it is, there are some very good reasons for the apparent obsession over teaching games to AI. It’s about more than chess, or DOTA 2, or poker. It reaches past the game, and into a host of other fields.

Game AI: 20th century

One of the earliest examples of AI playing games comes from 1951-1952, with a computerised game of Nim.

Not long after that came a computer able to play checkers. At the time, this AI was overhyped and thought to be displaying human intelligence. We now know better — and the pursuit for such computerised intelligence is still underway.

Chess became a major focus for AI developers in the second half of the 20th century.

Chess represented a landmark challenge for AI — and was considered a definitive intelligence yardstick. This research culminated with IBM’s Deep Blue achieving victory against world champion Garry Kasparov in 1997.

Game AI: 21st century

The turn of the millennium didn’t stop us from teaching AI to play games. But the kind of games that artificial intelligence would take on expanded wildly.

For example, in 2010 and 2011, IBM’s Watson entered the game show Jeopardy!, defeating two former champions.

Board games hadn’t been abandoned either, and in 2016 AlphaGo defeated the world champion at Go. (An abstract strategy game that’s largely considered one of the hardest there is.)

Then, in 2017, an AI program named Libratus won a Texas hold ‘em poker tournament against four ‘top-class’ poker players.

Video game AI

Game AI. PlayStation wireless controller

It’s not just games in the physical world that we’re teaching AI to play either. AI researchers are also teaching AI to play video games.

In 2015, a video of a neural network named MarI/O playing Mario went viral. The video — and the game — provided a glimpse into just how neural networks and machine learning work.

In 2018, an AI program called AlphaStar defeated a professional gamer, Dario Wünsch, at Starcraft II. The computer won five games to none.

A final example of artificial intelligence learning to play video games comes as recently as 2019. OpenAI’s DOTA 2 bots defeated the 2018 (human) champion team.

What’s the point?

This is only scratching the surface of a long, rich history of game AI. Since the dawn of artificial intelligence, we’ve been teaching it to play games.

But what games AI systems can play pales in significance compared to why they can play them. So, what’s the point of it all?

Reason 1: Game AI means useful metrics

One reason for teaching AI to play games is that, unlike real life, games are quantifiable. They offer a way to measure the progress and ability of AI. With games, you get numerical scores or a countable tally of wins vs losses.

Games allow researchers to track exactly how much the algorithm improves over time.

For example, the chess win against Kasparov in 1997 was preceded by programs taking on novice players in the 50s, and only managing to defeat master players in the 80s. The progress of artificial intelligence was trackable — chess allowed us to compare it to human intelligence in that one domain.

Moving away from traditional games for a moment, even one of the most well-known tests for artificial intelligence originates from a game. The Turing test, devised by Alan Turing, is based on a party game known as the imitation game.

Reason 2: Games provide a safe place to train and evolve

Games are a way to recreate key problems for artificial intelligence to overcome. Poker requires AI to deal with incomplete information. Many video games create environments where artificial intelligence much make real-time, spur of the moment decisions.

It’s better to test and train artificial intelligence in a low-stakes environment — such as a game. For a basic example, an AI-powered computer needs to make real-time decisions if it’s trying to drive a car. By learning this skill through gameplay, there’s less risk of an AI-caused death by dangerous driving.

In short, gameplay helps researchers train AI for other fields and ‘real-world problems’. You could think of it like transferrable skills.

For a real-world example, when IBM’s Watson won Jeopardy!, it demonstrated natural language processing (NLP). By working to defeat the game, the researchers now had an AI that could ‘understand’ natural language. This is a great advancement for AI. Now, Watson works within a wide range of industries, from healthcare to education.

Reason 3: Game AI captures interest and imagination

People don’t necessarily read academic papers, but a lot of them watch game shows, and play games themselves. Game AI, then, is a way to showcase advancements in artificial intelligence to the public.

For instance, AlphaGo’s victory against Lee Sedol demonstrated that AI could potentially take on even the most unwieldy problems. (Such as one of the most complex games to master.)

This, in turn, creates hype, excitement and interest in the technology. Which can help to attract investors and funding.  (Consider MarI/O, the neural network that played Mario, and brought interest to the idea of video game AI.)

Teaching AI to play games is also a way to attract new students/researchers. Games are fun; they’re associated with high interest and good times. So, being able to work on them with AI is an alluring prospect for new researchers choosing their field.

Game AI — more than a gimmick

Games are designed to challenge us as much as they entertain. They present problems to solve, predictions to make, and different areas of ‘intelligence’ to exercise.

When we teach artificial intelligence to play games, we’re using a controlled challenge, with set rules, to teach new skills.

In short, game AI is a fun way to test, push and showcase the abilities of artificial intelligence.

Useful links

What is the AI effect, and is it set to happen again?

Milestones in artificial intelligence

The history of the Turing test