Artificial Intelligence in Games Week 7

Slides:



Advertisements
Similar presentations
Artificial Intelligence in Game Design
Advertisements

AI Pathfinding Representing the Search Space
Matt Mitchell David Pennenga John Formica.  Topics to cover  Levels of threat  Straying from the team  Use of caution  Team context  Speed of movement.
1 CO Games Development 2 Week 15 Terrain Analysis Gareth Bellaby.
Multi-tiered AI Patrick Schmid. Multi-tiered AI We already saw a presentation about this topic Remember Ke‘s presentation? Short recap.
An overview of current and potential techniques for squad based tactics in games. Bryan Auslander
DEFENSIVE POSITIONS.
Pathfinding Basic Methods.
Half life 2/ Counter Strike: Source bot Charlie Cross CIS
CSE 380 – Computer Game Programming Pathfinding AI
Squad Tactics- Ambush.
Artificial Intelligence in Game Design Intelligent Decision Making and Decision Trees.
Artificial Intelligence in Game Design Hierarchical Finite State Machines.
1 AI for Computer Game Developers Finite state machines Path finding and waypoints A-Star path finding.
Using Cellular Automata and Influence Maps in Games
Patrolling. Agenda Unit OrganizationUnit Organization Common Hand & Arm SignalsCommon Hand & Arm Signals MovementMovement Actions at Danger AreasActions.
BATTLE DRILLS.
Tactical AI in Real Time Supervisor: Aleks Jakulin Crew: Damir Arh, Matija Jekovec, Mitja Luštrek Gregor Leban, Martin Žnidaršič, Uroš Čibej Translation:
AI Evaluation F.E.A.R.. How AI is used in F.E.A.R. Controls all enemy unit behaviors and actions Patrolling Attacking Ducking under cover etc. Other NPC.
Tactical and Strategic Reasoning  Covers…  Deducing tactical situations from sketchy (limited) information  Using tactical situations to make decisions.
The Greedy Wall Building algorithm Rami Khouri. Ideal definition of Wall Either keeps valuable assets in, or enemies out…mostly keep enemies out Impassable,
Chapter 5.4 Artificial Intelligence: Pathfinding.
Squad Tactics Presentation By: Danny Powell, Andrew Pro, and Kofi White.
Video Game AI. Classical Games – Focus on optimal players using computationally expensive search techniques Video Game AI – Refers to games such as First.
Game Playing Chapter 5. Game playing §Search applied to a problem against an adversary l some actions are not under the control of the problem-solver.
AI in FPS. Contents FPS AI Architecture –Animation –Movement –Combat –Behavior Positioning strategy –Waypoint –Pinch Point.
1 The Use of Artificial Intelligence in the Computer Game Industry.
Battle Drills Break Contact React to Ambush React to Contact
Design of a real time strategy game with a genetic AI By Bharat Ponnaluri.
August 31, 2005 Game Developer Conference Europe Killzone’s AI: Dynamic Procedural Tactics Guerrilla Games - 1 Killzone’s AI: Dynamic Procedural Tactics.
Ch 7.1: Using a Spatial Database for Runtime Spatial Analysis.
Artificial Intelligence in Game Design
Artificial Intelligence in Game Design Dynamic Path Planning Algorithms.
Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.
Jumping, Climbing, and Tactical Reasoning Section 2.5 Tom Schaible CSE 497 – AI & Game Programming.
Artificial Intelligence in Game Design Complex Steering Behaviors and Combining Behaviors.
WORLD NAVIGATION Don’t Fall Asleep Through These Topics  Tile Graphs  Points of Visibility  NavMesh  Path Smoothing  Hierarchical Pathfinding.
Break Contact By: SGT Russman Reference: FM ; Ranger Handbook.
11TH INFANTRY REGIMENT BATTLE DRILLS IOBC.
Coaching Pack 12 – 16 Years. What Am I Coaching Today? What Might the Players Learn or Get Better at? TechnicalPsychological example PhysicalSocial example.
Coaching Pack 9 – 11 Years. What Am I Coaching Today? What Might the Players Learn or Get Better at? TechnicalPsychological example PhysicalSocial example.
F.E.A.R. Game AI Evaluation by Robert Rak. What is F.E.A.R. ? FEAR is a First Person Shooter game Player takes on the role of an elite strike force team.
CS 484 Load Balancing. Goal: All processors working all the time Efficiency of 1 Distribute the load (work) to meet the goal Two types of load balancing.
Chess Strategies Component Skills Strategies Prototype Josh Waters, Ty Fenn, Tianyu Chen.
Artificial Intelligence in Game Design Influence Maps and Decision Making.
Artificial Intelligence in Game Design Lecture 8: Complex Steering Behaviors and Combining Behaviors.
Level Design Document StarCraft 2 Map for World Of Tanks Pajman Sarafzadeh.
CSCE 552 Spring 2010 AI (III) By Jijun Tang. A* Pathfinding Directed search algorithm used for finding an optimal path through the game world Used knowledge.
Breaking Contact B Trp 7-10 CAV 4ID Reference Material
1 CO Games Development 2 Week 13 Influence Maps Gareth Bellaby.
The Game Development Process: Artificial Intelligence.
Team Member AI in an FPS and Goal Oriented Action Planning.
Chapter 5.4 Artificial Intelligence: Pathfinding
BackTracking CS255.
Movement in a full and dynamic environment using a limited influence map Paulo Lafeta Ferreira Artificial Intelligence for Games – CS 580 Professor: Steve.
Enemy and Friendly AIs Richard Gesick.
Schedule for next 2 weeks
CO Games Development 2 Week 19 Extensions to Finite State Machines
Active Shooter How to survive. Lt. James Reese
Force Packaging.
CIS 488/588 Bruce R. Maxim UM-Dearborn
SQUAD TACTICS- AMBUSH.
Environment Design.
Ch 7.1: Using a Spatial Database for Runtime Spatial Analysis
Solving problems by searching
CSCE 552 Spring 2009 AI (III) By Jijun Tang.
Chapter 7 Software Testing.
Basic Active Shooter Overview for Community Colleges
Solving problems by searching
ALICE Training.
Presentation transcript:

Artificial Intelligence in Games Week 7 Steve Rabin steve.rabin@gmail.com www.aiwisdom.com/uw

Pathfinding Integration Project How did it go? Any problems? How much time did it take?

Euphoria Demo

Tactics and Terrain Analysis

Terrain Analysis Algorithmic analysis of terrain In general: Automated with no human intervention Alternative to hard-coding regions of interest In general: Are there spots on the terrain that are advantageous to me? How can these be determined algorithmically? Given the current terrain, how can I tease out this info?

Terrain Analysis: Real-Time Strategy Games What are static points of interest on an RTS map? What are dynamic points of interest during an RTS battle?

Terrain Analysis: Real-Time Strategy Games Chokepoints Barriers force units through narrow path Barriers can be cliffs, walls, water, etc. Ambush sites High terrain overlooking low terrain chokepoint Wall building sites Low cost for building walls Natural barriers so not much wall required Cliffs Water Edge of map Identify front of the battle Identify flanking routes Identify inferior forces

Terrain Analysis: First-Person Shooter Games What are static points of interest in an FPS map? What are dynamic points of interest during an FPS fight?

Terrain Analysis: First-Person Shooter Games Cover points Shielding Darkness Sniper points Good cover point (shielding, darkness) Potential high visibility to a large area Rear coverage Height advantage Escape route Safe paths to move from area to area Low casualties in path Low visibility to other areas Good cover along path Line-of-sight vulnerability Stay out of other's line-of-sight

Tactical Reasoning in a First-Person Shooter Visibility is a good tactical indicator Does spot provide cover? Front cover and rear cover? How safe is it? Does spot provide accessibility? Is a given spot good to shoot from? Can we escape easily? How dangerous is it?

