blue pink-blog cover

The Evolution of AI in Video Games

When we think of the practical applications of Artificial Intelligence in video games, some vivid game characters may come to mind first. Such as Trevor in GTA5 or the fierce and intelligent enemies in FEAR. But what were game developers thinking when they created AI? How it has evolved over the years?  In this article, we will give you a clear picture of the evolution of AI in video games.

1. The Purpose of the Game AI

AI_gaming
Source:https:// www.mygreatlearning.combloghow-ai-is-changing-the-gaming-industry

Artificial intelligence can be defined as the technology that, through so-called machine learning, enables a machine, system, or software to learn to analyze specific information from the environment to achieve more human-like behavior. But Game AI is quite different from that.

For game developers, all the buildings, objects, and elements in the games serve only one purpose: to increase players’ gaming experience and make games more enjoyable.

So does AI in video games, it is usually programmed in advance and will act according to the instructions. It serves as a tool to improve the players’ game experience rather than machine learning or decision-making in real life.

2. What Makes a Good Game AI

So what makes a good AI? There are seven key points that game developers need to consider when designing a game AI.

  • Good AI lets the players cheat:

Some mechanisms of AI may favor the players in a way that the players may not realize.

  • Good AI tells players what to think next:

According to the AI’s reaction, players can make plans for their next move to push forward the game plot.

  • Good AI is predictable:

AI will stick to an identified behavior pattern like a regular patrol path and the player’s action will always trigger a specific move.

  • Good AI can interact with the game system:

AI does not exist beyond the game environment. They will interact with objects in the environment.

  • Good AI reacts to the player:

Besides simple interactions like attacking and speaking, good AI remembers the player’s behaviors and responds accordingly.

  • Good AI has its own goal:

Good AI has a life in the game, meaning that their presence is not all around the players but about doing the jobs that the developers programmed.

  • Good AI is more than enemies:

AI is more than your enemies. They can be your partner or character that you need to protect from any harm, etc.

3. History of Game AI

Game AI has existed for an extended period. Throughout the game AI history, it has gone through a few stages of evolution. This article will break them down into three stages:

3.1 Phase I: Simple Script AI

Game AI was relatively primitive at the earliest stage compared to AI today. They will strictly follow the scripts or algorithms to make actions in the games.

The Pong and the space invaders: 1970s
pong-game-card
Source: https://freepong.org

The American game developer Atari, Inc. released the revolutionary electronic game pong in 1972. Pong, one of the first video games, gained enormous popularity and contributed to the beginning of the video game industry. In Pong, opponents will move based on the movement of the ball you hit and return the impact accordingly.

In 1978, the space invaders was launched. Compared to the Pong, it not only has more enemies but also has better visual images. The enemies were programmed to have the same pattern of attacking. But as the number of enemies has massively increased, such changes dramatically increased the difficulty of the game, making the enemies’ movement more unpredictable.

Pac-man: 1980

screenshot-pac man

In 1980, Pac-man was released by Namco for arcades. In Pac-man, the enemy AI has three behavior mods: attacking, wondering, and escaping. And each type of enemy has different chasing patterns based on their body color. For example, when the player triggers specific criteria, the enemies will start to flee away from the player to ease the player’s constant tension during the gaming.

Such complex design has made the AI seem intelligent and interesting, which made the gameplay experience more fun. But enemies still obey the exact rules of algorithms without the ability to make any adjustments to players’ behaviors or have the ability to be better.

3.2 Phase II: Complex Script AI

However, AI is getting perfect for developers over time. They started to program more complex algorithms and AI systems to make the game experience more enjoyable. The two most widely used AI algorithms were the A* algorithm and the Finite-state machine. Games with these two algorithms were good enough to make a sound AI system.

Half-life: 1998

Half-Life was a first-person shooter by Valve. The game used the Finite-state machine system to make the AI react differently in logical ways. During the gameplay, based on their states and conditions, AI will perform more than 80 different tasks driven by the schedules and goals of the games to act diversified. Although Half-Life was released more than 20 years ago, you can still be amazed by this game’s dynamic and complex design.

Halo2: 2004
fighters-master chief-halo2
Source: https://www.pcgamer.comhalo-2-pc-public-testing-begins-today

As one of the world’s most famous first-person shooter games, Halo2 applied an advanced AI system at the time. Due to the large-scale battlefield and the diversified types of enemies, game developers must develop a way to handle the complex problems to create vivid characters.

Therefore, the game developers in Bungie used another logical system, the behavior tree to model behaviors and logic. This was a typical example of a behavior tree. And the game’s behavior tree was even more complex compared to it.

behavior tree-AI technology-mind map

You may found such a system relatively easy to understand, for the AI only have to follow the path of the tree to make certain moves. But the questions laid in what circumstances will certain behavior trees be trigged. For that reason, developers designed two kinds of triggers for this system.

