What is a pseudo-random number generator (PRNG)?
A pseudo-random number generator (PRNG) is a formula that starts from a seed number and produces a long sequence of values that look random but are fully determined by that seed. The same seed always gives the same sequence. Kenyan regulations require the random number generator used for games of chance to be certified.
Definition
A PRNG is an algorithm, not a physical process. It keeps an internal state, and each time the game asks for a value it updates that state with a fixed rule and returns a number derived from it. The starting state is the seed.
Because every step follows from the one before, the sequence is deterministic: the same seed and the same rule always give the same numbers in the same order. The broader idea is covered in the guide to what a random number generator is.
Seed and period
The seed decides where in the sequence the generator begins. The period is how many values come out before the sequence loops back to the start. A formula holding a limited number of states must eventually repeat one.
Illustrative example. Take the toy rule: new value = (5 × old value + 3) mod 16, with seed 7. Then 5 × 7 + 3 = 38, and 38 minus 32 is 6. Next, 5 × 6 + 3 = 33, which gives 1. Then 5 × 1 + 3 = 8, and 5 × 8 + 3 = 43, which gives 11. Seed 7 yields 6, 1, 8, 11 every time. With only 16 possible states this toy must repeat within 16 steps; real generators hold far more state, so their period is far longer than any session.
Why it is used in games
A well-designed PRNG gives values evenly spread over their range, with no visible link between one value and the next. That is enough for each round to look and behave as independent, which is why a past result carries no information about the next one.
How Kenyan rules treat it
The rules speak of a "random number generator" without distinguishing the type. Regulation 45(2) of the Conduct of Gambling Operations Regulations, 2026 says the generator used for all games of chance "shall be certified by the Authority or its approved agent to statistically test the randomness, theoretical return to player". The certification steps are explained in how RNG testing works in Kenya.
Seeds can also be shown to players in provably fair designs, covered in provably fair crash games. A PRNG sets no payout: the house edge comes from the game's rules.
Questions and answers
If a PRNG is a formula, can its next number be worked out?
Only by someone who knows the algorithm and its current internal state. That state is hidden from the player, and a certified generator is tested so that its output shows no usable pattern from the numbers a player can see.
What is the period of a PRNG?
The period is the number of values produced before the sequence starts to repeat. It is limited by the number of internal states the formula can hold.
Sources
- Gambling Control (Conduct of Gambling Operations) Regulations, 2026 (L.N. 112), regulation 45, accessed 2026-10-19
- Gambling Control (Licensing) Regulations, 2026 (L.N. 111), regulation 2, accessed 2026-10-19