Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable...
-
Upload
lorin-jackson -
Category
Documents
-
view
215 -
download
0
Transcript of Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable...
![Page 1: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/1.jpg)
Qualitative Spatial Analysis
Chris Mansley
![Page 2: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/2.jpg)
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
![Page 3: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/3.jpg)
An example Trafficablity
Given a map and an echelon Restricted (Impassible) Restricted (Passable) Unrestricted
Mobility Corridors Avenues of Approach
![Page 4: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/4.jpg)
Example (cont.)
![Page 5: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/5.jpg)
![Page 6: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/6.jpg)
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
![Page 7: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/7.jpg)
Two Implementations Spatial Database
Driven by the dynamic environments associated with FPS
Terrain Analysis Needed a realistic way to analyze
strategic value in RTS
![Page 8: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/8.jpg)
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
![Page 9: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/9.jpg)
AI Nodes
![Page 10: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/10.jpg)
Conventional Methods (cont.) Flaws
Only works for static environments! May be difficult with random maps
![Page 11: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/11.jpg)
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
![Page 12: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/12.jpg)
Spatial Databases
Search layer
Occupancy layer
Openness layer
![Page 13: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/13.jpg)
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)
![Page 14: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/14.jpg)
Using Layers Layers can be combine to form
desirability layers for different scenarios
Combat Desirability Openness Occupancy Cover
![Page 15: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/15.jpg)
Using Layers (cont.) Benefits
Implicitly coordinate multiple AI units Generate multiple movements for
different actions
![Page 16: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/16.jpg)
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
![Page 17: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/17.jpg)
Calculating Desirability
Cover layer
Occupancy layer
Openness layer
1
0.6
0
Desirability layer
0
1
0.8
10.8
0.8
0.8
0.6 0.6 0.6
0.6
0.6
0.6 0.6
0 0
1
0.6
0.6
0 0
00
0 0=
![Page 18: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/18.jpg)
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
![Page 19: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/19.jpg)
Openness Layer (cont.)
Solid Wall
![Page 20: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/20.jpg)
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
![Page 21: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/21.jpg)
Area Occupancy Layer (cont.)
![Page 22: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/22.jpg)
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
![Page 23: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/23.jpg)
Line-of-Fire (cont.)
![Page 24: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/24.jpg)
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
![Page 25: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/25.jpg)
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
![Page 26: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/26.jpg)
Thief: Deadly Shadows
![Page 27: Qualitative Spatial Analysis Chris Mansley. Qualitative Quantitative items are known, definable quantities (x,y) coordinates Remaining health Location.](https://reader035.fdocuments.net/reader035/viewer/2022070400/56649f125503460f94c2553d/html5/thumbnails/27.jpg)
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