Glossary termProgramming field

Game AI

Also known as: Video game AI, Game artificial intelligence

Techniques used to make computer-controlled characters and systems in games behave in believable, challenging or entertaining ways.

Game AI is the set of techniques that drive the behavior of computer-controlled entities in video games, including enemies, allies, non-player characters, opponents in strategy games and systems that adjust pacing. Unlike much academic artificial intelligence, game AI usually aims not at optimal play but at creating an experience that is fun, readable and fair. An enemy that always aims perfectly is frustrating; one that hesitates, communicates and makes plausible mistakes feels more alive.

Common building blocks include finite state machines, which switch between behaviors such as patrol and attack; behavior trees, popularized in the 2000s by games such as Halo 2; goal-oriented action planning, used in F.E.A.R.; utility systems that score possible actions; and pathfinding with the A* algorithm over navigation meshes. Director systems, as in Left 4 Dead, adjust the flow of enemies and items to manage tension. These methods are typically handcrafted and tuned by designers rather than learned from data.

Games have also served as benchmarks for research AI, from chess and Go programs such as AlphaGo to agents trained with reinforcement learning to play StarCraft II and Dota 2. Machine learning has been applied in development to testing, animation, upscaling and content generation, and experiments with language-model-driven characters continue. Designers debate how much unpredictability players want, and how to keep AI behavior controllable, performant and honest about any advantages it receives, such as hidden information.

Key points

  • Game AI prioritizes entertaining, believable behavior over optimal play.
  • Common techniques include state machines, behavior trees, planners, utility systems and A* pathfinding.
  • Director systems, as in Left 4 Dead, adjust pacing and difficulty dynamically.
  • Chess, Go, StarCraft II and Dota 2 have all served as benchmarks for research AI.

Related entries

Glossary term

Any character in a game that is not controlled by a player, but instead by a game master or by the game's own software.

Glossary term

Artificial Intelligence

AIIdeas and Culture

Field of computer science that builds systems able to perform tasks usually associated with human intelligence, such as reasoning, learning and perception.

Glossary term

Machine learning approach in which an agent learns to choose actions by trial and error, guided by rewards and penalties from its environment.

Technology

AlphaGo

AIVideo Games

Go-playing program from DeepMind that became the first to defeat a top professional player, beating Lee Sedol four games to one in 2016.

Glossary term

Procedural Generation

Video GamesProgramming

Creation of content such as levels, terrain, textures or stories by algorithms rather than by hand, widely used in games and computer graphics.

Glossary term

Algorithm

ProgrammingAI

Finite sequence of well-defined steps for solving a problem or performing a computation, such as sorting a list or finding a route.

Glossary term

Immersive Sim

Video Games

Game genre built on interlocking simulated systems that let players solve problems in many self-directed ways, often from a first-person view.

Glossary term

Game Engine

Video GamesProgramming

Software framework that provides the core systems for building games, such as rendering, physics, audio, input, scripting and editing tools.

Referenced by

Other entries that discuss or point to Game AI.