GazMarsh said:
For notes on the Java RNG have a look at:
http://java.sun.com/j2se/1.3/docs/api/java/util/Random.html
Also bear in mind that for some linear congruential generators, certain seeds can generate some really crappy sequences...
For more notes, check the source code. You'll discover that they're using the standard,
vanilla Lehmer LCG with the Lewis, Goodman and Miller constants. The LCG itself
dates back to 1948 (when Lehmer first described it), and this version of it was
suggested by Lewis, Goodman and Miller in 1969. It is, in fact, one of the most
well-explored PRNGs in current use. The algorithm is sometimes referred to as
MINSTD, or the `minimum standard' for PRNGs.
It is the case that there are a number of known problems in the output of this PRNG.
These problems are of great concern if you are using it as a source of numbers (or bits)
for use in conjunction with cryptography. This is because your threat model includes
evildoers analysing the raw output of the PRNG (or being able to recover it from
observation), and use information gained from analysing portions of the PRNG
output to predict future output bits/numbers, to recover seed values, and so on.
None of this has any immediate bearing on the suitability of the LCG in question for
the task at hand...namely simulating die rolls in a game between honest players. In
other words, the problems that have been described in the java Random class
are not sufficient to describe the problems people are attributing to it.
If you are miffed because you rolled three 12s in a row or your opponent got four 2s
in a row, this just plain cannot be described in terms of the (very, very well explored)
behaviour of the LCG. Further, if strings of 12s or 2s happened a disproportionate
number of times, then this is something that would show up extremely clearly in
the sorts of testing that I've done on the dicebot (and have referenced earlier in
this thread). No such occurances appear.
If you really think that the dicebot is biased in such a way that it is just -obvious- to
you that it's broken---which seems to be a popular belief---then there must be SOME
way of testing for it, right? Well...I'd love to hear about it. Gimme a reproducable
test that demonstrates this unfairness. I mean, if it's so obvious that you can pick up
on it without even trying, then it must be easy to demonstrate the problem, right?
Or is this an obvious yet untestable hypothesis? If it is, then we need to move this
discussion into a thread about magic. If your computer is haunted by evil
spirits, I can't help ya.