# Predictably Unpredictable – Probability and Chance in Games

October 29, 2013 Leave a comment

*[Originally posted on 25th October 2013 on Gather Your Party]*

### Introduction

Chance and uncertainty in games is often seen as an unfair challenge. Randomized events, randomized damage, or randomized hits can seem unfair and infuriating when the player loses to them. However, it’s their perception as an unfair mechanic that is largely what is holding the player back from their mastery. Of course bad implementations can and will continue to exist, but chance is an integral part of logistics test, or as it’s otherwise known: gambling.

### Purpose

Chance or randomized variance combined with predictable outcomes is at the heart of gambling. It is a risk vs. reward structure that challenges the player to either create situations with the minimum of risk or to always “bet” on the least risky scenario (if the player can not influence the scenario).

A multitude of traditional games like poker rely on this type of structure. The randomized deck of cards is the element of unpredictability, however other human players and laws of probability are the systems that allow for a degree of control or at least optimization. Gambling is often poorly understood as a mindless bet on any of the outcomes, as if outcomes had the same probability of occurring. In reality however the odds can be understood and played, and as long as the rules stay consistent, or at least predictable, it is a fair challenge.

The trick here is to see singular scenarios as part of the bigger picture of probability in the game’s design. A failure in one scenario even under optimal circumstances does not necessary mean the cumulative effort is lost, and optimally the failure in itself is a learning experience for future scenarios; losing one round of poker to a bluff is inconsequential if you walk away with the biggest cash-pile at the end.

In the digital realm, most uncertainty present in game systems not stemming from the players themselves can be played relatively consistently. Random number generators (RNGs) are usually not entirely random due to their design. RNGs rely on an algorithm to generate numbers and knowing the algorithm can give make them predictable. However, we do not need to look at crass examples of what would be considered cheating to understand how games are not random. Most games containing an element of variance or “randomness” are in fact procedural, and the procedures of generation can be easily discovered. For example, level layouts and enemy placement are not necessarily all random, they only provide a limited variance in encounters and topology. No game truly generates random encounters, but rather picks them from a table or generates them by an algorithm that is discoverable and predictable.

In roguelikes, for example, the level generation algorithm might place enemies, items, or points of interest for a given level on a specific floor or tile. This is discoverable after a few play-sessions. Similarly, damage numbers, critical hits, or hit percentages in RPGs are not entirely random; they follow a range of probability generated from a set of rules that are optimally accessible to the player. Specifically, turn-based strategy games, which role-playing games are a part of, rely on these systems and provide recourse to the player to mitigate risk or create beneficial scenarios.

Flanking in D&D, which increases hit-chance, is an example of such a mechanic. In the case of flanking, the player is required to analyze the situation and through positioning and cooperation to create a more favorable situation in the scenario. Knowing the rules with which the game operates is paramount to creating or betting on the best outcomes.

Of course, it helps even more to understand basic probability and mathematics in order to always bet on the least risky course of action.

Probability distribution with a 20 sided die.

When rolling a 20-sided die (1d20) every number from 1-20 is equally probable (1/20 = 5%). The chance to roll a 1 is the same as rolling a 20 (5%). In a scenario, the more specific a number-range is to be achieved the lower the probability becomes. If you require any number between 2-20 to hit an opponent, the probability is 95% that you will in fact roll one of these required numbers. If you need the specific number 20 (or 10, or 5, etc) the probability is 5%.

However when rolling more than one die the distribution changes significantly.

Probability distribution with three six sided dice.

If we roll three six-sided dice (3d6) the probability of each die is still 1 through 6, equaling 16.6%, but since we are rolling three dice these probabilities are multiplied and the total outcome is different. Depending on the scenario and rules, rolling multiple dice might be favorable to rolling just one die in the same range (example: 2d3 vs 1d6).

Comparison of probabilities between rolling one or multiple dice for a result.

Games often present different types of probabilities with different mechanics that on the surface look just like the same old unpredictable humbug, but the nuances are often staggering to someone that has an intuitive understanding of probability.

However, chance or variance can also be utilized as tests of adaptation, reaction, and agility. Enemies having a variance to their attacks without a completely discoverable pattern can be used to test the player in a scenario where he must prove his agility and react properly to an action in a limited time-frame. This should not be confused with quick time events (QTEs) which are arbitrary inputs displayed to the player. If rules are set up for scenarios and how to react to them, then a level of variance provides additional challenge by forcing timed pattern recognition instead of memorizing sequences of events.

