artificial intelligence in video games in strategy games like freeciv the game ai must deal with large amounts of information in video games artificial intelligence is used to generate responsive adaptive or intelligent behaviors primarily in nonplayer characters npcs similar to humanlike intelligence the techniques used typically draw upon existing methods from the field of artificial intelligence ai 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 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 many industry and corporate voices however many since game ai for npcs is centered on appearance of intelligence and good gameplay within environment restrictions its approach is very different from that of traditional ai history game playing was an area of research in ai from its inception one of the first examples of ai is the computerised game of nim made in 1951 and published in 1952 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 the first video games developed in the 1960s and early 1970s like spacewar pong and gotcha 1973 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 racing video game and the atari games qwak duck hunting light gun shooter and pursuit fighter aircraft dogfighting simulator two textbased computer games from 1972 hunt the wumpus and star trek 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 light cycle characters compete to be the last one riding in gltron 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 1978 which sported an increasing difficulty level distinct movement patterns and ingame events dependent on hash functions based on the players input galaxian 1979 added more complex and varied enemy movements including maneuvers by individual enemies who break out of formation pacman 1980 introduced ai patterns to maze games with the added quirk of different personalities for each enemy karate champ 1984 later introduced ai patterns to fighting games although the poor ai prompted the release of a second version first queen 1988 was a tactical action rpg which featured characters that can be controlled by the computers ai in following the leader the roleplaying video game dragon quest iv 1990 introduced a tactics system where the user can adjust the ai routines of nonplayer characters during battle a concept later introduced to the action roleplaying game genre by secret of mana 1993 games like madden football earl weaver baseball and tony la russa baseball all based their ai on 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 playerdefined managerial or coaching strategy the emergence of new game genres in the 1990s prompted the use of formal ai tools like finite state machines realtime strategy games taxed the ai with many objects incomplete information pathfinding problems realtime decisions and economic planning among other things later games in the genre exhibited more sophisticated ai later games have used bottomup ai methods such as the emergent behaviour and evaluation of player actions in games like creatures or black white faade interactive story 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 jeopardyplaying 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 halfdozen rules of thumb or heuristics that are just enough to give a good gameplay experience 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 games 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 use cheating 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 go computer checkers computer poker players computer bridge computer shogi computer arimaa logistello which plays reversi rogomatic 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 further information video game bot game aiheuristic algorithms are used in a wide variety of quite disparate fields inside a game the most obvious is in the control of any npcs in the game although scripting decision tree is currently the most common means of control pathfinding another common use for ai is widely seen in realtime 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 rather than improve the game ai to properly solve a difficult problem in the virtual environment it is often more costeffective 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 the concept of emergent ai has recently been explored in games such as creatures black white and nintendogs and toys such as tamagotchi the pets in these games are able to learn from actions taken by the player and their behavior is modified accordingly while these choices are taken from a limited pool it does often give the desired illusion of an intelligence on the other side of the screen video game combat ai many contemporary video games fall under the category of action first person shooter or adventure in most of these types of games there is some level of combat that takes place the ais ability to be efficient in combat is important in these genres a common goal today is to make the ai more human or at least appear so one of the more positive and efficient features found in modernday video game ai is the ability to hunt ai originally reacted in a very black and white manner if the player were in a specific area then the ai would react in either a complete offensive manner or be entirely defensive in recent years the idea of hunting has been introduced in this hunting state the ai will look for realistic markers such as sounds made by the character or footprints they may have left behind these developments ultimately allow for a more complex form of play with this feature the player can actually consider how to approach or avoid an enemy this is a feature that is particularly prevalent in the stealth genre another development in recent game ai has been the development of survival instinct ingame computers can recognize different objects in an environment and determine whether it is beneficial or detrimental to its survival like a user the ai can look for cover in a firefight before taking actions that would leave it otherwise vulnerable such as reloading a weapon or throwing a grenade there can be set markers that tell it when to react in a certain way for example if the ai is given a command to check its health throughout a game then further commands can be set so that it reacts a specific way at a certain percentage of health if the health is below a certain threshold then the ai can be set to run away from the player and avoid it until another function is triggered another example could be if the ai notices it is out of bullets it will find a cover object and hide behind it until it has reloaded actions like these make the ai seem more human however there is still a need for improvement in this area another sideeffect of combat ai occurs when two aicontrolled characters encounter each other first popularized in the id software game doom socalled monster infighting can break out in certain situations specifically ai agents that are programmed to respond to hostile attacks will sometimes attack each other if their cohorts attacks land too close to them in the case of doom published gameplay manuals even suggest taking advantage of monster infighting in order to survive certain levels and difficulty settings uses in games beyond npcs georgios n yannakakis suggests that academic ai developments may play roles in game ai beyond the traditional paradigm of ai controlling npc behavior he highlights four other potential application areas playerexperience modeling discerning the ability and emotional state of the player so as to tailor the game appropriately this can include dynamic game difficulty balancing which consists in adjusting the difficulty in a video game in realtime based on the players ability game ai may also help deduce player intent such as gesture recognition proceduralcontent generation creating elements of the game environment like environmental conditions levels and even music in an automated way ai methods can generate new content or interactive stories data mining on user behavior this allows game designers to explore how people use the game what parts they play most and what causes them to stop playing allowing developers to tune gameplay or improve monetization alternate approaches to npcs these include changing the game setup to enhance npc believability and exploring social rather than individual npc behavior rather than procedural generation some researchers have used generative adversarial networks gans to create new content in 2018 researchers at cornwall university trained a gan on a thousand humancreated levels for doom 1993 following training the neural net prototype was able to design new playable levels on its own similarly researchers at the university of california protyped a gan to generate levels for super mario cheating ai dani bunten was once asked how to playbalance a game her one word answer was cheat asked what to do if gamers complained she said liejohnny l wilson of computer gaming world 1994 gamers always ask if the ai cheats presumably so they can complain if they loseterry lee coleman of computer gaming world 1994 in the context of artificial intelligence in video games cheating refers to the programmer giving agents actions and access to information that would be unavailable to the player in the same situation for example if the agents want to know if the player is nearby they can either be given complex humanlike sensors seeing hearing etc or they can cheat by simply asking the game engine for the players position common variations include giving ais higher speeds in racing games to catch up to the player or spawning them in advantageous positions in first person shooters the use of cheating in ai shows the limitations of the intelligence achievable artificially generally speaking in games where strategic creativity is important humans could easily beat the ai after a minimum of trial and error if it were not for this advantage cheating is often implemented for performance reasons where in many cases it may be considered acceptable as long as the effect is not obvious to the player while cheating refers only to privileges given specifically to the aiit does not include the inhuman swiftness and precision natural to a computera player might call the computers inherent advantages cheating if they result in the agent acting unlike a human player examples creatures 1996 creatures is an artificial life program where the user hatches small furry animals and teaches them how to behave these norns can talk feed themselves and protect themselves against vicious creatures its the first popular application of machine learning into an interactive simulation neural networks are used by the creatures to learn what to do the game is regarded as a breakthrough in artificial life research which aims to model the behavior of creatures interacting with their environment sid meiers alpha centauri 1999 halo combat evolved 2001 a firstperson shooter where the player assumes the role of the master chief battling various aliens on foot or in vehicles enemies use cover very wisely and employ suppression fire and grenades the squad situation affects the individuals so certain enemies flee when their leader dies a lot of attention is paid to the little details with enemies notably throwing back grenades or teammembers responding to you bothering them the underlying behavior tree technology has become very popular in the games industry especially since halo 2 fear 2005 a firstperson shooter where the player helps contain supernatural phenomenon and armies of cloned soldiers the ai uses a planner to generate contextsensitive behaviors the first time in a mainstream game this technology used as a reference for many studios still today the enemies are capable of using the environment very cleverly finding cover behind tables tipping bookshelves opening doors crashing through windows and so on squad tactics are used to great effect the enemies perform flanking maneuvers use suppression fire etc stalker series 2007 a firstperson shooter survival horror game where the player must face manmade experiments military soldiers and mercenaries known as stalkers the various encountered enemies if the difficulty level is set to its highest use combat tactics and behaviours such as healing wounded allies giving orders outflanking the player or using weapons with pinpoint accuracy far cry 2 2008 a firstperson shooter where the player fights off numerous mercenaries and assassinates faction leaders the ai is behavior based and uses action selection essential if an ai is to multitask or react to a situation the ai can react in an unpredictable fashion in many situations the enemies respond to sounds and visual distractions such as fire or nearby explosions and can be subject to investigate the hazard the player can utilize these distractions to his own advantage there are also social interfaces with an ai but however not in the form of direct conversation but more reactionary if the player gets too close or even nudges an ai the player is subject to getting shoved off or sworn at and by extent getting aimed at other social interfaces between ai exist when in combat or neutral situations if an enemy ai is injured on the ground he will shout out for help release emotional distress etc starcraft ii 2010 a realtime strategy game where a player takes control of one of three factions in a 1v1 2v2 or 3v3 battle arena the player must defeat his opponents by extinguishing all their units and bases this is accomplished by creating units that are effective at countering your opponents units players can play against multiple different levels of ai difficulty ranging from very easy to cheater 3 insane the ai is able to cheat at the difficulty cheater 1 vision where it begins to have vision assistance on your location and units cheater 2 gives the ai extra resources while cheater 3 give an extensive advantage over its opponent artificial intelligence portal game development portal ai effect applications of artificial intelligence behavior model video game bot simulated reality kynapse game ai middleware specializing in path finding and spatial reasoning ailive a suite of game ai middleware xaitment graphical game ai software lists list of emerging technologies list of game ai middleware outline of artificial intelligence bibliography bogost ian 2017 artificial intelligence has become meaningless bourg seemann 2004 ai for game developers oreilly associates isbn0596005555 buckland 2002 ai techniques for game programming muska lipman isbn193184108x buckland 2004 programming game ai by example wordware publishing isbn1556220782 champandard 2003 ai game development new riders isbn1592730043 eaton eric et al 2015 who speaks for ai funge 1999 ai for animation and games a cognitive modeling approach a k peters isbn1568811039 funge 2004 artificial intelligence for computer games an introduction a k peters isbn1568812086 kaplan jerry 2017 ais pr problem millington 2005 artificial intelligence for games morgan kaufmann isbn0124977820 schwab 2004 ai game engine programming charles river media isbn1584503440 smed and hakonen 2006 algorithms and networking for computer games john wiley sons isbn0470018127 artificial intelligence for games special interest group on artificial intelligence igda ai game programming wisdom on aiwisdomcom game ai for developers on aigamedevcom ai section at gamedevnet the general video game ai competition vtegame design elementssubjects relating to game design video game design game studies gameplay and game mechanicsconcepts balance game theory interactivity lusory attitude magic circle meaningful play rules action point build order continue difficulty level experience point game over health kingmaker scenario magic point permanent death point of no return probability of kill score six degrees of freedom technology tree unwinnable modes attract mode bonus stage cpu vs cpu capture the flag conquest cooperative gameplay deathmatch game replay hotseat king of the hill last man standing multiplayer new game plus nonlinear gameplay player versus environment player versus player realtime vs turnbased gameplay singleplayer sudden death time attack time trial turnbased game systems character creation dialog tree dynamic game difficulty balancing gold sink instance dungeon leveled gameplay monster infighting minigame puzzle quicksaving quick time event random dungeon random encounter roleplaying battle systems saved game spawning spawn point virtual economy activities combo double jump finishing move frag grind headshot looting macromanagement micromanagement quest raid special attack syntax guessing timesink twitch gameplay wall jump behavior actions per minute button mashing bunny hopping camping cheating circle strafing crowd control griefer kill stealing kiting maphack minmaxing ogging online creation powergaming rocket jumping respecing rush sequence breaking spam speedrun power spike spray and pray strafejumping straferunning tank tap team killing toolassisted speedrun trickjump turtle twinking wallhacking items 1up hitscan magic satchel nuke powerup effects buff cooldown critical hit damage over time damage per second splash damage status effect feedback automap cutscene fog of war ghost gibs hud minimap overworld characters artificial intelligence avatar boss bot mob nonplayer character paper doll player character super move win quote environment invisible wall level line of sight open world persistent world 