The betting and iGaming industry, explained

Verte News

Edition: English

Casino

How random number generators keep games fair

Every online slot and computer-generated table game relies on a random number generator. Here is how it produces results, how those results become symbols on a screen, and how its fairness is tested.

Illustration for: How random number generators keep games fair
AI-generated illustration

A random number generator, or RNG, is the software that decides the outcome of computer-based casino games: which symbols a slot lands on, which card is dealt in digital blackjack, which number comes up in RNG roulette. It produces numbers that cannot be predicted, and the game maps each number to an outcome. 'Fair' here has a precise meaning: every result follows the game's stated rules and odds, and no one can predict or influence it. It does not mean the game is favourable to players; the odds still include a house edge.

Four-step flow: the RNG generates an unpredictable number; the number is mapped to reel positions; the paytable decides what the result pays; the animation shows a result that is already fixed.
How an RNG turns a number into a spin. Graphic: Verte News

How an RNG produces a number

Most casino games use a pseudo-random number generator: an algorithm that, starting from an initial value called a seed, produces a long sequence of numbers that pass statistical tests for randomness. Strictly, the sequence is deterministic, so security depends on the algorithm and on keeping the seed and internal state unpredictable. Well-designed game RNGs use strong algorithms, seed from unpredictable sources and generate numbers continuously, so the value used for any one spin cannot be predicted or reproduced by a player.

Some systems also draw on hardware sources of randomness, such as electronic noise, to seed or refresh the generator. Either way the aim is the same: each result is independent of every result before it.

From number to result

The RNG's output is just a number; the game's maths model turns it into something you can see. In a simplified example, each reel of a slot has 64 positions. The RNG picks a number, it is scaled to a position from 1 to 64, and the reel stops there. Repeat for each reel, look up the combination in the paytable, and the result is fixed. The spinning animation that follows is presentation: the outcome was decided when the spin was requested.

The designer controls the odds by deciding how many positions each symbol occupies. If a top symbol appears once on each of five 64-position reels, the chance of five in a row on a line is 1 in 64 to the power of five, about one in 1.07 billion. Give it two positions on every reel and the chance improves 32-fold, to about one in 33.6 million. Adjusting these weightings and the payouts is how a studio sets a game's RTP and volatility, explained in what RTP means and what slot volatility means.

Two consequences follow. First, there is no memory: a game that has not paid out for hours is no more likely to pay on the next spin. Second, stopping the reels early or timing when you press the button does not change the chance of any outcome, because each result is drawn from the same distribution every time.

How fairness is tested

An RNG is only as trustworthy as the checks behind it. In regulated markets, independent test houses examine:

  • the RNG's algorithm, seeding and implementation, including its source code;
  • its statistical output, run through batteries of randomness tests over very large samples;
  • the mapping from numbers to outcomes, to confirm there is no bias beyond the published design;
  • the game's maths model, to confirm the theoretical RTP matches what the designer claims.

In Great Britain, games and RNGs offered to British players must meet the Gambling Commission's technical standards and be tested by an approved test house before release. Approved versions are controlled, so changes to the software require further testing, and live games are monitored for performance that departs from what is expected. The companies involved are described in how casino game providers work.

Live dealer games are different: the result comes from a physical wheel or deck, with its own controls; see how live casino works.

What an RNG does not do

A certified RNG guarantees that results are unpredictable and follow the stated odds. It does not guarantee that you will get back anything close to the RTP in a session, and it does not switch off the house edge. Over time, players as a group lose the edge on everything they stake: on a 96% RTP slot, £4 for every £100 wagered.

Knowing a game is fair is a reason to trust its stated odds, not a reason to expect to win. Systems sold as ways to predict or beat an RNG do not work on a properly certified game. Deposit limits and time reminders remain the sensible tools for controlling what a session costs.

  • rng
  • fairness
  • slots
  • testing