RNG

I stumbled across this topic on BGG where several Vassal users complain (whine) about the RNG: boardgamegeek.com/thread/246146 … ining-post

I am aware of the inherent problems with RNGs, with evaluation of them by human brains, with the math behind it, with the fact that even the small sample size they show is still well within the standard deviation, with the fact that our human brains always try to see patterns even where there are none. Some of them even say they have “decades of experience” with Vassal’s RNG and the experience was bad (even though I see in the commit history that the RNG was changed to SecureRandom 9 years ago) :smiley:

Some also speak well of how VASL solved this by getting random numbers from random.org.

Is there anything that needs to be done in this area? We could use this random.org or probably some other web service, we could add more RNGs like the Mersenne Twister and let the user decide which they want to use.

Or is this going to end in the exact same whining about perceived patterns when they still keep getting bad rolls?

Thus spake Flint1b:

I stumbled across this topic on BGG where several Vassal users complain
(whine) about the RNG: boardgamegeek.com/thread/246146
ining-post[1]

I am aware of the inherent problems with RNGs, with evaluation of them
by human brains, with the math behind it, with the fact that even the
small sample size they show is still well within the standard deviation,
with the fact that our human brains always try to see patterns even
where there are none. Some of them even say they have “decades of
experience” with Vassal’s RNG and the experience was bad (even though I
see in the commit history that the RNG was changed to SecureRandom 9
years ago) :smiley:

Some also speak well of how VASL solved this by getting random numbers
from random.org.

“solved”

You can’t solve a problem that doesn’t exist. See below.

Is there anything that needs to be done in this area? We could use this
random.org or probably some other web service, we could add more RNGs
like the Mersenne Twister and let the user decide which they want to
use.

Or is this going to end in the exact same whining about perceived
patterns when they still keep getting bad rolls?

We had a Mersenne twister which we removed some years ago in favor of
Java’s own SecureRandom, which is even better, in that it’s a
cryptographically secure PRNG which complies with FIPS 140-2 and RFC 1750.
There was an issue I fixed in our ussage of in 3.2.14 and 3.2.17 regarding
modulo bias, but it’s the sort of issue that would give you an extra 1 on
a d6 maybe once in four billion rolls.

People have been complaining about our die rolling since before I joined
the project, and I have yet to be presented with a shred of evidence that
there’s a problem. I have given people’s compaints about this a fair
hearing. If there’s a real problem, I want to fix it—but I’ve run
statistical analyses on logs users have given me, and on output I’ve
gathered myself… and it all comes out entirely as you’d expect from a
good PRNG.

Unless someone can show actual evidence of a problem, there’s nothing to
see here.


J.

I can tell you for sure that they will still whine. I remember Sid Meier gave the better part of a conference talk about random numbers in Civ, and that no matter “how random” you make them people think the game is broken/bugged/unfair as soon as you get a “streak”. So I think some of the later Civ games actually cheat “for” the player, intentionally breaking up “bad streaks” while doing nothing about good ones. And by the way that’s STILL not 100% proof against whining. Whiners gotta whine.

That doesn’t mean it’s bad to try to improve our random number situation if we have an actual problem (do we have an actual problem?). It just means there will still be whining and “decades of experience with Vassal”.

Thus spake Cattlesquat:

I can tell you for sure that they will still whine. I remember Sid Meier
gave the better part of a conference talk about random numbers in Civ,
and that no matter “how random” you make them people think the game is
broken/bugged/unfair as soon as you get a “streak”. So I think some of
the later Civ games actually cheat “for” the player, intentionally
breaking up “bad streaks” while doing nothing about good ones. And by
the way that’s STILL not 100% proof against whining. Whiners gotta
whine.

That doesn’t mean it’s bad to try to improve our random number situation
if we have an actual problem (do we have an actual problem?). It just
means there will still be whining and “decades of experience with
Vassal”.

Some years ago, an engineering prof had some students build a contraption
for rolling hundreds of dice in one shot to collect data about the
fairness of commercial non-casino plastic dice. It was a neat page,
detailing the construction of the device and the statistical results. I’m
not sure what happened to it. Maybe one could turn it up in archive.org?

The upshot was that game dice are terrible—like, so bad that you should
throw them all away if you care about getting fair results. Even crappy
PRNGs are better than the plastic dice that come with games… yet people
still use those.

Anyhow… I’m always willing to consider evidence, but no, we don’t have a
problem.


J.

I already suspected that much.

Best comment in that thread was from a “specialist” who claimed Vassal’s RNG is bad since it uses pre-seeded random numbers instead of random noise :smiley: For that comment alone I think that guy earned a special personal Vassal build that uses his mothers name as the seed for SecureRandom.

Terrible gaming dice, yes, I still have my “lucky” d20 that used to roll mostly 19s and 20s in my old pen&paper days. Problem was that I was the DM playing D&D and I had to skew the results a LOT else I would have wiped the whole party twice per session.

Thus spake Flint1b:

I already suspected that much.

Best comment in that thread was from a “specialist” who claimed Vassal’s
RNG is bad since it uses pre-seeded random numbers instead of random
noise :smiley:

Ha, yes. Also that’s wrong, as I think SecureRandom is seeded from
/dev/random on Linux and whatever the equivalents are on Macs and Windows,
which are true random sources.

Terrible gaming dice, yes, I still have my “lucky” d20 that used to roll
mostly 19s and 20s in my old pen&paper days. Problem was that I was the
DM playing D&D and I had to skew the results a LOT else I would have
wiped the whole party twice per session.

I’ll bet the ones with higher numbers of sides are even worse than the
d6’s are for fairness…

Conversely, casino dice are REALLY good. Of course, it’s worth it to
the casinos to use dice with reliable distributions…


J.

Thus spake Flint1b:

For that comment alone I think that guy earned a special
personal Vassal build that uses his mothers name as the seed for
SecureRandom.

There’s a great Dilbert from years and years ago where there’s a random
number generator where every number it returns is 9.


J.