Take the 2-minute tour ×
Role-playing Games Stack Exchange is a question and answer site for gamemasters and players of tabletop, paper-and-pencil role-playing games. It's 100% free, no registration required.

Dice programs and their use around the table are on the rise:

  • Are there any characteristics, qualities, or quirks of results obtained by using dice programs which might detract from play? Improve it?
  • Are there dice programs which are below standard in their generation of reliable results? If so, can such results be recognized and assessed easily?

    I am asking this question about the results obtained by using dice rolling programs, not the experience or tradition of using actual dice. Personally, I prefer using dice, but am often required these days to resort to programs. Some of these programs produce what I consider to be suspicious results in much the same way those soft blue dice used to from a certain boxed game in the '80s. However, being aware of my own diceward bias, but lacking the tools to determine the veracity of my suspicions about some programs for certain, I thought this might be the place to ask~

share|improve this question
    
It depends on which algo they use. For example, iplay4e uses the Mersenne Twister which produces cryptographic-grade randomness. I'd trust the dice rolls from their RNGs quite highly. Do you have specific programs you're wondering about? –  Brian Ballsun-Stanton Apr 12 '11 at 7:02
    
I didn't want to praise or damn any particular one, and half expect each person I game with (depending on device) to be using a different one. Two different D6 rollers came pre-installed on my phone and neither produces what I consider to be realistic results, which likely planted this seed in my brain and encouraged it to fester into a doubt tree. I do notice that a lot of iPad/iPhone users tend to use the same program, however. –  Runeslinger Apr 12 '11 at 10:16
5  
@Brian: Mersenne Twister is not suitable for cryptography. It is, however, a decent generator for situations in which security is not an issue. –  Steve S Apr 12 '11 at 15:32
    
@Steve Thanks for that. I need to update my crypto knowledge considerably :) –  Brian Ballsun-Stanton Apr 12 '11 at 23:51
1  
It just occured to me as I was reading all the answers that take care to explain that computer generated "random" numbers aren't really random...that dice rolling isn't random either. The physical shape of the die, combine with the surface it's rolled on and the way it is tossed will produce very predictable results, given enough information. Of course, like computers, we pretend it's random, and it might as well be, because we don't have trivial access to that precise information and model that would allow the prediction. Egad...I can't believe I typed this. –  Beska Apr 30 '13 at 12:38
add comment

7 Answers

up vote 23 down vote accepted

