5 ms·
I run an online dice roller for pen&paper roleplaying gamers, it does use mt_rand() and the results are from what I can tell random enough (no discernable perio
by Udo 13y ago
I run an online dice roller for pen&paper roleplaying gamers, it does use mt_rand() and the results are from what I can tell random enough (no discernable periodicities, no preferred numbers, averages and median are where you expect them, and so on).
However, every so often I get a bug report professing some bias of the RNG. Turns out, people want the numbers to be not random but uniformly distributed even over small sample sizes of about 10 to 20 dice rolls. If the same number comes up three times in ten D20 rolls, they assume it must be a bug. The same happens with physical dice, by the way, I've seen players discard "unlucky" dice like that.
- jiggy2011 13y agoDidn't Apple have a similar problem with the ipod? People complained that it was not random because it would sometimes pick the same track twice or would pick tracks from the same artist more often than people expected. I believe they fixed it by changing the odds every time a track was played so it would seem to be making a more random selection, although technically it is now less random.
- deleted 13y ago[deleted]
- e12e 13y agoOf course, people might not actually expect random playback when they hit shuffle. Changing odds sounds like a good approach. edit: similar to how some players generate a random playlist (every track on listed once, random order). Then on loop, either create an entirely new list, or simply loop.
- baby 13y agoYes! IMO they should keep track of songs played in the shuffle mode over the sessions and try to uniform it instead of providing randomness.
- elithrar 13y ago> Didn't Apple have a similar problem with the ipod? People complained that it was not random because it would sometimes pick the same track twice or would pick tracks from the same artist more often than people expected. I always thought this was by design: the "shuffle" algorithm wasn't designed to be random, but would instead occasionally group songs from the same artist or genre together (and/or favor songs w/ higher play counts_ - i.e. maintain a "theme" for a couple of songs before changing to something different) I can't find any supporting evidence for this, however, and a lot of the discussions around their algorithm are hearsay.
- deleted 13y ago[deleted]
- hartror 13y agoThese randomness discussions always remind me of Games by Email's mass dice roller Dice-o-matic: http://gamesbyemail.com/News/DiceOMatic http://gamesbyemail.com/News/DiceOMatic
- danielbarla 13y agoMy guess would be that typical pen&paper dice would have biases in excess of typical software PRNG implementations (although I haven't exactly researched this topic). You're unlikely to detect any biases with a sample size of a few hundred throws.