100%(1)1 out of 1 people found this document helpful
This preview shows page 76 - 78 out of 139 pages.
Computing optimal ways of achieving these goals may involveoptimization algorithmsat a low level(e.g., find the shortest path from here to there) progressing up to complexplanning strategiesat a highlevel (e.g., assemble a bunch of wooden crates in order to form a stable structure making it possible toclimb out of a pit).Often in games, AI is most evident in games when it fails, that is, when nonplaying characters behavein an inexplicably nonsensical manner. (For example, a pedestrian character that continues to walknonchalantly down the street in the midst of a gun fight.)Roles of Game AI:Generally, AI is used in games is to determine complex behaviors that not specifiedby the player nor a direct effect of physics. Examples include:Nonplayer Opponents:In a first-person shooter game, opponents should exhibit realistic attackbehavior, which might include a decreased level or aggression or even retreating when sufferingdamage.Nonplayer Teammates:Given a squadron of soldiers, the group should move in a coordinated sup-portive manner. Such support NPCs are sometimes employed in multiplayer online games to assistinexperienced players. While in some contexts, this might be scripted by the game designer, typ-ically this is handled by the game’s AI system.Artificial Intelligence: Basics76CMSC 425
Support and Autonomous Characters:This includes generating realistic crowd behavior, wherethe characters may need to interact in a realistic manner when coming into contact with theplayer’s character.Commentary/Instruction:Again, this is typically scripted, but an example requiring AI mightinvolve determining whether the player is stuck and in need of a hint on how to proceed.The key element in all of these examples is the feature ofcomplexity. Examples of things that arenotAI include:Determined by physical laws:Examples include the way in which a basketball bounces off the rimof a basket, or the spinning motion of a car that just hit an obstacle.Purely random:For example, the shape of the next block that falls in a game of Tetris.Direct response to game rules/user inputs:This includes events for which the response is prede-termined by the game designer. This includes typical camera control, scripted animations, eventsthat are triggered by the user’s inputs, and events that are scheduled to occur at a particular timeor after a particular time delay.One notable gray area is where AI ends and animation begins. For example, a soccer player dribblingthe ball must make decisions as to how to avoid opponents, which in turn affects the direction andspeed with which he/she runs, which in turn affects joint angles.Typically, AI systems control thehigh-level decisions and the animation controls the lower level decisions:Should I run with the ball or pass it?Definitely an AI decision (unless scripted or determinedby user input).