Artificial intelligence in video games
in video games refers to the computational systems that control non-player characters, generate dynamic game behavior, or simulate strategic decision-making. In practice, the term covers a broad range of techniques drawn from computer science, control theory, and robotics rather than “true” artificial intelligence. Moreover, academic AI—aimed at developing autonomous reasoning or learning—is distinct from game AI, whose goal is to deliver engaging, believable, and efficient behavior for players.
In general, game AI does not, as might be thought and sometimes is depicted to be the case, mean a realization of an artificial person corresponding to an NPC in the manner of the Turing test or an artificial general intelligence.
Overview
The term game AI is used to refer to a broad set of algorithms that also include techniques from control theory, robotics, computer graphics and computer science in general, and so video game AI may often not constitute "true AI" in that such techniques do not necessarily facilitate computer learning or other standard criteria, only constituting "automated computation" or a predetermined and limited set of responses to a predetermined and limited set of inputs.Some commentators in the video game industry have claimed that advances in game AI have transformed how players interact with digital systems more broadly. However, such claims remain disputed. Marketing discussions sometimes attribute human-like traits to game AI—such as personality or creative autonomy—but these are often scripted behaviors designed to mimic complexity rather than emergent cognition.
History
Game playing was an area of research in AI from its inception. One of the first examples of AI is the computerized game of Nim made in 1941 and published in 1942. Despite being advanced technology in the year it was made, 20 years before Pong, the game took the form of a relatively small box and was able to regularly win games even against highly skilled players of the game. In 1951, using the Ferranti Mark 1 machine of the University of Manchester, Christopher Strachey wrote a checkers program and Dietrich Prinz wrote one for chess. These were among the first computer programs ever written. Arthur Samuel's checkers program, developed in the middle 1950s and early 1960s, eventually achieved sufficient skill to challenge a respectable amateur. Work on checkers and chess would culminate in the defeat of Garry Kasparov by IBM's Deep Blue computer in 1997. The first video games developed in the 1960s and early 1970s, like Spacewar!, Pong, and Gotcha, were games implemented on discrete logic and strictly based on the competition of two players, without AI.Games that featured a single player mode with enemies started appearing in the 1970s. The first notable ones for the arcade appeared in 1974: the Taito game Speed Race and the Atari games Qwak and Pursuit. Two text-based computer games, Star Trek and Hunt the Wumpus, also had enemies. Enemy movement was based on stored patterns. The incorporation of microprocessors would allow more computation and random elements overlaid into movement patterns.
It was during the golden age of video arcade games that the idea of AI opponents was largely popularized, due to the success of Space Invaders, which sported an increasing difficulty level, distinct movement patterns, and in-game events dependent on hash functions based on the player's input. Galaxian added more complex and varied enemy movements, including maneuvers by individual enemies who break out of formation. Pac-Man introduced AI patterns to maze games, with the added quirk of different personalities for each enemy. Karate Champ later introduced AI patterns to fighting games. First Queen was a tactical action RPG which featured characters that can be controlled by the computer's AI in following the leader. The role-playing video game Dragon Quest IV introduced a "Tactics" system, where the user can adjust the AI routines of non-player characters during battle, a concept later introduced to the action role-playing game genre by Secret of Mana.
Games like Madden Football, Earl Weaver Baseball and Tony La Russa Baseball all based their AI in an attempt to duplicate on the computer the coaching or managerial style of the selected celebrity. Madden, Weaver and La Russa all did extensive work with these game development teams to maximize the accuracy of the games. Later sports titles allowed users to "tune" variables in the AI to produce a player-defined managerial or coaching strategy.
The emergence of new game genres in the 1990s prompted the use of formal AI tools like finite-state machines. Real-time strategy games taxed the AI with many objects, incomplete information, pathfinding problems, real-time decisions and economic planning, among other things. The first games of the genre had notorious problems. Herzog Zwei, for example, had almost broken pathfinding and very basic three-state state machines for unit control, and Dune II attacked the players' base in a beeline and used numerous cheats. Later games in the genre exhibited more sophisticated AI.
Later games have used bottom-up AI methods, such as the emergent behaviour and evaluation of player actions in games like Creatures or Black & White. Façade was released in 2005 and used interactive multiple way dialogs and AI as the main aspect of game.
Games have provided an environment for developing artificial intelligence with potential applications beyond gameplay. Examples include Watson, a Jeopardy!-playing computer; and the RoboCup tournament, where robots are trained to compete in soccer.
Views
Many experts complain that the "AI" in the term game AI overstates its worth, as game AI is not about intelligence, and shares few of the objectives of the academic field of AI. Whereas "real AI" addresses fields of machine learning, decision making based on arbitrary data input, and even the ultimate goal of strong AI that can reason, "game AI" often consists of a half-dozen rules of thumb, or heuristics, that are just enough to give a good gameplay experience. These rules are designed to create the illusion of intelligence and work off of three core principles: the player desiring to believe that there is human-level intelligence in the games they play, the human urge to anthropomorphize nonhuman entities, and finally the power of expectation enhancing the player experience. These principles are further enhanced in the quality and performance of the game AI, “selling the illusion” through animations that are fluid and not robotic, dialog that fits the situation, giving the AI a reason to exist and a personality beyond the player, and having the appropriate reaction to the situation and environment. Historically, academic game-AI projects have been relatively separate from commercial products because the academic approaches tended to be simple and non-scalable. Commercial game AI has developed its own set of tools, which have been sufficient to give good performance in many cases.Game developers' increasing awareness of academic AI and a growing interest in computer games by the academic community is causing the definition of what counts as AI in a game to become less idiosyncratic. Nevertheless, significant differences between different application domains of AI mean that game AI can still be viewed as a distinct subfield of AI. In particular, the ability to legitimately solve some AI problems in games by cheating creates an important distinction. For example, inferring the position of an unseen object from past observations can be a difficult problem when AI is applied to robotics, but in a computer game a NPC can simply look up the position in the game's scene graph. Such cheating can lead to unrealistic behavior and so is not always desirable. But its possibility serves to distinguish game AI and leads to new problems to solve, such as when and how to cheat.
The major limitation to strong AI is the inherent depth of thinking and the extreme complexity of the decision-making process. This means that although it would be then theoretically possible to make "smart" AI the problem would take considerable processing power.
Usage
In computer simulations of board games
- Computer chess
- Computer shogi
- Computer Go
- Computer checkers
- Computer Othello
- Computer poker players
- Akinator
- Computer Arimaa
- Logistello, which plays Reversi
- Rog-O-Matic, which plays Rogue
- Computer players of Scrabble
- A variety of board games in the Computer Olympiad
- General game playing
- Solved games have a computer strategy which is guaranteed to be optimal, and in some cases force a win or draw.
In modern video games
Pathfinding, another common use for AI, is widely seen in real-time strategy games. Pathfinding is the method for determining how to get a NPC from one point on a map to another, taking into consideration the terrain, obstacles and possibly "fog of war". Commercial videogames often use fast and simple "grid-based pathfinding", wherein the terrain is mapped onto a rigid grid of uniform squares and a pathfinding algorithm such as A* or IDA* is applied to the grid. Instead of just a rigid grid, some games use irregular polygons and assemble a navigation mesh out of the areas of the map that NPCs can walk to. As a third method, it is sometimes convenient for developers to manually select "waypoints" that NPCs should use to navigate; the cost is that such waypoints can create unnatural-looking movement. In addition, waypoints tend to perform worse than navigation meshes in complex environments. Beyond static pathfinding, navigation is a sub-field of Game AI focusing on giving NPCs the capability to navigate in a dynamic environment, finding a path to a target while avoiding collisions with other entities or collaborating with them. Navigation in dynamic strategy games with large numbers of units, such as Age of Empires or Civilization V, often performs poorly; units often get in the way of other units.
Rather than improve the Game AI to properly solve a difficult problem in the virtual environment, it is often more cost-effective to just modify the scenario to be more tractable. If pathfinding gets bogged down over a specific obstacle, a developer may just end up moving or deleting the obstacle. In Half-Life, the pathfinding algorithm sometimes failed to find a reasonable way for all the NPCs to evade a thrown grenade; rather than allow the NPCs to attempt to bumble out of the way and risk appearing stupid, the developers instead scripted the NPCs to crouch down and cover in place in that situation.