Behind every slot spin there is a short piece of code that produces a number, and the number decides where each reel stops. This post explains how that kind of generator works in general, using a toy one small enough to compute by hand. The generator below is invented for the arithmetic. The Play listing for Brasslight Slots does not say how the game picks its results, so nothing here describes that app's code. It describes the standard method.
Pseudo-random, not random
A computer follows instructions, so it cannot toss a coin. What it can do is run a pseudo-random number generator (PRNG): a fixed rule that turns one number into the next, so that the stream looks patternless to any ordinary test. Three parts matter.
- State. The hidden number or numbers the generator carries between draws.
- Update rule. A fixed calculation that moves the state forward and produces an output.
- Seed. The starting state. Same seed, same stream, every time.
The seed is usually taken from something unpredictable, such as the system clock or the operating system's entropy pool, so that each session starts somewhere different. After that the rule does the work.
A generator you can run on paper
One of the oldest designs is the linear congruential generator: multiply the state by a constant, add another constant, and keep the remainder after dividing by a modulus. Ours uses a modulus of 16:
next = (5 × current + 3) mod 16
Start from the seed 7. Then 5 × 7 + 3 = 38, and 38 mod 16 = 6. Next, 5 × 6 + 3 = 33, and 33 mod 16 = 1. Then 5 × 1 + 3 = 8. Carrying on gives 6, 1, 8, 11, 10, 5, 12, 15, 14, 9 as the first ten outputs. In this toy, the output is simply the state.
Run it for 16 steps and every whole number from 0 to 15 appears exactly once: 6, 1, 8, 11, 10, 5, 12, 15, 14, 9, 0, 3, 2, 13, 4, 7. The seventeenth output is 6 again, and the whole sequence repeats. The length of that cycle is the generator's period, and here it is 16.
Mapping a number to a reel stop
The generator gives numbers. The game needs stops. As described in reel strips and stops, a reel is a list of positions, so the mapping is a single step: take the number and use it as a position.
Say each reel has 16 stops, numbered 0 to 15. Then an output of 6 means stop 6 and an output of 11 means stop 11. A five-reel spin takes five outputs in a row, one per reel. From seed 7 the first spin uses 6, 1, 8, 11 and 10 for reels 1 to 5, and the second spin uses the next five, 5, 12, 15, 14 and 9.
When the numbers do not divide evenly
Real generators produce far larger ranges, often 32 bits, which is 232 = 4,294,967,296 possible values. If a reel has 20 stops, the common shortcut is to take the remainder after dividing by 20. But 4,294,967,296 is not a multiple of 20: it is 20 × 214,748,364 + 16. So 16 of the stops get 214,748,365 raw values each and 4 stops get 214,748,364. The difference is one value in about 214 million, too small to matter, though careful code removes it by rejecting the leftover values and drawing again.
Why one spin does not predict the next
Our toy generator is a poor model of independence. Once you see one output, you know the next with certainty: after 6 comes 1, always. Anyone who knew the rule and saw one number could forecast every spin. It also has only 16 states, so it can produce just 16 different spins, one per starting state, where independent 16-stop reels would allow 165 = 1,048,576.
Serious generators fix both problems with scale and design. The Mersenne Twister, a widely used general-purpose generator, has a period of 219937 − 1, a number with over 6,000 digits, so no player will ever reach the end of the cycle. In practice, the result of one spin carries no usable information about the next. That is the property described in why a slot is never due: the machine has no memory of recent results that it acts on, and no schedule it is catching up with.
A generator is a deterministic rule with a hidden state. Its output is converted into a stop number, one per reel, and what matters for fairness of the odds is that every stop is equally likely and the stream is hard to predict.
What the mapping does to the odds
The generator does not know about symbols. It only produces stop numbers. The odds of a symbol come from how many stops show it, which is the count-over-length rule from the reel strip post. With 16 stops and a symbol on 2 of them, a reel lands on it with probability 2 ÷ 16 = 12.5%.
A check you can do
Pick any seed from 0 to 15 and run the toy rule for 16 steps: each number from 0 to 15 should appear once. Restart from the same seed and you get the same spin, which is what a seed means.
Brasslight Slots: Casino Games is a cat-themed 5-reel slot with 243 ways to win, a Yarn Pick bonus, a daily prize wheel and Turbo and Auto spin. It uses virtual coins only, there is no real money in it, and coins and gems have no cash value.