random() may yield different pseudo-random number sequences for the
same seed on another system. For instance, at least some versions of
MinGW provide a random() in -liberty that differs from traditional BSD
(see commit c8231b12
). Rather inconvenient for regression testing.
MT19937 Mersenne Twister is a proven, high-quality PRNG. Actual code
is reference code provided by the inventors[*]. Quick tests show
performance comparable to random().
Like random(), MT is not cryptographically secure: observing enough of
its output permits guessing its state, and thus its future output. I
don't think players can do that.
Drop the copy of BSD random() we added for Windows.
Like the previous commit, this changes the server's die rolls, and
makes fairland create a different random map for the same seed. Update
expected smoke test results accordingly.
[*] mt19937ar.sep.tgz downloaded from
http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/MT2002/emt19937ar.html
21 lines
293 B
Text
21 lines
293 B
Text
add 1 1 1 p
|
|
newcap 1 14,8
|
|
add 2 2 2 p
|
|
newcap 2 58,8
|
|
add 3 3 3 p
|
|
newcap 3 39,25
|
|
add 4 4 4 p
|
|
newcap 4 46,16
|
|
add 5 5 5 p
|
|
newcap 5 7,29
|
|
add 6 6 6 p
|
|
newcap 6 23,23
|
|
add 7 7 7 p
|
|
newcap 7 39,5
|
|
add 8 8 8 p
|
|
newcap 8 57,23
|
|
add 9 9 9 p
|
|
newcap 9 26,0
|
|
add 10 10 10 p
|
|
newcap 10 6,18
|
|
add 11 visitor visitor v
|