Chapter 5.3 Artificial Intelligence: Agents, Architecture, and TechniquesArtificial IntelligenceGame Artificial Intelligence: What is considered Game AI?Possible Game AI DefinitionGoals of an AI Game ProgrammerSpecialization of Game AI DeveloperGame AgentsSense-Think-Act Cycle: SensingSensing: Enforcing LimitationsSensing: Human Vision Model for AgentsSensing: Vision ModelSensing: Human Hearing ModelSensing: Modeling HearingSensing: Modeling Hearing EfficientlySensing: CommunicationSensing: Reaction TimesSense-Think-Act Cycle: ThinkingThinking: Expert KnowledgeThinking: SearchThinking: Machine LearningThinking: Flip-Flopping DecisionsSense-Think-Act Cycle: ActingActing: Showing IntelligenceExtra Step in Cycle: Learning and RememberingLearningRememberingRemembering within the WorldMaking Agents StupidAgent CheatingFinite-State Machine (FSM)Finite-State Machine: In Game DevelopmentPowerPoint PresentationFinite-State Machine: UML DiagramFinite-State Machine: ApproachesFinite-State Machine: Hardcoded FSMFinite-State Machine: Problems with switch FSMFinite-State Machine: Scripted with alternative languageFinite-State Machine: Scripting AdvantagesFinite-State Machine: Scripting DisadvantagesFinite-State Machine: Hybrid ApproachFinite-State Machine: ExtensionsCommon Game AI TechniquesCommon AI Techniques: A* PathfindingCommon AI Techniques: Command HierarchyCommon AI Techniques: Dead ReckoningCommon AI Techniques: Emergent BehaviorCommon AI Techniques: FlockingCommon AI Techniques: FormationsCommon AI Techniques: Influence MappingCommon AI Techniques: Level-of-Detail AICommon AI Techniques: Manager Task AssignmentCommon AI Techniques: Obstacle AvoidanceCommon AI Techniques: ScriptingCommon AI Techniques: Scripting Pros and ConsCommon AI Techniques: State MachineCommon AI Techniques: Stack-Based State MachineCommon AI Techniques: Subsumption ArchitectureCommon AI Techniques: Terrain AnalysisCommon AI Techniques: Trigger SystemPromising AI TechniquesPromising AI Techniques: Bayesian NetworksPromising AI Techniques: Blackboard ArchitecturePromising AI Techniques: Decision Tree LearningPromising AI Techniques: Filtered RandomnessPromising AI Techniques: Fuzzy LogicPromising AI Techniques: Genetic AlgorithmsPromising AI Techniques: N-Gram Statistical PredictionPromising AI Techniques: Neural NetworksPromising AI Techniques: PerceptronsPromising AI Techniques: Perceptrons (2)Promising AI Techniques: PlanningPromising AI Techniques: Player ModelingPromising AI Techniques: Production SystemsPromising AI Techniques: Reinforcement LearningPromising AI Techniques: Reputation SystemPromising AI Techniques: Smart TerrainPromising AI Techniques: Speech RecognitionPromising AI Techniques: Text-to-SpeechPromising AI Techniques: Weakness Modification LearningChapter 5.3Artificial Intelligence:Agents, Architecture, and TechniquesCS 4455 2Artificial IntelligenceIntelligence embodied in a man-made deviceHuman level AI still unobtainableCS 4455 3Game Artificial Intelligence:What is considered Game AI?Is it any NPC behavior?–A single “if” statement?–Scripted behavior?Pathfinding?Animation selection?Automatically generated environment?Best shot at a definition of game AI?CS 4455 4Possible Game AIDefinitionInclusive view of game AI:“Game AI is anything that contributes to the perceived intelligence of an entity, regardless of what’s under the hood.”CS 4455 5Goals of anAI Game ProgrammerDifferent than academic or defense industry1. AI must be intelligent, yet purposely flawed2. AI must have no unintended weaknesses3. AI must perform within the constraints4. AI must be configurable by game designers or players5. AI must not keep the game from shippingCS 4455 6Specialization ofGame AI DeveloperNo one-size fits all solution to game AI–Results in dramatic specialization Strategy Games–Battlefield analysis–Long term planning and strategyFirst-Person Shooter Games–One-on-one tactical analysis–Intelligent movement at footstep levelReal-Time Strategy games the most demanding, with as many as three full-time AI game programmersCS 4455 7Game AgentsMay act as an–Opponent–Ally–Neutral characterContinually loops through the Sense-Think-Act cycle–Optional learning or remembering stepCS 4455 8Sense-Think-Act Cycle:SensingAgent can have access to perfect information of the game world–May be expensive/difficult to tease out useful infoGame World Information–Complete terrain layout–Location and state of every game object–Location and state of playerBut isn’t this cheating???CS 4455 9Sensing:Enforcing LimitationsHuman limitations?Limitations such as–Not knowing about unexplored areas–Not seeing through walls–Not knowing location or state of playerCan only know about things seen, heard, or told aboutMust create a sensing modelCS 4455 10Sensing:Human Vision Model for AgentsGet a list of all objects or agents; for each:1. Is it within the viewing distance of the agent?•How far can the agent see?•What does the code look like?2. Is it within the viewing angle of the agent?•What is the agent’s viewing angle?•What does the code look like?3. Is it unobscured by the environment?•Most expensive test, so it is purposely last•What does the code look like?CS 4455 11Sensing:Vision ModelIsn’t vision more than just detecting the existence of objects?What about recognizing interesting terrain features?–What would be interesting to an agent?CS 4455 12Sensing:Human Hearing ModelHumans can hear sounds–Can recognize sounds•Knows what emits each sound–Can sense volume•Indicates distance of sound–Can sense pitch•Sounds muffled through walls have more bass–Can sense location•Where sound is coming fromCS 4455 13Sensing:Modeling HearingHow do you model hearing efficiently?–Do you model how sounds reflect off every surface?–How should an agent know about sounds?CS 4455 14Sensing:Modeling Hearing EfficientlyEvent-based approach–When sound is emitted, it alerts interested agentsUse distance and zones to determine how far sound can travelCS 4455 15Sensing:CommunicationAgents might talk amongst themselves!–Guards might alert other guards–Agents witness player location and spread the wordModel sensed knowledge through communication–Event-driven when agents within vicinity of each otherCS 4455 16Sensing:Reaction TimesAgents shouldn’t see, hear, communicate
View Full Document