Tactical Reasoning with Waypoints: Half-Life 2 (first-person shooter) Implementation strategy: Preprocess terrain, storing visibility info Can area A see area B? Store visibility info in waypoint nodes Node A’s ability to see every other node How would you store it?

Tactical Reasoning with Waypoints: Storing Visibility Information Store visibility info with bit strings Can perform operations on groups and or not

Tactical Reasoning with Waypoints: Safe and Dangerous Nodes Which locations are Potentially safe? Potentially dangerous? Safe pathfinding Penalize dangerous nodes These are node visibilities What about the actual enemies?

Tactical Reasoning with Waypoints: Attack Positioning Visible nodes Show where you could attack from But no cover Better strategy Find a node to attack enemy X from Which is also shielded from other enemies

Tactical Reasoning with Waypoints: Attack Positioning 1. Get nodes visible to selected enemy 2. Get nodes visible to other enemies 3. Get safe nodes to attack from: 3 = 1 & !2

Tactical Reasoning with Waypoints: Attack Positioning Other strategies Take cover from everyone Find a safe node that is close to a completely safe node (in case NPC needs to reload) Flanking Eliminate attack points that the enemy is facing For sneaking up on enemies

Tactical Reasoning with Waypoints: Static Waypoint Analysis Determine danger of each node in a static environment Weight each node based on number of nodes that can see it If pathfinding takes into consideration Paths are less likely to be visible to enemies

Tactical Reasoning with Waypoints: Static Waypoint Analysis Nodes marked for visibility count Sniper nodes have high exposure next to nodes with low exposure

Tactical Reasoning with Waypoints: Pinch Points and Squad Tactics Identify pinch points as ambush spots 1. Find node (N) with only two neighbors 2. One neighbor node must be in confined area 3. Nodes connected to other neighbor nodes are ambush spots

Tactical Reasoning with Waypoints: Limitations Must use hierarchy of networks to reduce size of bit strings Ducking action can make some nodes both good cover and good attack locations Annotate these nodes Unidirectional connections makes it a little more complicated Density of waypoints impacts quality of reasoning

Influence Mapping

Influence Mapping Abstracts distribution of power 2D grid superimposed on terrain Unit strength is summed into grid cells Influence declines exponentially with distance Helps determine Weaknesses Neutral routes to flank enemy The “front” of the battle

Influence Mapping: Basic Influence Map

Influence Mapping: Engagement

Influence Mapping: Analysis of Options

Influence Maps: Other Uses SimCity Non-violent use Influence of crime, pollution, police, fire stations, etc

Spatial Database for Spatial Analysis

Spatial Database for Spatial Analysis Generalize “terrain reasoning with waypoints” Use a grid instead Expand to capture dynamic features Capture other interesting aspects

Spatial Database for Spatial Analysis: Many Layers of Grids Visibility How many squares are visible Openness layer Proximity to static obstacles Cover layer Locations where AI can take cover from gunfire Area occupancy layer Number of units in an area Line-of-fire layer Direction that weapons are being aimed Light level layer Brightness or darkness of any spot Area search layer Spots that have been searched

Spatial Database for Spatial Analysis: Openness Layer

Spatial Database for Spatial Analysis: Area Occupancy Layer

Spatial Database for Spatial Analysis: Line-of-Fire Layer

Spatial Database for Spatial Analysis: Combine Layers Combat desirability layer Represents desirability of moving into any given area in combat Combines openness, static cover, area occupancy layers

Project 3: Implement Terrain Analysis Due next week (May 19th) (100%) Create at least 3 simple layers of grids and 1 combined layer that can be toggled through (with the "L" key) Possible layers: Openness Layer, Occupancy Layer, Line-of-Fire Layer, Cover Area Layer, Area Search Layer, and Combat Desirability Layer Extra Credit: (10%) Have the agents use the information to do something intelligent

Squad Tactics

Squad Tactics: Decentralized vs Centralized

Squad Tactics: Decentralized Squad

