Download presentation
Presentation is loading. Please wait.
Published byLorin Jackson Modified over 9 years ago
1
Qualitative Spatial Analysis Chris Mansley
2
Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location of units Qualitative items are much more intangible but intimately related to qualitative items By decoupling the two, more general code/ideas can be used about the AI
3
An example Trafficablity Given a map and an echelon Restricted (Impassible) Restricted (Passable) Unrestricted Mobility Corridors Avenues of Approach
4
Example (cont.)
6
Motivations Game worlds are increasingly more complex NPC must be able to reason about them in an intelligent fashion Dynamic environments Makes scripting less of an option Leads to more problems
7
Two Implementations Spatial Database Driven by the dynamic environments associated with FPS Terrain Analysis Needed a realistic way to analyze strategic value in RTS
8
Conventional Methods Conventional Spatial Ideas NPCs are guided by “hints” placed in the level by designers Offline analysis of level to build a data structure the NPCs can use to interact with the environment
9
AI Nodes
10
Conventional Methods (cont.) Flaws Only works for static environments! May be difficult with random maps
11
Spatial Databases 2-D Grid overlaid on the game world Each cell can have many layers of data Can be thought of as several grids laid on top of one another
12
Spatial Databases Search layer Occupancy layer Openness layer
13
Data Layers Openness Layer (Static) Cover Layer (Static) Area Search Layer (Dynamic) Area Occupancy Layer (Dynamic) Line-of-Fire Layer (Dynamic) Light Level Layer (Dynamic)
14
Using Layers Layers can be combine to form desirability layers for different scenarios Combat Desirability Openness Occupancy Cover
15
Using Layers (cont.) Benefits Implicitly coordinate multiple AI units Generate multiple movements for different actions
16
Using Layers (cont.) Drawbacks Does not handle 3-D environments easily Simple Solution – break 3-D environment into smaller grids Potentially processor intensive Streamline resolution of grid to get best possible results
17
Calculating Desirability Cover layer Occupancy layer Openness layer 1 0.6 0 Desirability layer 0 1 0.8 1 0.6 00 1 00 00 00 =
18
Openness Layer A cell containing a wall or blocking object contains a zero All other cells contain a one The zero is propagated to neighboring cells to be able to determine proximity to the wall
19
Openness Layer (cont.) Solid Wall
20
Area Occupancy Layer Similar to fog-of-war feature from RTS Nonzero values are placed where the unit is located That value is propagated to the neighboring cells
21
Area Occupancy Layer (cont.)
22
Line-of-Fire Layer Useful with ranged weapons Helps AI avoid shooting each other Has a nonzero value in each cell in the direction of fire
23
Line-of-Fire (cont.)
24
Light Level Dynamic lighting is an important part of modern games Visibility/area lighting can be taken into account by NPCs The layer has the light intensity at any cell
25
Area Search Layer In many “sneaker” games, the NPCs spend time searching for the player Once searched, the area layer contains true or some nonzero value Over time that layer can decay, so the NPC will research it if necessary
26
Thief: Deadly Shadows
27
References AI Game Programming Wisdom 2 Forbus, K., “How Qualitative Spatial Reasoning Can Improve Strategy Game AIs”, IEEE Intelligent Systems, July/August 2002 Thief: Deadly Shadows, Ion Storm/Eidos Interactive 2004
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.