On TV last night was a show about casino cheaters and the methods they
used. One dude, who worked on the computers that controlled slot
machines, said a computer cannot generate random numbers, thus a
computer-controlled slot machine couldn't generate random
combinations. It seemed to me that generating random numbers would be
a fairly easy task for a computer, and he did say he hasn't worked on
them in years and things could've changed. You guys seem to be a
pretty knowlegable bunch, so I thought I'd toss this out here...was he
right?
Depends on how "random" you want.
As a predictable state machine, no, a computer cannot generate truly
random numbers *by itself*. However, combining internal random
techniques with external events, you can get as "random" as you want.
Most computers in their "random" functions use some variants on that;
from random inputs from users (monitoring keystrokes or in the case of
slot-machines, pulls on the handle or button-pushes) to time-of-day, to
truly random things like shot-noise from a transistor or vacuum tube.
Like I said, "How random do you want?"
I can make a shift-register "random number generator" that will pass
every test for randomness you want to make ... except one. If fed the
same starting seed, it will repeat exactly. I presume that's the sort
of "not really random" that the person was talking about.
However, in interacting with the *real* world, there are many
opportunities to introduce truly random variations to your data.
Take, for example, a slot-machine.
Have a free-running counter; or better-yet one of those pseudo-random
generators counting continuously. Not truly random ... YET. Have the
counter/generator running at a multi-megahertz rate.
However, every time the user presses a button, add the current value
retrieved from that pseudo-random number-generator and enter it as a CRC
value to another similar generator, also free-running at a different and
drifting rate; each oscillator varied by temperature, humidity,
air-pressure, and all the things normally we try to keep from effecting
"stable" oscillators.
Since each input to the system is governed by truly random external
values, it doesn't *matter* that the computer itself cannot generate
truly random numbers. The "real world" does that for you.
For *truly* random data, instead of an oscillator you take random counts
from truly random events, like counting the electrons emmited by a
radioactive particle or shot-noise in a vacuum tube, or just the
background "hiss" you get from a badly tuned radio.
Of course, even doing that, you have to take into account the random
field you want for truly "random" results. Thus you'd have a different
"window" and counting system for a "random" selection of 52 cards versus
the one-in-six roll of a die.
Also, for best results in a deck of cards, while you want a random
shuffle, you actually don't want a truly random *deck* each time. What
you'd like is something similar to a bad shuffle done several times ...
Like most amateurs would do; not like a professional magician. You want
random interchanges of random-sized *groups* of cards, done several
times. For dice however, you truly want each die independent of all
previous throws and all other dice in the throw.
If somebody is counting on the non-randomness of computers to make his
predictions ... I have a nice program or two that could determine he was
using such ... and take every dime he had.
No, computers really only come in handy against machines that don't have
high-powered and random-savvy people programming them. Mechanical
machines, or poorly programmed ones. Or, systems that have weaknesses
that can be exploited by perfect players like BlackJack can.
Perhaps there are such computer-controlled machines out there.
If so, then methinks the casinos are dumber than the players.
I know damned well *I* could easily design a *legal* and *random* system
or table or machine, with true odds clearly posted, where I'd *invite* a
player with a supercomputer attached to sit down and play ... and
happily take his money, just like the woman betting hunches sitting
right next to him.
If I can, I'm sure the casinos can.
Whether they actually *do* or not, I can't say.
It *is* a lot easier, especially in an interconnected world, to just
rely on "standard" algorithms for generating pseudo-random patterns ...
which, as said, aren't truly random at all.
If anybody in a casino actually has trouble with a computer-using player
versus computer-controled games, I suggest you refer them to ME.
I'll have a good laugh; and then (after charging them a nice BIG fee)
suggest several ways to fix their problem.
Casino operators aren't exactly mathematicians, computer-programmers,
nor random-pattern experts. They *should* though, have several
high-powered examples of each at least on-call, if not in-staff.