First of all, the AI will behaved according to the context. And in any context, there were priorities to be considered. That means AI will shift its priorities to different contexts and react to what the players try to do.

However, this system sometimes may went wrong because the players’ behaviors are always unpredictable.

Therefore,  stimulus behaviors was added to make the enemies more variable during gameplay. If the player takes a specific action, the AI will not perform based on the original behavior tree. They will jump out of the system to take action accordingly.

FEAR (First Encounter Assault Recon): 2005

FEAR First Encounter Assault Recon was a first-person psychological horror shooter game released in 2005. It used the A* algorithm and Finite-state machine as its AI’s bottom structure. However,  they also used the Goal Orientated Action programming to make the combat more intensive. As FEAR developers explained, they want the players to experience the most intensive playing experience as if they were fighting the players from the multiplayer games.

Goal Oriented Action Programming was based on the automated planning system instead of the finite-state machine. The planning system will give AI the objectives and the information they need to find out what they need to do next to achieve that goal. As a result, this system allowed the AI to layer behaviors and shift their strategies based on the context. With multiple systems combined, AI can be more intelligent and more unpredictable.

Left 4 dead 2: 2008
4 fighters-fighting zombies-Left 4 dead
Source: https://game-news24.comcategoryleft-4-dead-2

Left 4 dead set its background in the Zombie Apocalypse, where four players will work together to remove all the obstacles and get to the extraction point. In this game, players have to deal with many zombies of various types.

To make the playing experience more interesting, the game developers introduced AI director systems to organize the zombie groups better. According to players’ equipment and status, the AI will generate AI enemies with different difficulties and numbers to change the players’ pace dynamically.

You can find the same system in the game Alien Isolation, in which the AI will measure the degree of players’ fear to change the enemy’s behaviors so that the player doesn’t die very quickly. This approach has not only maintained the horror atmosphere but also made the gaming experience more enjoyable.

3.3 Phase III: Self-learning and Automatic Creation

As AI is constantly evolving, they are getting smarter throughout the development of video games. AI now acts more than a character in games. They are deeply involved in the story-telling and game-making process.

Roguelike games have been using the procedural tool to generate endless dungeons so players can keep playing to get better gear. However, this kind of system has evolved.

Games like No Man Sky and Starfield have used AI to generate game maps. According to the developers of Starfield, there are more than 1,000 planets for players to explore and all of them are generated by AI. AI’s involvement has significantly decreased the developers’ workload.

space ship-starfied
Source: https://www.gamesradar.comstarfield-release-date-trailer-next-gen-news

In online games, newly developed AI technologies like hierarchical reinforcement learning and self-imitation learning have been used to train AIs.  By learning from the video clips of the best players in the world, AI can identify players’ strategies and learn from their mistakes in every game.

According to a report from the verge, DeepMind‘s StarCraft 2 AI is now better than 99.8 percent of all human players. Compared to AI in offline games, AI in online games is much more intelligent due to the reason that they have unlimited data sources. 

starcraft-games
Source: https://www.rockpapershotgun.com/former-starcraft-2-devs-form-new-studio-to-boldly-advance-the-rts-genre

In the 2022 Game developers conference, Tencent AI lab demonstrated two AI progress that can help dramatically lower the developers’ production cost and enrich the gaming experience. They claimed that their AI could teach new players and automatically generate game settings using algorithms.

According to the introduction, AI can be applied in almost every session of video games, from the production session(Artistic Design, content design, testing) to gameplay experience (experience and operation optimization).

They integrate cutting-edge research on text-to-speech to generate natural speech, which synchronously drives facial changes such as mouth shape and expression to achieve high realism. Using phase neural network technology to control character movement reduces the original weeks of work to a few hours.

4. The Future of AI in Video Games

The future of game AI is already quite clear. Game developers said that understanding and recognizing patterns drive AI to new realms of creativity. Most game AI nowadays is still based on the finite-state machine and A* algorithm, which are primitive even after decades of development. However, they are enough for most game development.

But some games have already given us some clues about the future of AI. In Red Dead Redemption 2, AI will identify the player and react accordingly. For example, when the player hasn’t taken a shower for many weeks or their clothes are very dirty, NPCs in the street will dislike or even curse the player. Feedback from NPCs can influence the players’ decisions and give each player a unique playing experience.

romantic relationship-holding hands-mass effect
Source: https://www.pcgamer.comea-kills-off-bioware-points-making-old-mass-effect-and-dragon-age-dlc-free genre

In the future, AI is more than the enemies you have to eliminate. Game developers will attach more emotions to the game AI so gamers can have a more diversified and immersive gaming experience.

Leave a Comment

Your email address will not be published.