Sunday, October 3, 2010

Shooter Games and Chance

Shooter games are a type of virtual simulation. Examples include America's Army, Rainbow Six: Rouge Spear, SOCOM II: USN Seals, and Full Spetrum Warrior. All of them have some type of random process that determines health, damage, etc. Probability or chance underlies these random processes.

Point System
Many shooter games use a simple point system to determine combat outcomes. Each target has a number of health points. Each weapon delivers a number of damage points. When a target’s health point go below zero, it is dead.

There can be modifications to this. A target’s health may be supplemented by armor, first aid, or other artifacts that make it stronger. These artifacts may be accounted for separate from health. This makes it possible to limit their effectiveness to certain types of weapons or attacks. For example, a flak vest may reduce the effect of a bullet to the chest, but have no effect on a direct hit by a fragmentation grenade launched from a weapon.

The damage points of a weapon may also be degraded based on environmental factors like range to target and obstacles along the path. This makes some weapons, like a shotgun, less effective at longer distances. It also allows for variation of effects when a grenade is thrown into a group or when the frag pattern is partially blocked by walls.

Point System

Markov Pk Table

This method assigns a probability of kill (Pk) to specific weapon-target pairs. The data is generally stored in a Weapons-Target Matrix as shown in the picture. Pk values are assigned to each pair and can be adjusted as needed.

Though this method is very flexible, it contains two major weaknesses. First, the Pk values do not account for other variables such as range to target, closing speed, defensive positions, etc. Therefore, the values are often modified for each engagement before they are applied to the target.

Second, the values are all independent. It is possible to set any one value without regard for those around it. Therefore, it is difficult to insure consistency among the hundreds of numbers in the matrix. It is easy to tweak one number and unintentionally make a tank more vulnerable than a personnel carrier. This effect is compounded by the practice of applying modifiers to these numbers (for range, health, weather, etc.).

Markov Pk Table

Random Numbers

When using Probabilities in engagement and attrition algorithms, random numbers suddenly become a core piece of the solution to the problem (see blog on Random Number Generators, September 9, 2010). Strictly, a Random Number falls between 0 and 1 and is evenly (or uniformly) distributed between these. The table in this slide was generated using the RAND function in Microsoft Excel. For the most common cases, the techniques for generating good random numbers are well known. However, the mathematical approach used to create these numbers is less than perfectly uniformly distributed between 0 and 1. Therefore, all RAND functions are strictly referred to a Pseudo-random number generators.

If you need to select numbers for a distribution other than uniform, such a Normal, Poisson, Weibel, etc., you require random variates. The methods most often used to generate these variates (e.g., inverse transform) are described in many simulation textbooks, but will not be explored here.

Random Number Table

Pk's and Random Numbers

The Probability of Kill indicates the percentage of the time that the given event will result in the destruction of the object being attacked. In this slide, we show a Pk of 0.75 for a tank when attacked by some weapon. The random number selected was 0.63. This number falls between 0 and 0.75., therefore, the algorithm will decide that this vehicle is destroyed. If the random number had been greater than the Pk value, then the algorithm would have decided that the vehicle was not killed.

In this example, a single random number is used to make a kill/no-kill decision. In practice there are often many modifications to this to allow different types of kills based on the type of weapon, target, angle of engagement, and a number of other variables.

Pk's and Random Numbers
Precision Engagements

Automated crews could potentially achieve perfect weapon alignment on the target. However, these models must explicitly add errors to degrade their performance to some determined human level. Each target provides some presented area to the shooter. The shooter places an aim point on this vehicle and fires the weapon. However, the engagement is modified by a fixed bias for the type of weapon used (AMSAA or JMEMS Tables), an occasional bias for the variations caused by the positioning of two vehicles, and a random bias for the round-to-round differences found in any form of munition.

These model effects prevent automated forces from performing perfectly. The picture shows the application of three different errors. This could require three random numbers ad each factor may differ from one engagement to the next, or can be simplified into a single random draw if the three values do not change.
  • PROBLEM: Find point of impact (if any) of round on its target.
  • ASSUMPTION: The projectile impact point is a random variable with a normal probability distribution (empirically shown to be a good assumption).
Precision Engagements
Damage Categories

Once mutually exclusive values are obtained, it is a simple matter to select the kill effects using a single random number draw that is applied to the kill categories. Simplifications of this sort are often performed on empirical data that is used in simulations. The form in which the data is collected is not necessarily the form best used in the simulation.

Notice that we have attempted to stack the Pk’s from least lethal to most lethal. If this can be done, then it is easier to apply a Pk modifier directly to the Pk and continue using this equation. Examples of modifiers might ne night, rain, suppressing fire, fatigue, etc.

Damage Categories

Conclusion
All good shooter games incorporate an element of chance. Probability or chance is the basis for randomness in shooter games. If the response to this blog are positive, I'll follow it up with a more detailed explanation of probability applications, including range-error probable and circular area probable.

No comments:

Post a Comment