I've finished my program that checks for runs in the dice.
I've made it use the MersenneTwister and the standard java random
generator.
Ran it 5,000 then 100,000 then 1,000,000 times.
Saved the results to a file.
Attached to this email as results.rar
they are in UNIX formated text files. So if you use windows you need to
open them up in Word pad or MSWord, cos notepad will not display it
properly.
Each generator was seeded only once. I made both generators use the same
seed.
I'll also post make a post on the forum.
On Sat, 20041030 at 13:22, NeKromancer  George wrote:
> Got an email from sgb concerning multiplayer changes for using the
> MersenneTwister.
>
> /src/games/strategy/util/RandomGen.java got changed.
>
> All references to Random were changed to MersenneTwister.
>
> Thats basically it for anyone how also wants to use the number
> generator.
>
> On Sat, 20041030 at 02:55, NeKromancer  George wrote:
> > Here are some results from SGB's integer map tests from his
> > PlainRandomSource.java file to test for distribution. This is using the
> > MT199937 algorithm and I run it 1,000,000 times.
> >
> > Generating 1,000,000 Numbers
> > IntegerMap:
> > 2 > 166888
> > 4 > 166467
> > 6 > 166593
> > 1 > 166624
> > 3 > 166747
> > 5 > 166681
> >
> > Generating 1,000,000 Numbers
> > IntegerMap:
> > 2 > 166259
> > 4 > 166581
> > 6 > 166748
> > 1 > 167259
> > 3 > 166729
> > 5 > 166424
> >
> >
> > Generating 1,000,000 Numbers
> > IntegerMap:
> > 2 > 166887
> > 4 > 167082
> > 6 > 166368
> > 1 > 166902
> > 3 > 166431
> > 5 > 166330
> >
> >
> > Does everyone feel ok with this? I will do a runs test later on.
> > if Iron_cross wants me to generate a file with random numbers for him
> > using mt199937 so he can do his string matching test and compare it to
> > the java random nums... then please contact me.
> >
> > On Sat, 20041030 at 02:35, NeKromancer  George wrote:
> > > I just checked in the MersenneTwister (MT199937) java file in
> > > /src/games/strategy/engine/random/MersenneTwister.java
> > >
> > > it is basically a dropin subclass substitute for java's Random. So it
> > > has all the same methods and everything. I modified PlainRandomSource to
> > > use it and I compiled/ran triplea and did a few battles and the dice
> > > rolled without problems.
> > >
> > > I looked into CryptoRandomSource to see if it needed any code changes..
> > > I couldn't find any, and did not test this multiplayer.
> > >
> > > The java port of the MT19937 was used with permission from Sean Luke of
> > > George Mason University. And the thing is under BSD license and for free
> > > use and distribution.

NeKromancer (also known as George)
nekromancer@...
"Everything is never what it seems"
"Followers believe, but leaders are the believed"
"People are willing to abandon you, learning disabilities won't"
