Game Types Bonuses Slots More
Online Casinos Poker Bingo Games Lotteries Sports & Racebooks Fantasy Sports Forex Betting Exchanges Spread Betting Binary Options Live Dealers
Weekly Newsletter Online Gaming News Payment Methods Gaming Software Gaming Site Owners Gaming Jurisdictions Edit Preferences Search
 
Bonuses! New games! Gossip! And all the player news you can handle. Sign up NOW!

John Robison

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. Hear John on "The Good Times Radio Gaming Show," broadcast from Memphis on KXIQ 1180AM Friday afternoons. You can listen to archives of the show online anytime.

More about John Robison
More articles by John Robison

More books by John Robison
 

An in-depth look at the RNG

18 Jan 2010

By John Robison

John,

I have looked through most of your archives and cannot find a detailed explanation of how the RNG and lookup tables work in a slot machine. I have a good understanding of the process but a few things about the process I can't put together. Can you fill in the gaps for me?

You press the stop button and the RNG takes a number the "seed", which I understand to be typically based on the milliseconds that have elapsed since 1/1/1970 and divides that number by the number of positions in the virtual reel table, usually 64 or 128. The remainder of that number is used to find the actual stop or reel position on the machine. This system makes complete sense to me (and possibly my system is slightly off). My more important question is if a time "seed" is used and only one pseudo-random number is used, how does each reel get assigned a truly random number? My thought process would leave me to believe that all the reels would get the same number picked for them with this process. Even if there was a determined delay in the process of picking random numbers the resulting combinations for reels 2 and 3 would be a result of reel one. Wouldn't that be great to hit the top prize on the more difficult machines every 128 spins? Can you please explain this process in depth explaining the seed and the RNG's process to determine a number for each reel?

Thanks,
Kris

Dear Kris,

Here's the way the RNG works in a slot machine.

The RNG in a slot machine is nothing more than a function that takes one or more parameters and performs some mathematical operations on them to generate a number. The parameters are usually past results from the RNG. To keep things simple, let's look at an RNG that takes just one parameter.

The RNG is constantly running (that is, it is generating numbers even the machine is not being played), taking the last value calculated and generating a number from it. Even though the RNG is constantly running, there has to be a time when it starts running. There is no prior result to pass into the function at this time, so we have to choose a value to pass in, which is called the seed value. Like you said, this seed value can be based on the current time.

After we've calculated a seed value and generated one number, the RNG is off and running using past results to calculate new numbers.

When the players starts a game by pressing the Spin button or pulling the handle on a machine, the program running the slot needs to use the output from the RNG to determine where to stop the reels. The program polls the RNG (that is, gets the most recently calculated value) and uses the number to calculate the stopping positions.

The program could use one number from the RNG to determine where to stop all reels. Let's say the machine has three reels with 64 virtual stops on each reel, for a total of 262,144 combinations. The program would scale the number from the RNG to the range 0 to 262,143 using modulo arithmetic (X mod 262,144) and then decompose the result into three separate numbers in the same way you convert from decimal to hexadecimal.

Most slot programs, however, poll the RNG once for each reel on the machine. On our machine, the program polls the RNG to get a number for the first reel. The program scales the number to select the virtual stop for the first reel. The program then polls the RNG again to get a number for the second reel. And it polls the RNG one more time to get a number for the third reel.

Best of luck in and out of the casinos,
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.

This article is provided by the Frank Scoblete Network. Melissa A. Kaplan is the network's managing editor. If you would like to use this article on your website, please contact Casino City Press, the exclusive web syndication outlet for the Frank Scoblete Network. To contact Frank, please e-mail him at fscobe@optonline.net.

 
About Us | Advertising | Publications | Land Casinos