Squad Tactics: Decentralized Squad Key points: Extension of individual AI Easy to add to existing AI Robustly handles many situations Deals well with a variety of capabilities within the team Can be easily combined with scripted squad member actions Cooperation and group behavior emerges from individual behaviors Technique used in original Half-Life

Squad Tactics: Decentralized Squad void SoloAI::Think() { CombatSitiation* sit = GetSituation(): sit->Observe(); for each available action { if(action.IsApplicable(sit)) { determine value of action in sit; if better than best action, make best action } execute best action(); void SoloAI::Think() { CombatSitiation* sit = GetSituation(): sit->Observe(); sit->ProcessTeamIntentions(); sit->ProcessTeamObservations(); for each available action { if(action.IsApplicable(sit)) { determine value of action in sit; if better than best action, make best action } nearbySqdMembers->AnnounceAction(); execute best action();

Squad Tactics: Solo AI vs Squad Member Fire-and-maneuver behavior If too many static squad members, move up If too many engaging threat, won't stop to engage same threat Robust against squad member casualties Interactions easily translated to audio for effect/realism

Squad Tactics: Squad Assault Tactical behavior (on top of fire/move) Stay close to cover Don't block other's line-of-fire Take weapon ability into account Maintain team cohesion / line-of-sight Spread out to avoid being a single target Keep a line-of-sight on enemy

Squad Tactics: Squad Assault – Squad Members Mental Picture For each squad member Current pos and activity Claimed destination Line-of-fire For each opponent Last known position and state Estimated position Squad members engaging this opponent For other threats (grenades, fires) Known/estimated position Damage radius

Squad Tactics: Squad Assault with Four-Man Patrol in Hostile Situation

Squad Tactics: Leader evaluating positions and picking one (center, top)

Squad Tactics: Executing L-Shaped Ambush Wait until enemy enters kill zone, aggressively attack, pull back to predefined rally point Problems Decentralized squad has trouble waiting until right moment to attack. Attack moment requires some kind of coordination Squad lacks autonomy Can't create L-shape itself, can't abort if enemy doesn't show up

Squad Tactics: Decentralized Squad (reference)

Squad Tactics: Relation Between Squad and Squad Member

Squad Tactics: Centralized Approach Advantages Separates concerns – reduces number of problems each AI has to deal with Saves CPU – do computations once AIs can be specialized independently from each other

Squad Tactics: Centralized Approach Authoritarian command style No "I" in "team" Squad can sacrifice a member to achieve a goal Squad member's view might conflict with squad's objective Told to defend a front, but sniper is behind Coaching command style Each squad member given tasks Can choose to ignore and tell squad he can't comply Deals with sniper case But squad members get distracted easily

Squad Tactics: Situation and Extracted Features Force ratio 5:3, line-of-fire ratio 2:1

Squad Tactics: FSM for Valid Maneuvers Avoids oscillations FSM prevents attacking before completing pullback

Squad Tactics: Bounding Overwatch Pullback Tail Squad Member’s Behavior Teammates lay down suppression fire

Squad Tactics: Bounding Overwatch Pullback Pullback path, Cover fire locations, and two bounding moves in progress

Squad Tactics: Stages of Performing a Maneuver

Team Member AI: Avoiding Friendly Fire If player is shooting, how can buddy AI avoid friendly fire? If player is moving around, how can buddy AI avoid friendly fire?

Team Member AI: Avoiding Friendly Fire Two options

Planning

Planning Find series of actions for AI that changes the current configuration of the game world into a target configuration Planning allows innovative solutions when the game world is sufficiently rich Requires Planning algorithm World representation Choosing set of actions Action Preconditions Effects

Planning

Planning Config1: Target not dead Action: Attack Config2: Target is dead, Weapon must be loaded Action: Load Weapon Config3: Target is dead, Weapon loaded, Weapon must be armed Acton: Draw Weapon Config4: Target is dead, Weapon is loaded, Weapon is armed