Artificial Intelligence, or AI, commonly refers to the programmed behaviors of NPCs in a game, whether it's the fact that a soldier takes cover behind a wall in Gears of War, or that townspeople cheer upon your arrival to their village in Fable.

Overview

Artificial intelligence in video games is not the real academic view of A.I. Game A.I. consists of scripted data driven algorithms that have predetermined data entering the system causing scripted responses in a controlled world. Video game A.I. is not about intelligence, it's about creating a realistic and fun experience. That said, game A.I. has matured into one of the pillars of modern game development. The quality of the A.I. can make or break a game.

A Brief History

Goldeneye's AI Baddies

The earliest video games were two-player games and thus usually lacked enemy AI, but this began changing with the release of Space Invaders, which featured enemies that move in formation and fire randomly, gradually increase speed and difficulty, and had distinct movement patterns. Galaxian added more complex and varied enemy movements, including maneuvers by individual enemies who break out of formation. Pac-Man showcased a much improved A.I. which consisted of four A.I. ghosts, each with unique personalities and different behaviors.

The stealth game Metal Gear featured a more sophisticated enemy AI, where enemies could hear gunshots from non-silenced weapons and would chase Solid Snake when the security alarm went off. Metal Gear 2: Solid Snake had a significantly improved AI, where enemies could hear footsteps, have a 45-degree field of vision, move their heads left and right, and behave in a more sophisticated manner when searching for intruders. The light-gun shooter Virtua Cop featured enemies who can duck and even dive when being shot at.

Early FPS A.I. in games like Doom and Wolfenstein 3D consisted of NPC's that would either walk toward the player with guns blazing or stay at their post as they shot at the player. Goldeneye 007 for the N64 is a good example of A.I.'s evolution in the genre. Like Virtua Cop, the NPCs would duck and dive when being shot at. They would also throw grenades to flush the player out, and blind-fire when out of range. The issue was that the NPCs knew the player's location at all times, even if the player was out of the line of sight. The NPCs were programmed to play blind until the character crosses this line.

A significant evolution was Metal Gear Solid 2: Sons of Liberty, which featured a squad-based collective AI, where unlike previous games, the enemy guards work together in squads. This included communicating with one another, both in person and through radio, and working together to out-flank Snake or Raiden. They are also able to detect lights and shadows, and react in a more realistic manner towards the player, such as showing fear when held at gunpoint. The enemies could also take cover as well as blind fire and throw grenades from cover.

Game A.I. has improved considerably in this modern era, but A.I. exploits still exist in most games today.

Types of Game A.I.

Scripting - Without question the most used game A.I. used to day. Think of it as an "If... then..." statement. If the player ducks behind a wall, wait four seconds and throw a grenade.

Random Scripting - A type of scripting that adds more variety to gameplay. Think "If... then... or..." If the player ducks behind a wall, wait four seconds and throw a grenade, or rush the wall guns blazing, or find higher ground and cover to shoot over the wall."

Behavioral or Character Based Scripting - Random scripting with character types. If a soldier NPC is deemed defensive its likelihood of doing a particular action could be tweaked as 25% of grenade attacks, 5% of rushing, 70% of taking cover. If the NPC is aggressive, 40 % grenade attaches, 45% of rushing, 20% of taking cover. Character based scripting is often adjusted throughout game balancing.

Situational Awareness - An advanced trait of A.I. scripting that improves a player's sense of immersion. By making scripted actions appear more dynamic and realistic, it adds a dimension of believability. Examples may be subtle effects like brushing a hand along a wall while walking past it, or more complex problem-solving behaviors like an NPC escaping from a trap set by the player using objects in the game environment.

Pathfinding - Getting an NPC from point A to B. 3D terrain and cover are huge A.I. dilemmas in modern A.I. programming. You also have to keep in account where the player is, is he firing, should the NPC fire when he moves, or go as fast as possible. Then at the end, did that look real. Scripting tells the NPC where "B" is Pathfinding gets him there.

Emergent - Where the game actually learns from your actions. Black & White and Nintendogs are good examples (although Nintendogs is pretty scripted).

Rubber Banding - Is a nickname A.I. that's used to boost the competitive feel of the game. In a racing game when the A.I. is slipping behind, the NPC driver receives speed boosts and better handling unavailable to the player to remain competitive. It increases tension. Burnout and Mario Kart both use rubber banding in races to keep them competitive. This is not exclusive to driving games. It's used in many sports games or skill based games.

Thanks, we're checking your submission.

Whoah, whoah... slow down there.

Thanks! Your changes are live!

Some of your changes are live

Because you're new to wiki editing, we sent your
submission off to our moderators to check it over. Most
changes are approved within a few hours. We'll send an
email when it is.

Once you've earned over points you'll be able
to bypass this step and make live edits to our system.
Until then, gain points by continuing to edit pages.

No changes were submitted, nothing was done! Please make changes to the wiki!

Thanks for continuing to improve the site. Some of your changes are
now live. However, some of your changes were sent to moderation because you do not
have enough points to make those live edits. You need points to
live edit the changes you commited.

For the changes that went through, our robot math gave you points for this
submission.

Thanks for continuing to improve the site. Your changes are
now live. Our robot math gave you points for this
submission.