Pseudo-anti-random-disestablish-mentarianism
-
- VP Veteran
- Posts: 762
- Joined: Wed Feb 02, 2011 6:59 pm
Pseudo-anti-random-disestablish-mentarianism
There's been a lot of talk about RNG's lately, here's an excerpt from my book on the topic that might help.01000101101000101001001001100010001010 Pseudo-anti-random-disestablish-mentarianism
“Oh,
many a shaft at random sent
Finds
mark the archer little meant!
And
many a word at random spoken
May
soothe, or wound, a heart that's broken!”
~ Sir Walter Scott
Now that we’ve beaten to death the
subject of what
“random” is and isn’t, discussed the correct
usage of the word “luck,” and the nonexistence of the “law of
averages,” we can finally explain how a
video poker machine deals
your hand and picks the
cards. This information is separate from the
basic
concept of “randomness” because now what we
will discuss
is computer-generated randomness.
Believe it or not, when you bring
computers into
the mix, the jury is still out even today on what
is,
and what is not, random. It seems the only thing
more random
than a truly random number is our
understanding of it, and the
opinions of the people
making them. In nature, philosophers believe
the
things we think of as random are really only
beyond our
capability to predict. Unpredictability
and randomness aren’t
really the same thing. A
math teacher once commented that,
“teaching
probability math properly was probably the most
problematic[1].” (Try saying that ten times fast.)
Mathematicians
define random as something
having no discernible pattern; yet if you
produce a
long string of numbers that don’t have an even
distribution of digits, purists will immediately accuse it of being
non-random. But isn’t an even distribution of digits a pattern?
A recent scientific description of what
defines
completely random numbers is, if the algorithm
needed to
describe the number is as long as the number itself then it is
completely random[2]. Oddly, the science community has been
arguing for years on what is and is not random as much if not more
than the philosophers and theologians. More surprisingly, around 1965
many mathematicians[3] wanted to remove patterns like
(1212121212) from long strings of randomly generated numbers, to make
them useful for statistical analysis. This almost borders on
insanity! By definition, in any sufficiently long string of
completely random numbers, patterns like this will and should be
present. They felt, however, that the random numbers needed to be
manually doctored to make them more random (how weird is that?). How
can a human, by dedicated purposeful action, make an
already
completely random number... better? If
something is already random,
it is impossible to make it “more random.”
Believe it or not, when doing the
research for this book, I managed to confuse even myself a little. I
thought I knew what random was, but now I’m not
so sure. When you
roll a die, we assume the chance
of a one through six coming up is
equally likely.
When you roll two dice, however, as in craps, the
numbers generated do not distribute evenly. A
seven comes up six
times as often as a two or twelve, yet we still think of this as
random. When
we talk about random with video poker or slots,
what
we really mean is, “Equiprobable and
unpredictable.”
“Equiprobable,” means all the
possible outcomes
must be equally likely and occur with the same
relative frequency, and “unpredictable” means you
don’t know
exactly when or in what order they will
come. Since all modern slots
and video poker
machines use computer processors, they are limited
to the level of randomness you can get with a computer algorithm,
which unfortunately isn’t very
good.
Believe it or not, it’s very hard to
get a computer to
do anything (other than crash) purely by chance!
Surprising as this may first seem, it
is really
difficult to get a computer to do something
randomly. A
computer runs a program, basically a set of instructions and follows
these instructions
blindly and is therefore completely predictable.
The closest you can come to truly random numbers
(if such a thing
exists) is by an algorithm called a pseudo-random number
generator.
“Pseudo” because it is not truly random
and quite predictable if
you know the algorithm
used. Take for example the never-ending
digits of
pi. They are random by a certain definition, as are
some
logarithms. They do not repeat, and they
meet the three main
criteria of randomness:
Even distribution of digits.
(1234567890)
Equal chance of number pairs.
(10,11,12,13,14,15,16,17,18,19,10,21,22,23,etc.)
Expected distribution of
same-number strings.
(0, 00, 000, 0000, 00000, 000000, etc.)
Yet anyone that knows pi could easily
tell you in
advance what the 81st digit will be and when to
take it
out of the oven. According to this pseudo-
random definition of
random numbers, a string of
numbers is random even if it’s
predictable. Of
course this type of pseudo-random number would
never do for a gaming device. So, how do they do
it?
Believe it or not, in order to get a
truly random
number out of a computer you have to introduce
what is
called “an external source of entropy[4].”
The random
element must come from without, not
from within, in order to be
completely
unpredictable as well as equiprobable, which is
what we
really mean when we say “random” as it
applies to slots. On a
computer, programmers have
experimented with key stroke delay and
mouse movement to generate the needed “seed number”
as it is
called, for their source of entropy. Fancier
devices use the
unpredictable decay of radioactive
isotopes measured with a Geiger
counter, listen to radio static from far off galaxies, or measure the
emitted light radiating from a lava lamp (long live disco). The
lavarand people at Silicon Graphics have been clever enough to use
lava lamps to generate random numbers, so their entropy source not
only gives them entropy, it also looks good at parties. I wonder if
they get governments grants. I
would have loved to be at that
meeting. “Dude,
check it out. Here’s where your money went. It
makes random numbers and chicks dig it!” I kid...I
just wish I had
thought of it!
Slot manufactures rely on a different
method and use a continuously cycling clock to generate their truly
random numbers. It is constantly going even when no one is playing
the machine and passes along a number when someone does.
The moment you hit the deal key it
reads the clock
on that particular millisecond (one thousandth of a
second) passes the time along in the form of ’the
seed’ to the
RNG (Random Number Generator).
Here is the actual algorithm used in
one type of
RNG for Micro controllers:
Seed * multiplier * 2nd seed + adder =
end result
Seed = Current clock time reduced to
integer
Multiplier = arbitrary number, such as
1664525
2nd seed = another clock time after
programmed
read delay
Adder = arbitrary addition to the
result of the
current sum
End result = sum made to fit desired
spread (such
as 1-52)
In one particular programming language
it would
look like this:
unsigned long seed ;...
seed =
1664525L * seed + 1013904223L ;
Another example would be:
X0 = seed value (e.g., the time
expressed to 10
digits), Xn+1 = (3141592653Xn + 2718281829)
mod
2^35.
Mod means taking
the remainder after dividing by
2^35, and is equivalent to just
doing all the
arithmetic in 35 bits or however many you are
trying
to generate. In the second round X0 is
replaced with X1 (the output
of round one), and so
on.
Each different
possible number represents one of
the possible combinations you can
draw from a 52-
card deck. You don’t know what’s coming up. You
can’t predict what’s coming up. The good news is,
you don’t
need to predict what’s coming up. You
only need to know what all
the things that can
come up are, and that they each have an equal
chance of occurrence. This is as fair and as random as things get.
In all regulated areas, the gaming control board
uses advanced
analysis programs to test the output
of industry RNG’s. I only
wish life was this fair
and unbiased. Believe it or not!
[Footnotes]
Not
a word for word quote, but summarized from
Burrill Gail, (1990)
Statistics and probability.
Mathematics Teacher: 83, 113-118.
Chaitin, Gregory J. 1966. In the
Journal of Association for Computing Machinery 13: 547-569.
Ian
Hacking, Logic of Scientific Inference (p. 131), and
G. Spencer
Brown, Randomness I (p. 149).
A
reference to particle emissions from radioactive
materials not the
concept of universal chaos and decay.
-
- Video Poker Master
- Posts: 1839
- Joined: Mon Sep 11, 2006 4:02 am
Yet anyone that knows pi could easily
tell you in
advance what the 81st digit will be and when to
take it
out of the oven.
Another example would be:
X0 = seed value (e.g., the time
expressed to 10
digits), Xn+1 = (3141592653Xn + 2718281829)
mod
2^35.Some get confused by the difference between "pi" and "pie," which you take advantage in the blue quote. Obviously, this is tongue-firmly-in-cheek.But I find it interesting that you ALSO added an e to the pi in the 2nd, more mathematical quote above to again make "pi+e," albeit with the decimal points excluded. But I wonder why both numbers are rounded incorrectly AND in opposite directions. Is this (A) random, (B) pseudo-random, (C) the even lesser-understood quasi-random, (D) purposeful, or (E) just an error?The Microsoft Accessory Calculator approximates as follows:pi = 3.1415926535897932384626433832795, which rounds to 3.141592654, and e = 2.7182818284590452353602874713527, which rounds to 2.718281828, both different than what you used in the article, plus pi is rounded down when it should be rounded up and e is rounded up when it should be rounded down.I think the answer to my question above is D. Those that program RNGs by the linear congruent method favor odd numbers over even ones. Even numbers in the formula would produce only even random numbers, so there could be no production of odd random numbers.Yes, I freely admit that this is not of interest to most and most would not be handicapped even by noticing this. But this type of knowledge does help in not being trapped into believing the types of myths that people often substitute for knowledge, no matter how vociferously.
-
- VP Veteran
- Posts: 762
- Joined: Wed Feb 02, 2011 6:59 pm
[QUOTE=Frank Kneeland]Yet anyone that knows pi could easily
tell you in
advance what the 81st digit will be and when to
take it
out of the oven.
Another example would be:
X0 = seed value (e.g., the time
expressed to 10
digits), Xn+1 = (3141592653Xn + 2718281829)
mod
2^35.Some get confused by the difference between "pi" and "pie," which you take advantage in the blue quote. Obviously, this is tongue-firmly-in-cheek.But I find it interesting that you ALSO added an e to the pi in the 2nd, more mathematical quote above to again make "pi+e," albeit with the decimal points excluded. But I wonder why both numbers are rounded incorrectly AND in opposite directions. Is this (A) random, (B) pseudo-random, (C) the even lesser-understood quasi-random, (D) purposeful, or (E) just an error?The Microsoft Accessory Calculator approximates as follows:pi = 3.1415926535897932384626433832795, which rounds to 3.141592654, and e = 2.7182818284590452353602874713527, which rounds to 2.718281828, both different than what you used in the article, plus pi is rounded down when it should be rounded up and e is rounded up when it should be rounded down.I think the answer to my question above is D. Those that program RNGs by the linear congruent method favor odd numbers over even ones. Even numbers in the formula would produce only even random numbers, so there could be no production of odd random numbers.Yes, I freely admit that this is not of interest to most and most would not be handicapped even by noticing this. But this type of knowledge does help in not being trapped into believing the types of myths that people often substitute for knowledge, no matter how vociferously.[/QUOTE]I see the source of your confusion. I copied it out of a book on programming. It was about ten years ago that I wrote this. I seem to remember something in the book that answers your question, but I can neither remember what it was nor the books name at this point.Actually they weren't supposed to be anything other than random numbers, their similarity to pi may be coincidental.Believe it or not.
-
- Video Poker Master
- Posts: 3587
- Joined: Mon Oct 23, 2006 5:42 pm
I think I saw a proof somewhere that only an alien intelligence could type either pi or e randomly to 10 digits. Could also explain some of your problems with Earth women.
-
- Video Poker Master
- Posts: 1839
- Joined: Mon Sep 11, 2006 4:02 am
I see the source of your confusion. The number I listed was not pi (or pi+e) it was a mere coincidence that it matched a few of the first digits of pi, I typed it randomly.Believe it or not.When you have made 10^18 (or so, give or take a few million) posts that do not have this pattern, I will tend more towards believing that in this case the numbers occurred by chance, which means I may be just as likely to infer that you are not human, since humans have such difficulty in directly generating random numbers aided only by their mind with no formula to guide them.But, since your thoughts are pure, that will not detract me from believing you in other matters.Edit: I didn't see s-man's post before I posted mine. Is it random that we both sensed the same possibility of non-human generation?
-
- Video Poker Master
- Posts: 2925
- Joined: Tue Jan 09, 2007 6:55 am
Noooooooo, Frank can't be an alien. Wait, he does live kinda close to area 51
-
- Senior Member
- Posts: 295
- Joined: Wed Dec 30, 2009 7:19 pm
No offense meant. Some of this info can be interesting. Alot of it is just so boring to the the average player. I feel like Im back in a nasty class room, being forced to listen, reading some of these posts. Most times, I cant even read it, too much unimportant data that is mostly relative anyhow. I lose track like a derailed train.
-
- Video Poker Master
- Posts: 1839
- Joined: Mon Sep 11, 2006 4:02 am
Point well taken. Good news is that there will not be a quiz later and you can choose to stop whenever you want.However, different strokes for different folks. I am generally bored by posts in which I do not learn anything new. But I mostly just skip and skim quickly, then move on in hopes that I can find one that holds my interest for a second or two. And I realize that others have different goals.
-
- Senior Member
- Posts: 118
- Joined: Fri Mar 04, 2011 9:55 am
The last two postings seem to be in contradiction to each other, yet I like both of them.Many postings seem like a waste of time to me. Some of the postings are too detailed or hard to follow, based on my goals.I have no objection to people posting these complex messages. Some will learn from it, while others - most others will pass it by.One of my techniques is to look at the ratio of postings to views for a topic. If 10 % of the viewers stop and make a posting, then I think this is an above average topic of interest.
-
- Senior Member
- Posts: 295
- Joined: Wed Dec 30, 2009 7:19 pm
Point well taken. Good news is that there will not be a quiz later and you can choose to stop whenever you want.
However, different strokes for different folks. I am generally bored by posts in which I do not learn anything new. But I mostly just skip and skim quickly, then move on in hopes that I can find one that holds my interest for a second or two. And I realize that others have different goals.
Your probably right, I just had a system overload . Inadvertently ofcourse
However, different strokes for different folks. I am generally bored by posts in which I do not learn anything new. But I mostly just skip and skim quickly, then move on in hopes that I can find one that holds my interest for a second or two. And I realize that others have different goals.
Your probably right, I just had a system overload . Inadvertently ofcourse