The Importance of AI in Gaming

August 9, 2022
When playing a video game all by yourself, you’re not actually playing solo, even though it may look like it. You are in fact battling against the computer, the artificial intelligence — or AI in short — that is behind various components of a game.
The enemies you shoot at in Halo, the cars you race against in Gran Turismo, the villager in Skyrim giving you information are all powered by AI.
Now, if this topic piques your interest, sit back and give us just a couple of minutes of your day, because today we’re going to learn a little about AI in gaming!
AI and video games
Outside of the gaming sphere, AI is defined as intelligence demonstrated by machines, a kind of intelligence that’s different from the natural intelligence displayed by us humans and animals.
The subject of research is the intelligent agent, a system that perceives its environment and takes actions to maximize its chance of achieving a goal. The machine therefore makes use of rationality in order to act as appropriately as possible in a given situation.
In video games, the principles of academic AI studies are applied with the goal of improving the player’s experience. Good AI in a game will result in a highly stimulating, realistic and interactive experience. This also adds an element of challenge to the game, since the smarter non-player characters, or NPCs, are, the more out of your control they and their actions will be.
AI has been a primary component of video games since their inception in the 50s. The strategy board game Nim, which was made into a video game in 1951, was the first to display an AI capable of beating even highly skilled Nim players.
Main modern AI techniques in gaming
Nowadays, AI in games mainly appears in the form of pathfinding and decision trees to guide the actions of NPCs.
The first technology consists in the computer finding the shortest route between points A and B. Pathfinding is thus related to the shortest path problem (graph theory), because it leads to the identification of the path that best meets some criteria (shortest, cheapest, fastest, etc) between two points in a large network.
Meanwhile, a decision tree is a tool used in support of the decision-making process. It uses a tree-like model of decisions and their possible consequences.
Why good AI is important in a game
The way AI is implemented can make or break a video game.
Take the The Sims games, for instance. Many fans of the series firmly believe that the AI in The Sims is one of the primary reasons why the games are so fun to play. NPCs in The Sims behave in the most random, exhilarating way (The Sims 2 is particularly chaotic in this regard), and this creates very interesting and unpredictable dynamics during your playthrough.
The Sim NPCs spontaneously developing drama-filled relationships among themselves or accidentally starting fires (and dying) while cooking in your kitchen will never cease to be entertaining. And it’s all thanks to the superlative AI within the games.
Good AI gives NPCs personality, it makes it believable that these machine-controlled characters have a life of their own. On the contrary, games that have poor or underdeveloped AI are pretty boring, stiff and predictable, thus less enjoyable.