Influence Maps
Influence Maps
In BattleTech, the procedural logic of what to do when (e.g. "IF I have been knocked down THEN I should stand up) is controlled by Behavior Trees, which we've already looked at. The tactical decisions of the relative value of different locations on the map are handled by Influence Maps. So, once we've decided that my unit should attack the enemy's missile turret, the question of whether I should do it from the left or the right, or maybe from the top of this ridge.
Related Technologies
Influence maps have been around for a long time - I think the very first issue of Game Developer Magazine that I read had a discussion of writing AI for a Risk-like game using an influence map to capture the "threat" or "value" of various territories on the map.
Back in the 1990s, there was a big buzz in the popular media about "fuzzy logic", which allowed AI developers to make rules-based logic, and the systems of the day (from rice cookers to clothes dryers) would interpolate from the programmed values to get a smooth response.
In the mid 2010s, I've noticed a lot of Games AI buzz about "Utility-based AI". The basic idea of this seems to be applying the microeconomic idea of "utility", how much an agent values a thing, to help make decisions. I don't really have a problem with this, but it seems to me that in a lot of cases, we've just changed the question of "how to I evaluate the best move for my agent to make?" to "what is the value of this move in my agent's own economy?". If that is an easier question to answer, then great, but it strikes me as very similar.
"Heat Maps" are used in a lot of places both in and outside of Game AI. An example from web design is to use an eye tracker to measure how frequently people look at what parts of your web page (can they find the "buy now" button?). An example from game level analysis is to measure how much time players spend in various parts of maps - if there are dead ends that players never go into, that might be a location you choose to redesign to improve the flow. This same idea can be applied dynamically during a running game - in "Robert E. Lee: Civil War Generals 2", we kept a record of where units died to help the AI recognize when locations were of value. We didn't know ahead of time that a particular bridge or hill was a crucial chokepoint, but if the human player was willing to lose several units to defend it, it was probably something we should pay attention to.
Requirements
What I was looking for when I chose Influence Maps for BattleTech:
Ability to consider a variety of moves within each unit's legal
moves.
desire to scale to a large number of factors that might make certain
locations interesting (more or less desirable).
What is an Influence Map
I think of an influence map as a set of layers, very much like image layers in an image editing program, like Photoshop. Each layer represents the evaluation of a simple factor, evaluated at many locations across the map. At the end, these layers are combined, perhaps by simply adding the influences, to come up with a combined influence for each location.
Example influence factors
Influence Factors were a big part of our modular approach to AI design. We made a lot of different modules, and decided how useful each one was. In a lot of cases, we decided the factor wasn't useful at all, so we turned that factor off, and the game didn't spend any time evaluating it during gameplay.
Prefer Standing High Up
Higher locations get higher values. Used to create a "scouting" behavior of scouting the map. Also, provides a dubious tactical advantage when establishing line of fire to the enemy, while exposing yourself to the enemy's line of fire.
Prefer More Damage to Hostiles
In BattleTech, we have a lot of different weapons. Each weapon has ranges that it cannot do any damage at (too close, too far away), and there are some ranges that are "optimal". For a given unit at any point in the game, we wanted to capture that some locations enabled my unit to deliver more firepower to the enemy than others. This is actually a combined influence factor, summing up the damage to each hostile on the map, so if I can move somewhere that threatens several enemies, that's better than threatening just one.
Prefer Greater Heat Dissipation
In BattleTech, heat management is an important part of the game. Running around with giant machines shooting giant weapons generates a lot of heat. A good player will make use of rivers and ponds as an opportunity to increase their heat dissipation, which will increase the frequency at which they can fire their weapons.
Last updated
Was this helpful?