Why Study AI In Games?

Why indeed?  In this piece we will discuss the relevance and importance of games as an AI research field.

There are so many areas that we can be exploring for AI applications and research. There is much to learn of the world around us and how we can inject it into systems that may prove useful for our quality of life.  It’s in that statement that games carry such relevance.  So we ask you as the reader to consider, what are games in the first place?

Courtesy of Wikipedia: http://en.wikipedia.org/wiki/Draughts
Courtesy of Wikipedia: http://en.wikipedia.org/wiki/Draughts

Games are a manner of structuring or organising our playtime.  We do it to entertain and challenge ourselves.  So we construct rules and establish principles of play; constraints on how we can interact within a certain domain or realm as perceived by the players.  We then make a range of tasks for us to attempt to overcome, with the one who does it in the least time or the most effectively declared the winner.

What is a game and how it can be identified has been argued before, with the likes of (Caillois, 1961) being an interesting read if you have an interest in Ludology.  However, Caillois’ arguments for what ‘play’ is and how games are essentially distinct from our personal and professional lives is somewhat at odds with the likes of e-sports and the influence of social media in present day.

What’s really fascinating about this is how much we take for granted in the construction of a game.  Even if we look at the simplest of games such as Tic-Tac-Toe or a board game like Draughts (Checkers), there are so many rules at play.  Our brain takes over for us very quickly, identifying what is the correct way to play the game – we know there are only two symbols in Tic-Tac-Toe and the pieces in Draughts should be on the board when in play.

Even as we play, we begin to make decisions on how to move ahead and progress.  We take so much of this for granted; as part’n’parcel of how we play.  Yet the real behaviours that are being exhibited here are rather interesting from a scientific perspective:

  • We’re gaining an understanding of this micro-‘universe’ within which our game exists.
    • We learn what components comprise the game.
    • We learn the basics of how to play.
    • In time, we understand the rules that govern play (often through experimentation).
    • We learn how these rules dictate whether we win or lose.
  • With this understanding, we experiment with what actions that adhere to the rules of play but a more conducive towards victory; i.e. we devise strategies.

A Little Bit of History and Perspective

Originally in the late 1800’s and early 1900’s, AI research placed a greater emphasis on the study of human behaviour, in a hope to create machines that could ‘think’.  This notion was challenged by Alan Turing with the Turing Test (Turing, 1950), who instead proposed we focus on replication of the thought process rather than attempting to imitate a human’s capacity for thought.  While this sounds similar, it really is a step away from creating ‘human-thinking computers’ and instead an emphasis on studying how to conceptualise information and make intelligent decisions based upon it.  In essence, emphasis on designing AI as a ‘black box‘ was established by the Turing Test; we are interested in how it takes the same information as a human and creates an output that is expected by a human.  However the core mechanics of how it achieves that output is open to experimentation.

As such, when we now fast forward to the late 1990’s, AI as a field has reached some consensus that we focus instead on the idea of ‘agents’, software that makes decisions whenever asked to take action.  While even now the definition is still open to some debate, the focus is on two key things: autonomy (to be able to think for one’s self) and rationality (to make the most optimal decisions at any point in time with respect to some goal) (Russell and Norvig, 2009).

The Challenges That Games Present

So returning to the original question: why research AI in games?

I imagine that the vast majority of people who ever read this article play games of some fashion.  Whether you like Sudoku, Chess, Risk, Monopoly, Call of Duty, StarCraft, Angry Birds or heck… play the crossword puzzles in the newspaper or take part in sports.  In every one of these activities, we aim to stimulate and entertain our brains.

We play games because they challenge us, force us to perceive the world in different ways.  We either take stock of the world as it is and think many steps ahead of ourselves to perceive the outcome of events in-game.  Or we are reacting instinctively to events that transpire at relatively fast pace.   These are useful activities for the brain, given we require them throughout our daily lives.   These are also activities that we seek to achieve in software agents.

In Addition: The Luxuries Games Provide

As a player we remove the harsh realities of risk and consequence. In some cases, we play games that mimic reality and allow us to explore the world without fear of the morals and ethics of human society being exerted upon us.  How many of you have started a game of Grand Theft Auto and within minutes committed acts that are acceptable that by the games loose moral code, yet you would never commit them in real-world society?  

In addition we often remove reward: at best we have bragging rights or achievements/trophies to show in our online profiles for Xbox or Playstation.  It is only when reward becomes truly tangible, typically money, that we become far more diligent and serious about the games we play.

This makes it all the more interesting that we strive to experiment in this fashion.  We explore new worlds and learn once again how to interact within them.  We then relate these experiences with games we have played previously and hope to map our prior knowledge to new games, such that it speeds up the process.  This interesting element of human behaviour is only now being explored in video games research as Generalised Video Game Playing, i.e. can you create AI that is, in general, capable of playing any video game you give it.

Similarly, it often reduces risk on the side of the AI researcher.  In some instances we are developing ideas which would require significant resource in the real-world.  However in a game, we can find simulations that suit our needs.  This is either because they are replicate existing real-world systems (TORCS) or have interesting qualities that bear resemblance to real world problems (Ms. Pac-man… no seriously).

Lastly, We Tend To Like Playing Games Ourselves

Lastly, people research the area because they want to improve what the games industry can provide to the consumer.  This is seldom turned into a reality, given the differences between knowledge creation and the mining of knowledge for personal and monetary gain.  Not to mention the realities of whether researchers theories can be applied with confidence in commercial products (at a reasonable cost).   While rare, in some corners it does exist.

So To Answer My Question

The real reason why games prove so useful to study within Artificial Intelligence is that they are your brains fun little puzzles that keep it entertained.  They stimulate the mind in ways akin to the real world, and provide ample opportunity to create interesting and challenging problems that are equally applicable to other, more ‘serious’ pursuits.

It might sound bizarre, but even playing something a video game as old as Ms. Pac-man forces you, the player, to think on a number of levels that for a computer is immensely challenging.  To the point that a number of AI researchers have dedicated significant time and effort to developing agents that can play the game.  I will focus a future article on some of the more interesting work conducted in Ms. Pac-man.

So the next time your friends or family complain how video games rot the brain you could potentially argue your case.  Unless of course you’ve been playing solid for a day or so without access to fresh water or sunlight.  In that case you’re most certainly on your own.

References & Related Reading

(Caillois, R, 1961) Man, Play and Games  – A translation of the original book ‘Les Jeux et les hommes’ published in 1958.  A modern reprint was issued in 2001.

(Russell, S.J. and Norvig, P., 2009) Artificial Intelligence: A Modern Approach, Prentice Hall Publishing – Something of bible for starting (and experienced) AI developers.  A supporting website for the book can be found at: http://aima.cs.berkeley.edu/

(Turing, A., 1950) Computing Machinery & Intelligence.  A web report on the paper can be found at http://www.turing.org.uk/scrapbook/test.html

Enjoying AI and Games? Please support us on Patreon!
Tommy Thompson Written by:

Tommy is the writer and producer of AI and Games. He's a senior lecturer in computer science and researcher in artificial intelligence with applications in video games. He's also an indie video game developer with Table Flip Games. Because y'know... fella's gotta keep himself busy.