Any well written dice roller will give you perfect random rolls (well pseudo-random - the difference doesn't matter for gaming).

Some dice rollers are not well written, or depend on the underlying OS/language's source of random numbers, which itself can be well written or not.

The vast majority of the time you will find dice rollers more random then actual dice, which, being physical objects, will be flawed.

I know of one product that had to change the library it used to generate rolls because the OS implementation was poor, but that is a rare case.

share|improve this answer
    
Thanks for the concise answer~ –  Runeslinger Apr 12 '11 at 10:19
add comment

Computers and their kin are deterministic machines. They have no way for generating a pure aleatory variable.

However, there are a lot of very good pseudo-random number generation algorithms that generates a sequence of numbers where the correlation between a number and the next is so weird that a human being is unable to discern a pattern.
These algorithms usually start from a seed number. Being deterministic, the same seed produces always the same sequence of numbers. To circumvent this problem, the seed is usually made time-dependent, so that a user could introduce a true aleatory component (the moment at which he invokes the die rolling).

Basically, there could be differences among dice-rolling tools according to the algorithm they implement. However, these differences are not noticeable by a human observer nor relevant on the small number of rolls and the narrow space of possible results that are usually involved in a role-playing session (they may start to be relevant on large scale statistical analysis or simulations).

I think that some dice could be less reliable than most pseudo-random generators because of physical production defects in their weighting.

share|improve this answer
5  
Not quite. There are pure-random input sources possible, but they're generally not necessary for the level of RNGs needed in dice-rolling apps. –  Brian Ballsun-Stanton Apr 12 '11 at 7:12
3  
True, but they have dedicated hardware that monitors a physical random event. A computational machine has no way for generating pure randomness. –  Erik Burigo Apr 12 '11 at 7:27
1  
I'll grant you that. :) –  Brian Ballsun-Stanton Apr 12 '11 at 7:32
1  
In most cases, then - barring implementation flaws, a human observer would not notice a difference in the results obtained by opting to use a program over actual dice? –  Runeslinger Apr 12 '11 at 10:18
1  
Exactly. Furthermore, on the small amount of numbers usually involved in the role-playing activity, even a computed analysis could be unable to tell the difference. –  Erik Burigo Apr 12 '11 at 10:26
show 1 more comment

A dice rolling program is only as good as the worst of:

  1. the random number return to die-sides algorithm
  2. the pseudo-random seed generator

Most are close enough to be better than dice.

Since computers can not generate truly random numbers, no die roller is truly random. The pseudorandom numbers, however can be sufficiently random enough to be more random than real dice.

A recent study found that most commercial d6 are biased significantly. The study had some flaws, but generally showed a bias for low numbers on most commercially produced d6's. (In one company's run, almost to the point of 1's being 2/7 of 1d6 rolls!) No individual batch tested showed a truly even distribution.

Some technical details...

There are two methods of random number return used in programming:

  1. A fractional return on a float or double-float (double). EG: 0.348826495
  2. A whole number return on an int or double-int (long). eg: 25565

given a fractional, the norm is to multiply the sides by the returned fraction, giving a fractional number between 0 and sides; round that down, getting an integer from 0 to sides-1, inclusive; then add 1, to get an integer from 1 to sides, inclusive. Due to both the nature of the fractions, has a slight bias, but it's effectively below resolution, on 16 bit machines. On some 8 bit machines using single precision, it has a notable bias on larger die types.

Given an integer return, the normal mode is to perform a modulus operation (in American: find the remainder). Then add 1. 1+ ( Return modulus sides ). This introduces a very slight bias except for d4, d8, and d16. That bias is for LOW numbers, and is (maximum_return mod sides) / maximum_return. On 8 bit machines, with single precision integer returns, that's (256 mod sides)/256, for 0 for d4, d8, and d16, 1/64 for d6 and d10, 3/128 for d10, and 1/16 on d20. It's 7/32 for d100... on a 16 bit machine, with a long return (32bit integer), it's negligible for all dice below 10000 sides...

But, without looking at sources, the methods and return values can't be fairly evaluated.

The random number generation, however, varies WIDELY by OS, random number generation algorithm used, the random number seeding method, and even programming language used.

Bottom Line...

On newer machines with 16bit architectures, the skew is usually low, and slight. On 32bit machines, the skew is usually low, and miniscule. As long as you're using one for a 16 bit or newer machine, you should be as random as dice, if not more random.

share|improve this answer
    
Some programs seem to repeat the last number rolled when you return to them from another application. This makes me wonder what other quirks I might not be noticing... –  Runeslinger Apr 13 '11 at 5:43
    
Without examining the sources, you can't be certain. But in general, a die-roller is more fair than real dice. Tho' I noticed some serious fails in the Palm OS 3 system random. –  aramis Apr 13 '11 at 15:55
add comment

One observation that I have had with dice rolling programs on the iPad/iPhone is that there seem to be "cheat" settings allowing the user to bias rolls to be higher (or lower) than expected.

If you are doing online gaming and the players and the GM are all using a die rolled in a virtual game table or the like, then you probably don't need to worry about this, but if you are thinking of players using die rollers on their phones while playing face to face, this could become an issue.

share|improve this answer
    
Thanks for the tip! –  Runeslinger Apr 13 '11 at 5:43
2  
On the other hand, if you can't trust your gaming group, you shouldn't be playing with them. –  Brian Ballsun-Stanton Apr 18 '11 at 6:07
    
@brian, true, but sometimes it's nicer to not have to, or players could be fiddling with the rollers and honestly forget. It's a consideration, and nothing more. –  Simon Withers Apr 20 '11 at 1:34
add comment

random.org produces random results by reading atmospheric changes, so that's about as truly random as you'd get. Doing tests on Random's Xd6 roller I haven't seen anything suggesting a bias - you can occasionally get some absurd results like with dice, but rolling habits don't come in. I know the biggest thing with rolling real dice for me is sometimes based on how I pick them up, and what height I roll them from, they keep repeating the same results, so I can get a good or bad streak going. This doesn't happen with random.org.

share|improve this answer
add comment

I tend to write a simple dice roller as the first program I create when I'm working with a new programming language.

I create it so that you can roll xDy, and I also always put in a method that will roll 1D100 10,000 times (it's really not that slow on modern machines) and do some simple stats on the outcome.

In general, I've found that MOST languages (on Windows OS) tend to generate a fairly consistent spread over the 100 numbers across 10,000 rolls. It IS, however, possible for any pseudo-random number generator to fall into a predictable pattern, if poorly implemented. My methodology doesn't check for that.

share|improve this answer
add comment

I also have tried to program several dice rollers in different languages, and usually the results seem to be random enough.

Other point is that by definition true randomness it's not really something you can verify but I agree that in general, most dice rolling programs can be as random or more than real dice.

share|improve this answer
1  
To be fair, you can verify it using normal statistical analysis, especially if you can code for bulk output of data. –  Brian Ballsun-Stanton Apr 18 '11 at 6:05
    
@BrianBallsun-Stanton actually, all that the stat analysis can prove is that it's not strongly biased - not that it's truly random. –  aramis Jun 14 '12 at 20:34
    
Granted. We can't "validate" within our normal space-time. Pragmatically, we can get good-enough results :) –  Brian Ballsun-Stanton Jun 14 '12 at 21:27
    
That's what I meant, you can't validate real randomness, but most of the dice rolling programs give good-enoguth results. –  pconcepcion Jun 15 '12 at 8:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.