Stay informed with the
NEW Casino City Times newsletter!
Best of John Robison
An in-depth look at the RNG18 January 2010
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,
Send your slot and video poker questions to John Robison, Slot Expert, at firstname.lastname@example.org. 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 email@example.com.
Best of John Robison