Title: Probabilistic Smart Terrain
1Probabilistic Smart Terrain
- Dr. John R. Sullins
- Youngstown State University
2Outline
- What is Smart Terrain?
- Why do we need to add probabilities?
- Estimating expected distances to objects that
meet character needs - Plausibility benchmarks and experimental results
- Adding knowledge learned during exploration
- Hierarchical application to games
3Smart Terrain
4Smart Terrain
- Characters have needs
- Example hunger
- Objects in world meet needs
- Example refrigerator with food inside
- Characters move to objects that meet needs
5Smart Terrain
- Objects meets needs ? transmits signal
- Signal weakens with distance
- Signal moves around objects
6Smart Terrain
- Characters follow signal to objects
- Move in direction of increasing signal
- No need for complex navigation
7Outline
- What is Smart Terrain?
- Why do we need to add probabilities?
- Estimating expected distances to objects that
meet character needs - Plausibility benchmarks and experimental results
- Adding knowledge learned during exploration
- Hierarchical application to games
8Need for Probabilities
- Smart terrain can result in implausible actions
- Room character has never visited
- Contains empty refrigerator
- Does not transmit signal
- Character ignores it
- Not plausible behavior!
9Probabilistic Smart Terrain
- Objects broadcast signal of formI meet need n
- I may meet need n with probability P
- Probability uncertainty that
object meets need - Character explore uncertain objects along path
10Probabilistic Smart Terrain
- Character should Move to closest object
with highest probability - Problem Optimizing two separate criteria
- Realistic Goal Plausible behavior
Meets hunger need with P 0.6 At distance 6
Meets hunger need with P 0.7 At distance 8
11Outline
- What is Smart Terrain?
- Why do we need to add probabilities?
- Estimating expected distances to objects that
meet character needs - Plausibility benchmarks and experimental results
- Adding knowledge learned during exploration
- Hierarchical application to games
12Expected Distances
- Expected number of tiles character must travel
- From current tile
- To object that fulfills need
- Based on
- di distances to each object i
- pi probabilities each object i meets need
13Expected Distances
- P(t) probability no objects within t tiles meet
need -
P(t) ? (1 pi ) (Equation
1) - where di lt
t - Based on assumption of conditional independence
14Expected Distances
Distance 6 Prob 0.6
Distance 8Prob 0.7
- t lt 6 P(t) 1
- 6 t lt 8 P(t) (1 0.6) 0.4
- t 8 P(t) (1 0.6)(1 0.7) 0.12
15Expected Distances
- Expected distance from tile T
to tile that meets need
E(T) S P(t) (Equation 2)
t
t lt 6 P(t) 1
6 t lt 8 P(t) 0.4
t 8 P(t) 0.12
16Expected Distances
- Problem Sum could be infinite
- Solution Limit t to some tmax
tmax gt di ?i - tmax
- E(T) S P(t) (Equation
3) t
17Expected Distances
- Compute expected distance E(T) for all tiles T
- Character moves to adjacent tile with lowest E(T)
18Outline
- What is Smart Terrain?
- Why do we need to add probabilities?
- Estimating expected distances to objects that
meet character needs - Plausibility benchmarks and experimental results
- Adding knowledge learned during exploration
- Hierarchical application to games
19Plausibility Benchmarks
- Goal for gamesNon-player characters should
behave plausibly - Move in direction that makes sense to player
- Benchmarks for plausible behavior
- Objects similar in either distance or probability
- Group of objects in same direction
- Objects that meet need with complete certainty
20Plausibility Benchmarks
- Objects at same distance ? move to higher
probability - Objects with same probability ? move to closer one
21Plausibility Benchmarks
- Nearly same distance ? move to much higher
probability - Nearly same probability ? move to much closer
object
22Plausibility Benchmarks
- Aggregate probabilities benchmark
- Multiple objects gt single object with higher
probability - Assumption of conditional independence
23Plausibility Benchmarks
- Complete Certainty benchmark
- Single object with probability 1 gt
multiple objects with probability
lt 1
24Outline
- What is Smart Terrain?
- Why do we need to add probabilities?
- Estimating expected distances to objects that
meet character needs - Plausibility benchmarks and experimental results
- Adding knowledge learned during exploration
- Hierarchical application to games
25Learned Knowledge
- Probabilities changed when object reached
- Object meets need ? probability becomes 1
- Does not meet need ? probability becomes 0
- Should affect future actions
Refrigerator empty
Move towards another goal
26Learned Knowledge
- Changing global map affects all characters
- Will also appear to have learned this knowledge
New character enters room
Also ignores empty refrigerator
27Learned Knowledge
- Each character stores own world model
- Belief object meets needs
- Initially based on probabilities
- Modified when objects explored
0
28Learned Knowledge
- Each object propagates raw data to tiles
- Probability it meets need
- Distance to that tile
29Learned Knowledge
- Character examines surrounding tiles
- Modify probabilities using world model
- Compute expected distances for each
30Outline
- What is Smart Terrain?
- Why do we need to add probabilities?
- Estimating expected distances to objects that
meet character needs - Plausibility benchmarks and experimental results
- Adding knowledge learned during exploration
- Hierarchical application to games
31Hierarchical Smart Terrain
- More realistic scenario
- Know whether objects meet needs
- Dont know if object is present in given area
- Go to entrance of most likely area
- If object not present, move to another area
- If object present, move to it
32Hierarchical Smart Terrain
- Area attractors at entrances to rooms
- Broadcast to entire level
- Probability object that meets need is in room
- Probability set to 0 when reached by character
- Objects in room
- Signal range size of room
- Probability 1 if present in room
33Hierarchical Smart Terrain
- Compute expected distances from area attractors
- Move to best room
34Hierarchical Smart Terrain
- Object is present in area
- Now in range of object, probability meets need
1 - Character will move directly to object
35Hierarchical Smart Terrain
- Object is not present in area
- Set probability of area attractor 0
- Character will move to next plausible attractor
36Conclusions
- Probabilities added to Smart Terrain algorithm
- Characters move to adjacent tile with shortest
expected distance to a tile that meets need - Algorithm produces plausible behavior for
benchmarks - Probabilities overridden by learned knowledge
- Hierarchical algorithm for realistic play
37Ongoing Work
- Characters with multiple needs at different
levels - Low-probability object that meets critical need
- High-probability object that meets less critical
need - Which to move towards?
- Objects that change over time
- Empty refrigerator now may be restocked in future
- Searching for other characters who move from
place to place