Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 CO3301 - Games Development 2 Week 13 Influence Maps Gareth Bellaby.

Similar presentations


Presentation on theme: "1 CO3301 - Games Development 2 Week 13 Influence Maps Gareth Bellaby."— Presentation transcript:

1 1 CO3301 - Games Development 2 Week 13 Influence Maps Gareth Bellaby

2 2 Influence Map An influence map is a way of viewing the distribution of control over a map. For example, imagine an RTS with lots of units: which parts of the map are currently under the control of either side? where is the enemy vulnerable?

3 3

4 4 Approach Grid out the world. Provide a numerical estimate of the influence every unit or building exerts on the cell it is in and upon all of the neighbouring cells. Influence diminishes over distance. The influence of all units in the game are summed in order to generate an influence map: a representation of influence and location which can be used for strategic analysis.

5 5 Example I am using a 50% drop off function. The distance to the centre of the square is being used for the calculation. influence = 0.5 distance The Euclidean distance is being used.

6 6 Example

7 7 Example This calculation is done for every unit on the map. Use positive values for friendly units. Use negative values for enemy units.

8 8 Friendly and Enemy Units

9 9 0.020.030.050.06 0.050.030.02000 0.030.050.080.130.16 0.140.110.090.050.030.02 0.050.080.140.240.30.290.250.210.160.080.050.03 0.060.090.160.350.470.40.30.250.190.090.060.05 0.060.10.170.43 0.92 0.470.390.440.310.130.080.06 0.080.220.280.170.25 0.76 0.340.120.080.06 0.050.02-0.03-0.05-0.23-0.46-0.36-0.010.110.040.050.06 0.03-0.01-0.11-0.22-0.54 -1.25-1.21 -0.45-0.14-0.050.020.05 0.02-0.03-0.12-0.23-0.48-0.74-0.72-0.43-0.19-0.09-0.010.03 0-0.05-0.13-0.2-0.32-0.41-0.4-0.29-0.16-0.08-0.020.02 0-0.03-0.08-0.13-0.19-0.24 -0.19-0.13-0.08-0.030 0-0.02-0.05-0.08-0.11-0.12 -0.11-0.08-0.05-0.020

10 10 Interpreting the Map Front line: The line which can be traced at the edge of the positive and negative (blue and red) can be considered the front line. Concentration of forces: The areas with the highest positive values are where the influence of the friendly forces are strongest. Conversely the areas with the highest negative values are where the influence of the enemy forces are strongest.

11 11 Maths As we have seen influence falls off over distance. This fall off can be linear or exponential with distance. For example, if influence represents the firing range of a unit and the unit uses a modern gun, then the characteristics of the drop are different from the case where the unit is a group of swordsmen and the influence represents the potential movement of the swordsmen.

12 12 Zero The equation influence = 0.5 distance means that influence diminishes over distance. However, it will never reach zero. This means that the influence of a unit spreads impossibly far; to the point of uselessness. It is an unnecessary burden on our calculations. Use a cut-off point and set all values below it to zero.

13 13 Influence means many things Influence will realistically be the consequence of different things. A simple factor is the firing range of a unit. The influence is simply the range at which the unit can fire However, a unit which can move should exert an influence dependent upon its ability to move.

14 14 Influence means many things A unit production building in an RTS will exert an influence: this could be modified according to the type of unit it can produce and the rate of production.

15 15 Examples of Influence A cell may contain many types of information. A cell acts a database of relevant information: combat strength vulnerable assets area visibility body counts resources passability(list taken from Tozour)

16 16 Desirability A cell is given a desirability value. This can be a weighted sum. Desirability will change according to the context or type of decision. Some examples of desirability values are: attack and defence exploration resource collection unit production defensive asset placement vulnerable asset placement (list taken from Tozour)

17 17 Time & Distance I have said that influence diminishes over distance. However, influence can represent the potential effect of a unit on a location given the movement of a unit. This potential is smaller than the actuality of the unit's location since the unit could move in many different directions but could not move in all of them. In this case influence diminishes over time, not distance.

18 18 Time & Probability Conceptualising the problem as one involving time suggests how we can use influence maps to represent potential movement. Calculating what happens with the predicted future position of units is difficult. For instance, if you use a search tree then it becomes very large indeed. Influence maps suggest an alternative form of analysis. This is an area in which further work might be fruitful.

19 19 Interpreting the Results The results are open to an interesting variety of interpretations. I think this is an area which would repay further research. Combat: want to choose a cell in which the enemy is weak, but in which we are strong. Can attempt to determine clusters of units. We may be able to determine the strategic disposition of the enemy.

20 20 Interpreting the Results Should be able to identify: centre flanks vulnerable pockets salients

21 21 Interpreting the Results Examine the distance of units to the front line: both friendly and enemy. This may help to indicate areas to which we should be paying especial attention. A friendly unit in a negative cell is under threat. An enemy unit in a positive cell is vulnerable.

22 22 Interpreting the Results Can use pattern recognition techniques and image enhancement techniques. pick out common patterns of attack and defence notice the way that in my example the two enemy units are closer together than the friendly units. The local strength of the enemy unit is increased but their overall influence on the map is diminished.

23 23 Terrain It may be useful to include the effect of terrain. Can increase or decrease the propagation of influence according to terrain. Can use pathfinding techniques to propagate the value outwards, e.g. to take obstacles, ground and open paths into account.

24 24 Other uses Influence maps can be used in non-combat games as well. Consider the following phrases: exerting influence exerting control exerting power If an aspect of the game can be considered to do any of the above then an influence map may prove useful.

25 25 Other uses For example, SimCity uses influence maps for the Fire and Police departments. You could use an influence map for a politics game. What about using it in an RPG to represent reputation or faction influence?

26 26 Further reading Rabin, S., (2003), "Common Game AI Techniques", AI Game Programming Wisdom 2, Charles River Media: Hingham, Mass, USA. Sweetser, P., (2003), "Strategic Decision-Making with Neural Networks and Influence Maps"", AI Game Programming Wisdom 2, Charles River Media: Boston, Mass, USA. Tozour, P., (2001), "Influence Mapping", Game Programming Gems 2, Charles River Media: Hingham, Mass, USA. Woodcock, S., (2002), "Recognizing Strategic Dispositions", AI Game Programming Wisdom, Charles River Media: Hingham, Mass, USA. Sweetser, P., (2006), "Environmental Awareness in Game Agents", ", AI Game Programming Wisdom 3, Charles River Media: Hingham, Mass, USA.


Download ppt "1 CO3301 - Games Development 2 Week 13 Influence Maps Gareth Bellaby."

Similar presentations


Ads by Google