Logout

Question of the Day - 14 July 2006

Q:
I keep seeing the term RNG, or random number generator, as the "brains" behind the operating system of slot and video poker machines. What exactly is the RNG?
A:

The answer to this question is technical, involving step motors, digital pulses, seed values, numerical remainders, and virtual reels. But because we're asked it quite frequently, we thought we'd finally tackle it.

The random number generator is a piece of software operated by a microprocessor in the computer in a slot or video poker machine. Think of your own computer, running a word-processing or spreadsheet program. Instead of these common functions, the slot machine's computer runs a program that cycles endlessly and speedily through billions of numbers.

Now, these numbers aren't truly random. They're more accurately known as "pseudo-random" numbers, because they're generated by an algorithm (a mathematical formula) that follows a specific pattern. The pattern produces numbers that appear to be random, since they have to pass several built-in tests for randomness.

For example, a good algorithm might generate numbers that don't repeat, have an adequate numeric distribution, and can't be predicted, unless you know both the formula and the initial, or seed, value.

But for all practical purposes, the RNGs in gambling machines approximate randomness closely enough to fulfill their intended purpose. (Note that random-number generators are getting better, as seed numbers as well are now often generated randomly -- perhaps in conjunction with electrical noise or, on a computer, by averaging mouse movements.)

When it's running, the RNG is generating whole numbers from one digit to 10 or 11 digits (in the billions, in other words). It spits out numbers hundreds of times a second for a slot machine and shuffles the deck of cards hundreds of times a second for a video poker machine. At the very moment when you pull the handle or press the "spin" or "deal" button, the computer identifies the next numbers or card sequence in the RNG's cycle. On a three-reel slot, the three numbers identified by the computer correspond to the three reels of the slot machine. On a video poker machine, the number identifies the exact order of the playing cards, from first to last, in the deck.

To further complicate matters, according to the website http://money.howstuffworks.com/slot-machine3.htm, it's not the number itself that corresponds to the reels or the deck. Rather the RNGs that operate slot machines go through a second step of simple (for a computer) arithmetic, feeding the numbers through another process to determine where the reels should stop. In the example provided by howstuffworks.com, the RNG number is divided by a set value, usually 32, 64, 128, 256, or 512, with the divisor corresponding to the number of virtual stops on the reel.

Say the RNG number is 12,345,678 and the computer divides by 128. It comes up with 96,450, with a remainder of 9. The remainder is the critical number: 9 now becomes the stop on the first virtual reel on the slot machine. The same exercise determines the stops for the second and third virtual reels.

Here's an extremely simplistic example of a virtual reel. The physical reel might have two different symbols, a blank that pays nothing and a bar that pays a jackpot. The virtual reel, meanwhile, has 128 stops, with 127 programmed to land on the blank and only one programmed to land on the bar.

Once the computer knows the remainders of the three numbers taken from the RNG's cycle, it then consults a table that tells it how far to move the physical reel to correspond with the stop on the virtual reel. This is where the step motor comes in. A short pulse of electricity moves the motor a precise increment to land the reel on the exact spot determined by the computer.

Thus, when you press the spin or deal button on a slot or video poker machine, you’re initiating a speed-of-light sequence that instructs the computer to show the reel positions or card values that correspond to the last set of numbers generated by the RNG. The spinning reels on a slot machine and the cards of a video poker machine are, in the final analysis, for display purposes only. The true action is with the computer that determines the display.

No part of this answer may be reproduced or utilized in any form or by any means, electronic or mechanical, without the written permission of the publisher.

Have a question that hasn't been answered? Email us with your suggestion.

Missed a Question of the Day?
OR
Have a Question?
Tomorrow's Question
Has Clark County ever considered legalizing prostitution?

Comments

Log In to rate or comment.