1 / 27

Qualitative Spatial Analysis

Qualitative Spatial Analysis. Chris Mansley. 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

samuellewis
Download Presentation

Qualitative Spatial Analysis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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.)

  5. 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

  6. Two Implementations • Spatial Database • Driven by the dynamic environments associated with FPS • Terrain Analysis • Needed a realistic way to analyze strategic value in RTS

  7. 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

  8. AI Nodes

  9. Conventional Methods (cont.) • Flaws • Only works for static environments! • May be difficult with random maps

  10. 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

  11. Spatial Databases Openness layer Occupancy layer Search layer

  12. 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)

  13. Using Layers • Layers can be combine to form desirability layers for different scenarios • Combat Desirability • Openness • Occupancy • Cover

  14. Using Layers (cont.) • Benefits • Implicitly coordinate multiple AI units • Generate multiple movements for different actions

  15. 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

  16. Calculating Desirability Openness layer Occupancy layer 0.6 0.6 0.6 1 0.6 0.8 0.8 Cover layer 1 0.8 0.6 1 0.8 Desirability layer 1 0.6 0.6 0.6 = 0 0 0 0.6 0 0 0.6 0 0 0 0 0

  17. 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

  18. Openness Layer (cont.) Solid Wall

  19. 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

  20. Area Occupancy Layer (cont.)

  21. 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

  22. Line-of-Fire (cont.)

  23. 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

  24. 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

  25. Thief: Deadly Shadows

  26. 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

More Related