### Failures of Implementation

Recently, a failure to properly implement uncertainty, variance, or chance in games has become frequent. Currently, most mechanics centered around chance are either copy-pasted from other games by way of genre, without the understanding of their purpose, or they are employed to exploit psychological weaknesses in reward structures and to artificially extend content.

Modern games that employ random item drops often fall in this category: where the acquisition of a desirable or necessary item is not hard, but rather time-consuming and tedious. In other words, chance can be used to turn games into work and make players repeat already completed content without any change in challenge. In one example, a loot drop table has three required items drop from a boss-unit with equal probability in an action-game; hence, the probability for each drop is 1 in 3 (~33.3%).

Since all items have the same probability, you can potentially experience getting item 1 but never getting item 3 or 2 or any other variation since you “roll” for each item every time you kill the unit. Chance is not cumulative and getting item 1 does not increase the probability of getting item 2 and 3. In fact, the more specific the item you want is, the harder it is to get (as explained above). On your first encounter, you have a 100% chance of getting any one of the required items; on your second encounter, you have a 66% chance to get one of the two items you don’t already have (ergo, a 33% chance to get the same one again). If you have two of three items on the next encounter, the chance is now 66% against you getting the last item you require. This is of course a simple example, as most games have far larger and elaborate drop-tables which leads the player to repeat content over and over just to acquire items necessary for progression.

Other failures of implementation are incompetent procedural systems. An example of which can be found in the *Borderlands* series where the procedurally generated weapons found by the player rarely turn out to be useful, and the system produces a large amount of high-level, rare, junk-guns that become vendor-trash, cluttering up the inventory.

Multiple games in the hack and slash genre have this problem to this day and we should re-examine what exactly the purpose of such a system is. Most of the time it’s an exploitation of the player’s psychology and their desire to find something amazing that is being teased by the game.

Items in a logistics game should be varied, no doubt, but they should be useful while providing specific risk-reward systems with clear differentiation in usage or utility. Good hack and slash games with variant procedural loot systems give the opportunity to the player to customize the items he finds to make them more suitable for the strategy he wants to employ.

The only valid implementation is when the collection of items is in itself a part of the logistics of the game.

Another failure of implementation could be said to be present in *X-COM: Enemy Unknown*’s (2012) hit uncertainty concerning distance, terrain, cover and class. On the surface the system looks complex, until the player figures out that the hit-percentage is largely governed by distance and cover. This enables the player to create an optimal strategy that completely circumvents the variance: namely, playing the Assault class, which specializes in circumventing distance and cover. If the variance is circumvented, the game becomes a puzzle game instead of a logistics one. If the risk of the hit-percentage is reduced to zero, which can be accomplished rather easily, the game has lost its cornerstone of design and becomes trivial. In comparison, *X-COM: Enemy Unknown* (1994) has no reliable way to circumvent the risk associated with hitting an enemy, but provides more tools to minimize risk like multi-shots, stances, directly destructible terrain and cover, weight, armor or projectile physics, and inherent penalties to visibility and enemy type as well as a larger squad roster and multiple bases. The 1994 system is the epitome of logistics test with variance: a risk-mitigation simulator.

### Conclusion

Good variant systems relying on chance and probability have the purpose of challenging the player in a test of risk management where nothing is certain. A system utilizing probability must provide an environment conductive of such a test where the variance can not be entirely eliminated, trivializing the risk. Neither can the test be entirely without rules of its own, or without the rules being discoverable. Probability systems rely on testing the player in multiple scenarios over a prolonged period of time and are not necessarily fair on a case-by-case scenario. They present a challenge to obtain desired results by choosing the optimal solution in any given singular scenario, which then cumulatively results in the desired positive result.

Good variant systems do not exploit the player’s psychology, nor are they interested in prolonging the gameplay experience. Good probability systems do not behave like lotteries and should not be utilized to create scenarios in which the acquisition of rare elements is desirable in and of itself.

Probability and chance in games shine when utilized with a clear ruleset to manage risk with an equal amount of variance and certainty. The goal of any such system is to make the game predictably unpredictable.

**Complimentary Reading (with more in-depth maths)**