# Are slot machines purely random or do they pre-calculate every spin?

Being a computer programmer I assumed that every single spin of a poker machine was pre-calculated by the machine thus avoiding the chance of multiple large pays being payed out in a short period of time. e.g Some guy puts in 5 bucks but spins 3 x \$10,000 in three spins.

I am just reading a government designed pamphlet and I am surprised to see the following:

There are millions of possible combinations on modern poker machines and every spin has an equal chance of bringing up a winning combination

It does say later that the operator can change the bias of the machine so that there are fewer chances to win, that is adjusting the probability, but the above statement suggests that the provided payout is still left to chance. Meaning you could effectively get multiple large payouts in a row.

Most slot machine players I have met suggest that a machine "goes quiet" after a medium/big payout and you are better off pulling your money out and switching machines because the machine knows it has already paid you.

Are poker machine payouts for each spin calculated on the fly or is purely down to statistics?

-
On the last line, the answer to both options is Yes! – Oddthinking Apr 13 '12 at 4:46
@Oddthinking - I think I worded that wrong, I mean pre-calculated at each turn, as in decided in a deterministic way. – xiaohouzi79 Apr 13 '12 at 5:35
Often, even after explanation, people have trouble grasping the statistical concept of a series of independent events. Instead, gambler's lore of various kinds is used to explain supposed patterns in the events as they are realized. – Paul Apr 13 '12 at 6:10
Why should they be designed like this? The chance that this happens is small at best and if the machine doesn't have enough money left to pay out a large win it still can alert an employee. – Martin Scharrer Apr 13 '12 at 14:53
@Martin No slot machine in a casino I've ever seen still pays out cash. They give you a slip of paper with a cash value that you can either cash in or feed to another slot machine. Or you have a card, which has a cash value. Machines take money off the card for each spin and put the winnings on the card. You can get the cash value of some or all the money on the card at any time. – Sam I Am Apr 13 '12 at 19:05

No, it is not the case that results are pre-calculated in gaming machines. The result of each game is calculated independently and on-the-fly.

Gaming machines' randomness is validated statistically by independent companies such as Gaming Laboratories International. [Warning: Site has annoying voice-over.]

At GLI, we have one job: to test electronic gaming equipment. In fact, our clients are gaming regulators in jurisdictions all over the world, more than 450 in all.

They test against standards such as Gaming Devices in Casinos, although the appropriate standard depends on jurisdiction and there is not yet a universally accepted standard.

Example rules from the Gaming Devices in Casinos standards:

Each possible permutation or combination of game elements that produces winning or losing game outcomes shall be available for random selection at the initiation of each play, unless otherwise denoted by the game;

[...]

The RNG [Random Number Generator] shall be cycled continuously in the background between games and during game play at a speed that cannot be timed by the player.

[...]

Unless otherwise denoted on the payglass, where the gaming device plays a game that is recognizable such as Poker, Blackjack, Roulette, etc,, the same probabilities associated with the live game shall be evident in the simulated game. For example, the odds of getting any particular number in Roulette where there is a single zero (0) and a double zero (00) on the wheel, shall be 1 in 38; the odds of drawing a specific card or cards in Poker shall be the same as the live game. For other gaming devices (such as spinning reel games or video spinning reel games), the mathematical probability of a symbol appearing in a position in any game outcome shall be constant.

Note: Some machines manage a growing jackpot. Where there is a jackpot, the expected payouts between games are not independent.

Disclaimer: I have a friend who used to work in the gaming validation industry, but not for this company. I have no connection with Gaming Laboratories International.

-
Would be interested to know why this is necessary: "at a speed that cannot be timed by the player". Surely that sucker flies (randomly not cycling 1,2,3,4) at phenomenal pace, not repeating itself at regular intervals? – xiaohouzi79 Apr 13 '12 at 5:32
Possibly in response to Michael Larsen on Press Your Luck? Longer, better-told version by This American Life (Act IV). – Oddthinking Apr 13 '12 at 5:44
@xiaohouzi79 - If you can time the updates, you can predict future numbers, as the RNG is really a pseudo RNG, thus allowing a player to improve his/her odds. – Rory Alsop Apr 13 '12 at 8:01
@Rory Are you sure about this? Why would modern casinos not use real RNGs? Such devices are cheap enough, and even normal computers can produce non-predictable random numbers (`/dev/random` on Unix …) using several sources of environmental noise from device drivers. Either way, the non-timed speed requirement is unnecessary. – Konrad Rudolph Apr 21 '12 at 1:32
The RNGs are, as far as I know, all linear congruential RNGs. The RNG must also preserve its state across power outages/resets. The reason is simple - you don't just need random numbers, you need to guarantee that every number will eventually turn up. Linear congruential generators have that characteristic. If some numbers might not occur in the sequence, those values may correspond to the range of values that produce a top-tier win on the game, which would invalidate the pay tables. – Dan Haynes Jan 3 at 22:04