Random Number Generators (RNG) are an essential part of electronic and computer-based games, including (but not limited to) video games. As the name suggests, an RNG generates a number or series of numbers at random, essentially simulating the roll of a dice or any other method of introducing chance into a game. The number generated may then be used to determine whether an encounter takes place, what kind of treasure is found, or what happens in a battle.

Random number generators are also used in casino games where chance or luck plays a major part. These are scrupulously observed and tested by independent third-party evaluators to make sure they are genuinely random and not fixed or predictable. This means that when you play the best new slots online, you can be sure that they are fair and that every player has an equal likelihood of winning.

Randomness in board games

Not all computer games involve an RNG, just as not every game includes an element of chance or luck. In terms of board games, one might think of Snakes & Ladders: a game where the roll of the dice almost entirely decides the outcome. No skill is required, and only luck decides the winner. This is the same as saying the winner is chosen at random, except putting it like that doesn’t make it sound like much fun.

At the other end of the scale, you have chess, almost entirely devoid of randomness and purely a game of skill. Although the number of possible moves is vast, it is still finite, meaning that in theory, these could all be predicted, and chess could be solved. At a high level, winning at chess is all about applying a tried and tested strategy, and the only random element is the possibility of one player making a foolish mistake. That is why computers are so good at playing chess.

How to be random

Computers run on logic, even if that logic doesn’t always make sense to their human owners. They need to be told what to do and cannot do anything at random. As such, creating a computerized RNG is a complicated process. A true RNG, also known as a hardware RNG, is a physical device that uses processes like electronic noise to generate genuinely random numbers. These are used for security and encryption purposes because they are as unpredictable as possible.

Most games, however, use a pseudo-RNG in the form of an algorithm. This is a mathematical formula where the only random element is the seed or starting number, which is put through a pre-set series of calculations that will generate a series of different numbers or possibilities within the game.

Manipulation by numbers

The game’s internal clock may generate the seed number, the number of keystrokes a player has made, the number of letters in a player’s character name, or via some other local input. If the seed generation method is known, it is sometimes possible for pseudo-RNGs to be manipulated by players or at least skewed to make the desired outcome more likely.

While finding ways to manipulate the RNG in video games could well be seen as cheating, the highly competitive players and speedrunners see it as reasserting the dominance of player skill within a game. RNG manipulation isn’t easy and requires a lot of analysis and practice. To these players, randomness makes a mockery of skill by increasing the possibility of being killed or beaten in a game through no fault of their own. Randomness is unpredictable and treats everyone the same: to super-competitive players, who prefer the best strategy games to games of chance, this simply isn’t fair.

Why randomness appeals

To the casual player, randomness is what makes a game fun. Take away the random element that means anything can happen, and you’re left with a game that can be won through rote learning and constant practice. In short, it seems more like work, and that’s exactly how the competitive players see it too. It’s no coincidence that the games most popular with e-sports players are those with the minimum of randomness, such as Mortal Kombat.

Some top-rated games like Minecraft and Tetris use RNGs for procedural generation. The RNG decides everything from the size of a brick to constructing a unique world each time you play the game. If you play for fun rather than to overcome a challenge, random number generators are the beating heart of your gaming experience.