Presentation is loading. Please wait.

Presentation is loading. Please wait.

Positioning and Spatial Evaluation

Similar presentations


Presentation on theme: "Positioning and Spatial Evaluation"— Presentation transcript:

1 Positioning and Spatial Evaluation
Influence Maps Positioning and Spatial Evaluation Damián Isla, Director of Tech. Moonshot Games

2 Where do I stand right now?
Spatial Evaluation Spreading influence is just one form of spatial function. Spatial decisions can be made on second-to-second timescales Use spatial functions to answer fundamental question: Where do I stand right now?

3 Spatial Evaluation Algorithm:
Score each [accessible] position with F(x) Pick the best one Go there

4 Spatial Evaluation F(x) 42 Breakfast Threat Line of sight Distance
Range F(x) 42 The Apples-to-Oranges problem.

5 Apples and Oranges Crops up in a host of AI problems. Best strategies
Perception Attention / target selection Behavior-selection etc. Best strategies visualization iteration How do you take 2 completely different factors and weight them relative to each other?

6 Spatial Function Inputs A(x) = range from x to target
B(x) = path distance from AI to x C(x) = line of sight (1.0 = 100% clear) ...

7 Spatial Function Layer Simplest form
F(x) = k1A(x) + k2B(x) + k3C(x) + ... With user functions: F(x) = f1(A) + f2(B) + f3(C) + ... Our own idiosyncratic form: F(x) = (((f1(A) + f2(B)) + f3(C)) * f4(D)) + f5(E) ... Layer

8 Implementation Engine-specified (code) Designer-specified (data)
Layers Input source range los path-distance etc. Combination method Additive Multiplicative User-Function output = F(input) Global modifications Blur factor Normalization Engine-specified (code) Designer-specified (data)

9 Demo

10 Spreading Influence “Gather phase” Distance maps
create list of evaluatable locations assumes we’re interested in moving to that spot Uses A* Distance maps Each pixel contains distance to an occupied cell Pre-computed

11 Line of Sight By far the greatest perf cost.
Solution: Batch batch batch. pre-search for los-blocking objects build optimized structure at runtime evaluate on the GPU In this case: rasterization O(n) (n is # of pixels)

12 Interference Destructive interference is a [the] big problem
Pre-combine inputs Range

13 Grid Resolution Grid resolution < body radius Solutions:
Good: high res decision-making Bad: rounding corners Bad: rubbing against walls Solutions: Distance map can influence steering A* in “configuration space” Distance-map layers in position selection Penalty function in A* In some sense, the penalty function helps us create a body-radius-agnostic “configuration space”

14 All Behavior is Spatial
Spatial functions can be used for more than just position evaluation A* penalty path speed aim on/off target bias weapon choice ... Remember: Input sources are expensive, but recombining them is cheap (share inputs across layers, functions and AIs)

15 Spatial Behavior Target bias A* Penalty Weapon choice
Position selection

16 Spatial Behavior Aiming Shooting Positioning Speed Targeting

17 Conclusions Apples-to-oranges is defeated through great visualization and iteration tools Respect the code/data boundary Distance maps are sweet Batch yer rays Pre-combine yer inputs Spatial functions for many aspects of behavior

18 Thanks!


Download ppt "Positioning and Spatial Evaluation"

Similar presentations


Ads by Google