# Pseudo Random Distribution

by SUNSfan | 29th November | 18 commentsFor those confused as to what Psuedo Random Distribution means, here is some information taken from an old playDota article. As you know, this system was present in the Warcraft III Engine and has been brought to Dota 2 via today's patch.

## Pseudo Random Distribution

A Pseudo Random Distribution refers to the Warcraft III engine's dynamic probability calculations for certain percentage-based attack modifiers. Rather than using a static percentage, the probability is first set to a small initial value, then gradually increased with each consecutive attack for which the modifier does not occur. The probability then drops back to the initial value when the attack modifier does apply. Not only does this system make long strings of successful modifiers unlikely, but it also makes going an entire game without an attack modifier occurring impossible, as eventually the dynamic probability exceeds 100% and "forces" a modifier on the next attack. The distribution of attack modifiers is therefore not truly random, hence the term Pseudo Random Distribution. In general, all abilities that are rounded to the nearest 5% in the Warcraft III engine follow this probability distribution.

### Pseudo Random Abilities

The list of all currently known base abilities that follow this system of balanced randomness is shown below. Triggered abilities notably do not fall in this list:

- Critical Strike (ex. Phantom Assassin’s Coup de Grace, Crystalys)
- Bash (ex. Faceless Void’s Time Lock. As of its remake, Cranium Basher does notfollow this distribution.)
- Orb of Slow (ex. Maim, Maelstrom)
- Hardened Skin (ex. Stout Shield, Vanguard)

### Probability Mechanics

Critical Strike Example:

Consider the case of a 20% chance to Critical Strike. If the game were truly random, then for each attack there would be a 20% chance for the unit to land a Critical Strike, regardless of how many Critical Strikes had been performed in the past. A simple implementation would therefore be to select a random integer between 1 and 100, and if the integer was less than or equal to 20, then the engine would cause that attack to be a Critical (which is the usual construct used by triggered percentage-based abilities). While this implementation would, in the long run, average out to 20% of attacks being Criticals, there is nothing preventing an infinite series of Critical Strikes or, conversely, an absence of Critical Strikes for the entire game, although the chance is rather insignificant. To prevent the ensuing complaints and balance this random game mechanic, the Warcraft III developers implemented a Pseudo Random Probability Distribution.

Instead of there being a 20% chance to Critical Strike with every attack, the first attack made actually has a 5.57% chance to Critical Strike. If that is not a Critical Strike, then the second attack has a 11.14% chance to Critical. If that is also not a Critical Strike, then the third has a 16.71% chance to Critical, and so on, adding 5.57% for each consecutive non-Critical. When a Critical Strike does occur, however, the chance for the next attack resets to 5.57%. In the long run, the number of Critical Strikes divided by the total number of attacks somewhat approximates the stated 20%, but now it is extremely difficult to have a series of Critical Strikes, and also impossible to go more than 17 attacks without a Critical, because the percentage for the 18th attack (assuming 17 previous consecutive non-Critical attacks) is 100.26%. In effect, the game causes the number of attacks between Criticals to be skewed towards 1 / 20% = 5, with a maximum limit of 17.

For more detailed information, be sure to check out the whole article here.

Sources:

playDota

## Comments