game AI development in UE4/C++

7.4 – Layered Influence Map Architecture

When I was at GDC last week, I was impressed by Dave Mark’s talk on using a layouted layered Influence Map (IMap) to represent spatial knowledge for large scale worlds. And by querying it, instead of the environment, agents can effectively and efficiently position themselves based on simple spatial reasoning. So I wanted to try it out.

7.4.1 – The design

IMap has been out there for a while. It said to be mainly used in RTS games, where large scale of world and group behaviors were involved. It is initially a way of spatial knowledge representation, and then can be used for spatial reasoning and behaviors. One of the common form of an IMap is a grid system laying on top of the game world, where each actor registers itself to and query information from. In this sense, an IMap has three main considerations:
1. define the “influence” values
2. define how the influence values are propagated throughout the map
3. define the way of query this map

When it comes to including a richer set of actors, there is the Layered IMap, which is a collection of IMaps. The basic idea is, instead of putting all the influence values in one single map, using different IMaps for different types of actors or influences separately. So that each actor is responsible for combining information that is relevant to it–and only relevant to it–from multiple IMaps to make sense of the world. Each actor maintains its own Interest Map, which applies a fallout function on a working copy of the combined IMaps.

After getting the information, actors would be able to find the best location based on spatial reasoning.