Game Math
RNG (Random Number Generator)
SlotCodex Editorial · Updated · Figures live from the SlotCodex database
A random number generator (RNG) is the certified software component that decides every outcome in a casino game. It produces a continuous stream of unpredictable numbers; the game maps each number to a reel stop, card or result, making every spin independent of the last.
Key Takeaways
- The RNG decides outcomes; the math model prices them. Randomness makes results unpredictable, while the reel weights and paytable determine RTP and volatility.
- Casino RNGs are pseudo-random: deterministic algorithms seeded with hardware entropy, certified to be statistically indistinguishable from true randomness.
- Every output is independent and memoryless — the RNG holds no record of past spins, session losses or "owed" payouts. Streaks are perception, not mechanism.
- Certification binds the RNG to a specific game build; changing either voids the certificate, which is what makes "the casino turned the RNG down" technically implausible in licensed environments.
- Provably fair systems replace lab trust with player-verifiable cryptography — a different answer to the same question the RNG certificate answers.
How a Casino RNG Works
A game's RNG is a software service producing a continuous stream of numbers — typically thousands per second — from a mathematical algorithm. Three layers turn that stream into a game round:
- Seeding. The algorithm starts from a seed built from entropy sources (hardware noise, high-resolution timers, OS entropy pools). Reseeding policies are part of certification: predictable seeding is the classic historical RNG failure.
- Generation. A pseudo-random algorithm — cryptographic generators or long-period designs like the Mersenne Twister family — expands the seed into a number stream with an astronomically long cycle. "Pseudo" means deterministic given the seed; since the seed and internal state are secret and the period enormous, outputs are unpredictable in practice.
- Mapping. When a round starts, the game takes the next value(s) and maps them onto outcomes via the math model: scaling into reel-stop indexes on weighted strips, shuffling a deck, or picking a crash point. This mapping — not the RNG itself — is where all the game's economics live.
The RNG doesn't "aim" for the advertised RTP. It just delivers uniform randomness; the return emerges statistically from the weighted mapping, the way a fair die "emerges" at 1/6 per face over enough throws.
What the RNG does not know
A compliant RNG is deliberately blind. It receives no player ID, balance, bet history or session length, and it can't adjust outcomes in response to them. Two consequences follow:
- No hot or cold machines. A slot that just paid a jackpot has exactly the same distribution on the next spin. Perceived streaks are the normal texture of independent random events.
- No compensation. Online slots in regulated markets are random, not "compensated" (a distinct, disclosed category of UK land-based fruit machines that does track a payout target). Assuming compensator behaviour in an online slot is one of the most common player misconceptions — see the gambler's fallacy angle in expected value.
The Math: from number to reel stop
Suppose the RNG returns a 32-bit integer n and a reel strip has 100 virtual stops with different weights. The game computes n mod W (with care to avoid modulo bias), where W is the total weight, and walks the cumulative weight table to select a stop. A symbol occupying 40 of 1,000 weight units lands with probability 4% — regardless of how many visible positions it occupies on the drawn reel.
This is why two slots can look identical and pay completely differently: the visible reels are a display layer. The certified weight tables behind them set every probability, and the RNG merely samples from those tables. For a deeper treatment of how sampled outcomes turn into long-run return, see RTP and house edge.
RNG vs Provably Fair
| Certified RNG | Provably fair | |
|---|---|---|
| Trust anchor | Test lab certificate + regulator audit | Cryptographic verification by the player |
| Where common | All licensed casinos and studios | Crypto casinos, crash games, mines, dice |
| What you can check | The certificate exists; the lab tested the build | Each individual round, after the fact, via seed hashes |
| Limitation | Requires trusting lab and regulator | Verifies fairness of the draw, not the game's RTP |
The two are complementary rather than competing: provably fair proves the outcome wasn't altered mid-round, while certification also validates the economics — that the mapping from random numbers to payouts matches the declared math model.
How RNGs Are Certified
Accredited laboratories (GLI under the GLI-19 standard, iTech Labs, BMM, eCOGRA and peers) subject the generator to statistical batteries before any market release:
- Uniformity and independence tests — chi-square, serial correlation, runs tests, spectral tests — over very large output samples.
- Range and mapping checks — verifying the scaling into game outcomes introduces no bias (the modulo-bias class of defects).
- Seeding and state review — entropy sources, reseed intervals, and recovery behaviour after restarts.
- Build binding — the certificate names exact software versions and checksums; regulators can compare a deployed build against the certified artifact.
Post-certification, jurisdictions typically require change control: any modification to the RNG or its integration triggers recertification.
For Players
- The practical takeaway is liberating: there is no pattern to find, no timing trick, and no machine state to read. Play decisions worth making are about RTP, volatility and bankroll — never about predicting the next spin.
- Ignore "RNG cycle" folklore. Claims that slots run payout cycles you can ride or wait out describe compensated machines, not certified online RNGs.
- Licensed matters. The entire no-manipulation argument rests on certification and audit. On an unlicensed site, none of these guarantees exist — the same client can run different, unaudited server logic.
- On crypto casinos, use the verifier. If a game advertises provably fair, actually verify a few rounds; the mechanism only protects players who use it.
For the Industry
- RNG choice is an architecture decision with compliance surface. Central RNG services (one certified generator serving many games) simplify recertification versus per-game generators, but concentrate failure and audit scope.
- Modulo bias and mapping defects remain the classic integration failure. Labs routinely reject builds where a correct core RNG is wrapped in a biased scaling layer; mapping code deserves the same review rigor as the generator.
- Jurisdictional deltas are real. Some markets mandate specific test batteries, reseeding rules, or local RNG hosting; multi-market studios should model RNG certification per target, not as a one-off.
- Player trust is asymmetric. RNG suspicion is a top support and reputation theme, and the honest answer — certified, memoryless, audited — is also the commercially correct one. Publishing certificates and lab names visibly is cheap credibility.
Frequently Asked Questions
How does a casino RNG actually work?
The RNG runs continuously, generating thousands of numbers per second from a seeded algorithm. The instant you press spin, the current number is taken and mapped through the game's math model to reel positions or cards. The timing of your click, not any pattern, selects the outcome.
Are slot RNGs truly random?
Certified casino RNGs are pseudo-random: deterministic algorithms seeded with entropy from hardware sources. For gameplay purposes they are statistically indistinguishable from true randomness — test labs verify uniformity, independence and unpredictability before certification, and the cycle lengths are astronomically long.
Can casinos manipulate the RNG?
Not in licensed environments. The RNG and game build are certified together, checksummed, and changing either voids the certificate. Regulators can audit deployed builds against the certified version. What operators can legally choose is which certified RTP configuration to license — a fixed setting, not live manipulation.
Does the RNG know how much I have won or lost?
No. A compliant RNG has no access to player history, balance or session data. Each output is independent, which is why no slot is ever "due" to pay. Adaptive or compensated behaviour would fail certification in virtually all regulated online markets.
What is the difference between RNG and provably fair?
Certified RNG relies on third-party lab testing and regulatory audit — you trust the certificate. Provably fair systems, common in crypto casinos, let you cryptographically verify each round yourself using hashed server and client seeds. They solve the same trust problem by different means.
Related Terms
Sources
- Licensed remote gambling RNGs must be 'acceptably random', uniformly distributed and unpredictable, and adaptive behaviour (a compensated game) is not permitted UK Gambling Commission (RTS 7) (accessed 2026-07-20)
- Pseudo-random generation via deterministic random bit generators (DRBGs) expanded from a seed is a formal standard (NIST SP 800-90A Rev. 1) NIST (accessed 2026-07-20)
- Accredited labs test gaming systems against published GLI standards, including GLI-11 (Gaming Devices) and GLI-19 (Interactive Gaming Systems) Gaming Laboratories International (accessed 2026-07-20)
- RNG certification testing evaluates source code and both raw RNG output and scaled/shuffled game outputs (the mapping layer) iTech Labs (accessed 2026-07-20)
Sources & review status
Written and maintained by SlotCodex Editorial with AI assistance under the editorial process. Game figures are computed live from the SlotCodex catalog database; rules, math and regulatory facts are checked against public primary sources (see the Sources list above). Read how we source and review content.