Dice notation

From DoomRL Wiki

Revision as of 01:31, 15 July 2011 by Game Hunter (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Dice notation is what Doom RL uses to describe how it calculates random values. In the game this is used exclusively for weapon damage. On this wiki, dice notation is often used to describe other random events that happen behind the scenes.

Basic Meaning

If a weapon does XdY damage, then whenever that weapon attacks, the game rolls X Y-sided dice and adds the results together to get the damage.

Sometimes a weapons damage will be listed as (XdY)×Z. This means that the weapon makes Z separate attacks whenever it is fired, and each attack does XdY damage.

Technical Aspects

Dice notation is actually a way of writing probability distributions. XdY to suggests the distribution of rolling X Y-sided dice and adding together the results of all the dice. It doesn't matter whether matter whether there is actually such a thing as a Y-sided die (in Doom RL you might see strange die sizes like 1d7). The rolling of a die is used as a mnemonic for sampling from a uniform distribution. Thus XdY is technically the distribution of adding together X independent samples from the uniform distribution on the numbers from 1 to Y.

Doom RL is a computer program, so it can't easily access any truly random events. Thus, all random values in the game ultimately come from a pseudorandom number generator.

Analysis

The range of XdY is from X to X×Y.

The average of XdY is X×(Y+1)/2.

The variance of XdY is X×(Y2-1)/12. In particular, this means that if the average is (more or less) fixed, then a greater number of dice decreases the standard deviation. For example, 1d5 and 3d1 have the same average (3), but 3d1 has more dice, so it has a lower standard deviation (in this case, 0).

As the number of dice becomes large, the distribution approaches a normal distribution.

Personal tools