Title: Maurice Bergsma and Peter Meij
1Influence Maps
- Maurice Bergsma and Peter Meij
- Student Lecture GAI, May 3, 2006
2Contents
- Influence Maps
- Reasoning with Influence Maps
- Sample Applications
- Recognizing Strategic Dispositions
- Environmental Awareness in Game Agents
- Issues with Influence Maps
- Conclusions
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
3Influence Maps
- Method for (runtime) spatial analysis
- Matrix representing the game world
- Each cell stores data for one aspect of that part
of the world. - Values propagate to nearby cells
- This shows the influence of certain objects on
each part of the world - Useful for many types of games
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
4Influence Maps (2)
- Different types of propagation are possible
- Linear
- Exponential
- Gaussian
- Etc.
- Game-specific, must be tuned
- Influences of similar objects can be added
together
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
5Influence Maps (3)
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
6Influence Maps (3)
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
7Influence Maps (4)
- Other possible types of influence maps
- Vulnerable assets
- Resources
- Exploration
- Line of fire
- Light level
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
8Reasoning with Influence Maps
- Multiple influence maps are stored in a spatial
database - These maps can be combined to create a
desirability layer for a certain task - A desirability layer contains the desirability to
move to each cell
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
9Reasoning with Influence Maps (2)
- Methods of computing desirability
- Weighted Sum
- Simple and efficient
- Must be hand-tuned
- Opposing influences cancel each other out
- Product of normalized values
- Neural Networks
- Separate weights for each task
- Number of inputs is large for non-trivial tasks
- (layers x cells)
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
10Applications
- 2 Example applications
- Recognizing Strategic Dispositions
- Environmental Awareness in Game Agents
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
11Recognizing Strategic Dispositions
(image shamelessly copied from Nyree Viktor)
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
12Recognizing Strategic Dispositions
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
13Recognizing Strategic Dispositions
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
14Recognizing Strategic Dispositions
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
15Recognizing Strategic Dispositions
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
16Recognizing Strategic Dispositions
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
17Recognizing Strategic Dispositions
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
18Recognizing Strategic Dispositions
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
19Environmental Awareness in Game Agents
- Agents in games need situational awareness to
give them a sense of - What is happening in the environment
- What could happen next
- What options there are for action
- Possible outcomes of those actions
- Environment in the form of a grid
- Cells track important (threatening) events and
conditions, such as rain, fire, other agents - This can be done using cellular automata
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
20Environmental Awareness in Game Agents
- Cellular automata can be used in games to model
simplified environmental processes, e.g. air,
fluid flow - Set of rules represent allowable physics of the
model, and are used to update cell values - New state of a cell is a function of previous
state and state of neighboring cells
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
21Environmental Awareness in Game Agents
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
22Environmental Awareness in Game Agents
- Cellular automata in games
- Cells can include data for all kinds of game
variables and are represented by continuous
rather than finite values - The rules and variables the cellular automaton
requires depends on what is being modeled in the
game environment
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
23Environmental Awareness in Game Agents
- Reacting sensibly to the environment requires
- Way to sense the environment
- Way to choose suitable reaction based on sensed
data
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
24Environmental Awareness in Game Agents
- Role of influence maps
- Influence maps divide game map into a grid of
cells, with multiple layers of cells containing
information about the game world - To include environmental decision-making one of
these layers should consist of the data from the
cellular automaton - Also possible to use influence maps for tactical,
low-level decision-making
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
25Environmental Awareness in Game Agents
- The reactive agents using the combination of
influence maps and cellular automata can do this
in three steps - Compute danger function to determine each
cells utility - Use its return value to asses the level of
reaction - Let the agent choose the destination cell based
on this
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
26Environmental Awareness in Game Agents
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
27Environmental Awareness in Game Agents
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
28Environmental Awareness in Game Agents
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
29Environmental Awareness in Game Agents
- Agents are likely to have greater goals or
desires they need - This can be done through desirability values,
provided through a desirability layer
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
30Environmental Awareness in Game Agents
- Propagation of desirability of a goal in an
influence map
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
31Environmental Awareness in Game Agents
- Choosing a destination, also including
desirability of the goal
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
32Environmental Awareness in Game Agents
- Algorithm for the agents
- Propagate desirability of the goal
- Each cycle, calculate the danger value for each
cell in its local neighborhood - Find the optimal cell in the local neighborhood
of the agent - Find the optimal cell in the immediate
neighborhood
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
33Environmental Awareness in Game Agents
- Step 1 desirability propagation
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
34Environmental Awareness in Game Agents
- Step 2 Calculate danger value
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
35Environmental Awareness in Game Agents
- Step 3 Find optimal cell in local neighborhood
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
36Environmental Awareness in Game Agents
- Step 4 Find optimal cell in immediate
neighborhood
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
37Issues with Influence Maps
- Time/space complexity
- Resolution of the grid
- Update frequency
- Tuning
- Parameter values
- Agent Design
- Overlapping influences
- 3D environments
- Suboptimal solutions
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
38Conclusions
- Influence maps provide an intuitive approach to
(runtime) spatial analysis - Influence maps are fairly easy and
straightforward to implement - Influence maps need quite a lot of tuning to
deliver optimal solutions - Influence maps are therefore not always
guaranteed to be useful - Influence maps can be applied effectively for
strategic decision-making and reactive path
finding
Introduction / Influence Maps / Reasoning / App 1
/ App 2 / Issues / Conclusions
39References
- Sweetser, Penny. (2004) Strategic
Decision-Making with Neural Networks and
Influence Maps. AI Programming Wisdom 2, Charles
River Media - Sweetser, Penny. (2006) Environmental Awareness
in Game Agents. AI Programming Wisdom 3, Charles
River Media - Tozour, Paul. (2001) Influence Mapping. Game
Programming Gems 2, Charles River Media - Tozour, Paul. (2004) Using a Spatial Database
for Runtime Spatial Analysis. AI Programming
Wisdom 2, Charles River Media - Woodcock, Steven. (2002) Recognizing Strategic
Dispositions Engaging the Enemy. AI Programming
Wisdom, Charles River Media
40Questions?