Computer Dice rollers

TheLe said:
How about I put my time where my mouth is?

Here you go:

http://www.TheLe.com/temp/RandomNumberGenerator.asp

Something weird happened when I told it to roll a d20 10 times...the "number of times it occurred" number appears to "start" with the result on the die when that result comes up once, then notch up by +1 for each additional time that result comes up. In other words, it reports that "9" came up 9 times, 10 came up 11 times, etc. Might want to check your programming.
 

log in or register to remove this ad

kenobi65 said:
Something weird happened when I told it to roll a d20 10 times...the "number of times it occurred" number appears to "start" with the result on the die when that result comes up once, then notch up by +1 for each additional time that result comes up. In other words, it reports that "9" came up 9 times, 10 came up 11 times, etc. Might want to check your programming.

My bad. I fixed it. The first time I populate the array, I populated it with the "die result" rather than 1. fixed now.


`Le
 

I had some time to kill, so I thought I would join in the fun. I rolled a single d10 50 times, and this was my result.

8, 5, 7, 4, 6, 1, 0, 7, 9, 0,
8, 8, 0, 6, 2, 3, 4, 0, 9, 6,
5, 7, 8, 4, 9, 2, 7, 7, 3, 3,
2, 8, 4, 1, 2, 4, 7, 2, 1, 5,
8, 0, 6, 7, 9, 0, 8, 7, 5, 2

My average roll was like 7.18, which seems high, but on only 50 rolls, I don't think it's a complete assessment of the die.
 

This is my next 50, using the same d10 die.

0, 3, 7, 4, 8, 0, 7, 5, 1, 5,
0, 9, 5, 1, 5, 2, 5, 6, 0, 8,
8, 5, 1, 7, 7, 2, 9, 3, 7. 8,
3, 1, 6, 3, 4, 3, 4, 2, 9, 2,
9, 3, 2, 0, 2, 1, 2, 5, 1, 7

This set averaged 5.14.
 

Group 3, a players dream! It averaged 8.8!

3, 1, 7, 3, 4, 6, 1, 0, 5, 8,
3, 8, 3, 5, 4, 7, 8, 0, 9, 9,
4, 1, 8, 8, 7, 8, 1, 7, 3, 9,
9, 4, 8, 1, 3, 6, 9, 2, 1, 4,
8, 4, 5, 7, 3, 2, 6, 2, 7, 8
 

My group 4, weighing in at a 6.84 average.

8, 0, 3, 9, 3, 9, 8, 6, 2, 5,
7, 0, 4, 1, 1, 8, 2, 0, 5, 5,
4, 9, 2, 0, 6, 4, 9, 2, 6, 8,
5, 5, 1, 2, 1, 9, 0, 9, 3, 6,
5, 9, 0, 9, 0, 1, 6, 5, 2, 4
 

http://www.TheLe.com/temp/RandomNumberGenerator.asp


The computerized Random Number Generator seems to produce good randomness over time.

Using the program, I attempted to roll 1d10, one thousand times. Each value tends to show up about 100 times each, as would be expected. The numbers are also close when rolling 1d10 ten-thousand times.

My conclusion: if the computer number generator is coded correctly, it will indeed create good random numbers.

`Le
 

TheLe said:
http://www.TheLe.com/temp/RandomNumberGenerator.asp


The computerized Random Number Generator seems to produce good randomness over time.

Using the program, I attempted to roll 1d10, one thousand times. Each value tends to show up about 100 times each, as would be expected. The numbers are also close when rolling 1d10 ten-thousand times.

My conclusion: if the computer number generator is coded correctly, it will indeed create good random numbers.

`Le

You're right, The Le. A well-coded computer generator will, given a large enough sample generate good statistical data over those large numbers. You'll pretty much get the distribution that you're expecting.

However, most computer generators are not very good when it comes down to the fine statistics, in other words, the odds of getting certain sequences of numbers. If you calculated the odds of say rolling 10, 10, 10 (0.001 %), then you'll find that the odds of the computer generator getting that are probably much higher than the statistical value. That's I believe, where computer generators don't get it right.

Pinotage
 

Pinotage said:
You're right, The Le. A well-coded computer generator will, given a large enough sample generate good statistical data over those large numbers. You'll pretty much get the distribution that you're expecting.

However, most computer generators are not very good when it comes down to the fine statistics, in other words, the odds of getting certain sequences of numbers. If you calculated the odds of say rolling 10, 10, 10 (0.001 %), then you'll find that the odds of the computer generator getting that are probably much higher than the statistical value. That's I believe, where computer generators don't get it right.

Pinotage

My friend tells me that it is due to Probability and Statistics.

Lets say you roll 1d10 once. What are the odds that a "7" will appear? The answer is 1/10, or 10%.

However, if you keep rolling that die over and over, the odds of a "7" appearing grows with each die roll. (it's a very small percentage increase, but its there).

I have no idea how to code for that.

~Le
 

However, if you keep rolling that die over and over, the odds of a "7" appearing grows with each die roll.

Umm... why?

This statistical issue aside, I can't say I agree with using a computer for your rolls. But I wonder, do people use computers to do all the math that comes after the rolls? As in, type in your dice roll, type in the monster's roll and get the damage inflicted?
 

Remove ads

Top