Stay informed with the
Recent Articles
Best of John Robison

# How does a slot machine use the numbers from the RNG?

11 August 2008

Dear John,

I understand that the RNG generates a value between 0 and 4 billion which is then "translated" into a specific number that correspond to stops on the virtual reels. I want to know more about this translation, which seems to get glossed over in most accounts that I can find (and those which don't gloss over it, e.g. the patents themselves, are over my head).

I gather that the translation process might follow a mathematical "mod" transform? Is it an algorithm of some sort—and if so, how does that algorithm work? Another online gaming guru used the computer programming term "indirection" -- but it was not clear to me whether this term applies to the conversion process by which an RNG value is correlated with the virtual reel in the first place, or the subsequent conversion process by which stops on puffed up virtual reels are mapped to actual reels... perhaps there are two different kinds of indirection going on – or perhaps that term applies only to virtual reel mapping?

I would greatly appreciate your clarifications on this muddle of mine!

All best,
Natasha

Dear Natasha,

Here's how the program running a slot machine takes a number from the RNG and uses it to figure out what symbol should land on the payline.

As you say, the number can range from 0 to about 4 billion -- at least that's the range of IGT's RNG according to Kilby and Fox in Casino Operations Management. There's no slot reel anywhere that has 4 billion stops on it, so the number has to be transformed to the proper range. The range we want is not the number of stops (blanks and symbols) on the reel you see in the slot machine, but the number of stops on the virtual reel defined by the slot's programmers.

Here's a typical reel strip from a Double Diamond machine. This is the layout of the symbols you can see on the physical reel in the machine.

 Stop # Symbol 1 Blank 2 7 3 Blank 4 Single Bar 5 Blank 6 Double Diamond 7 Blank 8 Triple Bar 9 Blank 10 Cherry 11 Blank 12 Double Bar 13 Blank 14 7 15 Blank 16 Single Bar 17 Blank 18 Double Diamond 19 Blank 20 Triple Bar 21 Blank 22 Double Bar

Here is the layout of the virtual reel in the same machine. You can't see this layout, but it is the layout that determines the probability of a symbol landing on the payline. This table lists the 72 virtual stops and which of the 22 physical stops is mapped to it.

 1 1 2 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 6 7 7 7 7 7 8 9 10 10 11 12 12 12 13 13 14 15 15 16 16 16 16 16 16 16 16 16 16 16 16 16 17 17 17 18 19 19 19 19 19 20 20 21 21 21 21 22 22 22 22

As you said, the easiest way to get the number from the RNG into the proper range is with modulo arithmetic. Let X be the number from the RNG, then X MOD 72 gives us a number from 0 to 71. We can add one to the result to get a number fom 1 to 72.

Suppose the result at this point is 52. The program looks at entry 52 in the virtual reel table. This virtual stop maps to physical stop 16. The program can now stop the reel at physical stop 16.

This process can be called indirection. The MODded number isn't the physical stop itself, but rather it is an index into a table that gives us the physical stop for that index.

The same procedure is used for the other reels on the machine. Most machines have the same physical and virtual reels for all reels, but some don't.

After all the stops have been selected, the program needs to check if there is a winning combination. It uses the physical stop selected on each reel to look in the Physical Reel Table to see what symbol is at that stop. (In our example, the symbol at physical stop 16 is Single Bar.) The program then looks in another table to see if the combination is a winning combination. If it is, it awards the player the proper number of coins based on the number of coins wagered.

Hope this helps,
John

Send your slot and video poker questions to John Robison, Slot Expert, at slotexpert@comcast.net. Because of the volume of mail I receive, I regret that I can't reply to every question.

John Robison

John Robison is an expert on slot machines and how to play them. John is a slot and video poker columnist and has written for many of gaming’s leading publications. He holds a master's degree in computer science from the prestigious Stevens Institute of Technology.

You may hear John give his slot and video poker tips live on The Good Times Show, hosted by Rudi Schiffer and Mike Schiffer, which is broadcast from Memphis on KXIQ 1180AM Friday afternoon from from 2PM to 5PM Central Time. John is on the show from 4:30 to 5. You can listen to archives of the show on the web anytime.

#### Books by John Robison:

The Slot Expert's Guide to Playing Slots
John Robison
John Robison is an expert on slot machines and how to play them. John is a slot and video poker columnist and has written for many of gaming’s leading publications. He holds a master's degree in computer science from the prestigious Stevens Institute of Technology.

You may hear John give his slot and video poker tips live on The Good Times Show, hosted by Rudi Schiffer and Mike Schiffer, which is broadcast from Memphis on KXIQ 1180AM Friday afternoon from from 2PM to 5PM Central Time. John is on the show from 4:30 to 5. You can listen to archives of the show on the web anytime.

#### Books by John Robison:

The Slot Expert's Guide to Playing Slots