bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] I still have a small problem with the dice generator.


From: Øystein Johansen
Subject: Re: [Bug-gnubg] I still have a small problem with the dice generator.
Date: Mon, 03 May 2004 23:22:17 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Øystein Johansen wrote:
| in genrand_int32() in mt19937ar.c line 123:
|
| ~    if (*mti == N+1)   /* if init_genrand() has not been called, */
| ~        init_genrand(5489UL,mt); /* a default initial seed is used */
|
| The above condition comes TRUE, and the dice seed is set to 5489.
| This makes every first game of a match/session exactly the same. Starts
| with 51, 66, 61, 62 ....
|
| The strange thing is that the condition becomes TRUE, because
| init_genrand() is called earlier in the in the code (even several times).
|
| Can someone explain? Can someone with the right knowledge fix?

Looks like Jørn can!

Silly of me not notising that the calls didn't use the right arguments,
and why didn't the compiler warn?

Thanks Jørn, it works now!

- -Øystein
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAlrgJ6kDTFPhwyqYRArLlAJ9iqopsjkuo5koP9W3IHTa16nijEwCfXond
HqdsvsT6NAv/mzuPaSYs2s0=
=SdsW
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]