Skip to content

By Harriet Terrington on

How Artificial Intelligence is used in video games

Video games have played a big part in innovation in computing ever since the launch of home computers—including in the field of artificial intelligence. Find out how AI helps make the immersive, complex games we know today.

For as long as the technology has been available to the average consumer, there have been game programs created specifically for customers to play and engage with. Over the years, this has grown into a vast industry that competes to provide the newest, most innovative, engaging and immersive playing experience.

As the range and history of video games has grown, so too has the part they have played in pop culture. 80s nostalgia is now linked to playing arcade games like Pacman; children of the 90s fondly remember playing simple platforming games like Sonic the Hedgehog; the 2000s brought Nintendo DS games like Animal Crossing; and during the COVID-19 pandemic, many people connected with friends and family they were isolated from by playing games together.

Video games have become an intrinsic part of society—for users to connect with each other and easily engage with technology, and for a whole industry of artists, programmers, and hardware and software engineers to compete to find the next innovation.

What is artificial intelligence?

The definition of artificial intelligence (AI) is a deceptively simple one and includes many already existing programs. The general definition is a piece of software designed to emulate human senses, detection, pattern recognition, or otherwise mimic human thought. However, all currently existing examples are specimens of so-called ‘narrow AI’, which means they simulate a pattern of human thought to the point of being better at it than humans, but can only accomplish this one task.

Deep Blue, for example, was good enough at playing chess to beat famous grandmaster Kasparov, but would have been useless if asked to solve a differential equation. The holy grail of AI is known as general AI, and is described as being able to use any thinking or detecting process as necessary.

Machine learning is a branch of AI and is one commonly applied in video games. This application of narrow AI can essentially be described as pattern recognition—categorising data or providing future steps in a process, based on a large set of previous examples.

Some variations of this have been used in video games for a very long time. For example, a version of a machine learning AI controls the behaviour of the ghosts in a Pacman game. Each ghost is assigned a basic description of how it should behave nearer to and farther from the Pacman, and then learns how to follow these as the player moves around the maze.

video game technology in our collection

Video game technology has evolved very rapidly, and AI has played an integral part from almost the beginning. From early video game technology where AI was an important in making the file size small enough for storage, to more modern technology where AI broadens the possibilities of world or map size and player/NPC strategy, here are some examples of such technology in our collection.

Plastic 'Magnificent 7' cassette tape case with colourful cover
Video game cassette, ‘The Magnificent 7’, compilation featuring seven video games
A shiny black games console with silver details against a black background
Sony PlayStation 3, manufactured by Sony, China, 2007–2010

How AI is applied in video games

The reason AI has been used so much is because of the game capabilities it opens up. One limitation in making games is keeping file size compatible with technology a consumer could be expected to own to run the game, and the storage capacity of the hardware physical copies of a game are purchased on. One solution to this is to use AI, specifically a machine learning AI that could generate background scenery, NPC movement, appearance, or behaviour, or strategy for the player to play against.

The way a machine learning AI learns from past experience means it can personalise strategy the longer the user plays against it. AI that is designed to play chess can learn to beat even the best human chess players by learning the rules of chess and playing against different real people. The famous match of Kasparov vs. Deep Blue was the first in which a chess grandmaster lost to a specifically designed AI.

Limitations of AI

One question you might ask is: why is AI not then used for everything? Well, the technology for AI is not yet where it needs to be. One reason for this is that when an AI is being written, it is given objectives to complete. These must be carefully set as the program will interpret them literally. If you write a strategy telling the AI to learn to beat the player, then it will learn how to beat the player perfectly until it is frustrating for the user to continue playing.

The purpose of AI, as with any other aspect of a video game, is to provide a more immersive and engaging experience for the user, but this requires carefully set objectives and limits that game creators and programmers are still perfecting. Hopefully in the future, new games will test these limits and overcome these challenges.

Teaser image by Computer17293866, CC BY-SA 4.0, via Wikimedia Commons


Leave a comment

Your email address will not be published. Required fields are marked *