computers cannot generate random numbers?

S

sillyputty

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?
 
P

Phisherman

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?


Yes he is correct. An algorithm can produce pseudo-random numbers. A
pair of dice or coin, if perfectly balanced, will be truly random. For
all practical purposes using a random-generating program is good
enough. For more details check a good statistics textbook.
 
P

Paul

sillyputty said:
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?

This article will give a good background.

http://en.wikipedia.org/wiki/Hardware_random_number_generator

And an enthusiast at work here. A few hardware generators are analysed:

http://www.robertnz.net/true_rng.html

They love to hang these hardware generators off serial ports.
Which tells you, they cannot generate too many "coin flips" per
second, without losing their good properties.

http://www.randomnumbergenerator.nl/home.html

Without a HRNG built into the computer, the computer doesn't
have anything in it, to use as a random event. A psuedorandom
generator can be constructed in software, but these take a
seed. If you know the seed, then you can predict the
sequence. In fact, that is a very useful property. When
doing simulations, if you record the seed at the beginning of
a run, it is possible to modify the program, and then rerun the
same "random" sequence as the time before (you input the same seed
on the second run). That is a useful thing to be able to do, if
what you are simulating needs to be changed. Basically, it saves
on having to record all the pseudorandom numbers to disk, as you
can generate them on the fly again on the next test run. If you
used an HRNG for simulation programs on the computer, then you'd
need to record all the numbers, if you wanted to rerun the same
input stream.

Paul
 
P

Peter

This article will give a good background.

http://en.wikipedia.org/wiki/Hardware_random_number_generator

And an enthusiast at work here. A few hardware generators are analysed:

http://www.robertnz.net/true_rng.html

They love to hang these hardware generators off serial ports.
Which tells you, they cannot generate too many "coin flips" per
second, without losing their good properties.

http://www.randomnumbergenerator.nl/home.html

Without a HRNG built into the computer, the computer doesn't
have anything in it, to use as a random event. A psuedorandom
generator can be constructed in software, but these take a
seed. If you know the seed, then you can predict the
sequence.

However, most computer seeds are normally generated from the built in
clock that computers use, so to predict the seed exactly would be
extremely difficult. Whether such systems, such as slot machines, use a
similar seeding process, I have no idea.
 
F

Frank McCoy

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.
 
F

Frank McCoy

In alt.comp.hardware.pc-homebuilt Peter
However, most computer seeds are normally generated from the built in
clock that computers use, so to predict the seed exactly would be
extremely difficult. Whether such systems, such as slot machines, use a
similar seeding process, I have no idea.

There are computational-intensive ways to predict the seed from numbers
generated, if you have a large enough sample.

GOOD random number generators use really random events to **** up such
calculations. The simplest, in a casino, would be the random
button-pushes by random users scattered throughout the business.

I don't *know* if any uses such; but it would be one of the methods *I*
would use to scramble things. Others like random decay of radioactive
materials are completely unpredictable.

You do have to match your rate to the desired field though.
 
D

DaveW

Wrong. Intel for one has produced at some time in the recent past a device
to be connected in a computer that generates real random numbers by using
the thermal charasteristics of the CPU in use.
 
J

John Doe

sillyputty said:
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?

Wasn't very long ago personal computer clocks were good at generating
random numbers. I would base a random number generator on a timer chip
or just an resistive-capacitive (RC) timer which is analog and
fluctuates.
 
P

Pecos

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?

He is right if he means true 'random numbers'.

All 'random numbers' are actually pseudo-random numbers given 'perfect
knowledge'.

The very act of picking a 'random number' necessitates a method for doing
so. Any method or algorithm for picking this number is based on rules for
doing so. 'Perfect knowledge' of the method and rules would allow someone
to predict the outcome.

Since this is a real world situation and no such creature as 'perfect
knowledge' exists, any method for generating a pseudo-random number that
uses a significantly large number of variables will usually suffice.

Computers and video cameras can be used to help determine the pseudo-random
numbers generated in Vegas by reducing the complexity to manageable levels.
It is only necessary to beat the 'house take' in order to be successful.

By the way, a roulette wheel is a bad method of generating pseudo-random
numbers, especially by allowing betting once the ball is in play and using
a human being to put the ball in play.

http://en.wikipedia.org/wiki/Roulette#Betting_strategies_and_tactics
 
G

Gremenbulin

Pecos said:
He is right if he means true 'random numbers'.

All 'random numbers' are actually pseudo-random numbers given 'perfect
knowledge'.

The very act of picking a 'random number' necessitates a method for doing
so. Any method or algorithm for picking this number is based on rules for
doing so. 'Perfect knowledge' of the method and rules would allow someone
to predict the outcome.

Not true of hardware RNGs. No-one knows how to predict quantum events.
 
J

johns

Pretty much. I've tested a bunch of them in the past,
and any "process" I wrote that needed a random
number, was anything but random. On PCs, the
random # generator will "generate" a sequence
of random numbers, but if the stupid thing is reset
for each "process", it will most likely produce the
same set of random numbers over and over with
very little change. That is what most people don't
understand in their coding. Also, the random #s
have very little variance in the short run, and
"round off" errors in the "process" will reduce that
even more. Tying the generator to so-called real
world random events doesn't work any better.
There is simply no such thing as real world
random events to a measuring device. It will
"smooth" the events, and be just as flawed.
So, in these gambling machines, you cannot
guess exactly what will happen, but you can
easily guess the immediate "range" of what
will happen. And you can watch and see if
the thing is avoiding certain "ranges". If there
is a way to take advantage of that, you most
certainly can. If you could not, you could not
even walk down the street without a random
event landing on your head.

johns
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top