Computer Dice rollers

Tal Rasha said:
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?

If you're all together at the table, it probably doesn't make sense to, no. (Though, I have one player in one of my groups who has *everything* in Excel, and he's created his own Excel character sheets, with built-in "die-rollers" that add all the bonuses in for hm.)

But, if you're playing online (either in a chat room, or via PBM/PBP), having a computer roller beats having to trust the other person's self-reported dice rolls. "Really, it *did* roll a 20 again!"
 

log in or register to remove this ad

Gundark said:
You're an idiot.



Hey you said to.

;)


Damn, walked right into that one :p



Well, one problem I have with recording and comparing, is that any good program should even them out. But the real question I had is wether or not the computer is likely to give you a series of the same number, as sometimes happens with the die, or wether it would give a more statistically probable answer by giving the same amount of the number, but spaced out between different rolls, making the two look like this:

Real: 1 3 4 4 4 5 2 6 3

Computer: 1 4 2 5 4 3 6 4 3

Showing that the computer would have seperated the consecutive 4's becuase it is more probable, and matches better with statistics.
 
Last edited:

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

Umm... why?

It's a bit technical. Consider this: On an individual 1d10 roll, the chances of you getting a "7" is just 1-in-10, or 10%.

However, if I let you roll one-thousands times, the odds of "7" appearing is far higher than 10%.

That is because with each successful roll, the probability changes. You are no longer considering "this one roll," you are considering all of them.

`Le
 

I hate probablility, maybe that's the stem of my misunderstanding. My math teacher and I used to get into "discussions" about it. I never did see her side of it.
 

palleomortis said:
I hate probablility, maybe that's the stem of my misunderstanding. My math teacher and I used to get into "discussions" about it. I never did see her side of it.

Well, don't think of it as "I roll 1d10 one hundred times", because in that case, each individual roll has a 1/10 chance of a "7" appearing.

Instead, think of it like this: "I give you one-hundred d10s, then roll them all at the same time".

The probability of a "7" appearing on any of those die is extremely high. I don't believe it is every 100%, but it is up there.

~Le
 

Obligatory whenever a discussion on random numbers takes place:

dilbert.gif


random_number.png

RFC 1149.5 specifies 4 as the standard IEEE-vetted random number.

It's impossible to generate truly random numbers with just a computer. Instead, computers generate pseudo-random numbers.

It is, however, possible to generate random numbers when you have a random seed... For example, there was some project a while back that used a webcam and a lava lamp to generate random numbers. The lava lamp provided the random seed. As another example, a program I use, called KeePass, generated random passwords by asking you to either bang on the keyboard a bit or move the mouse wildly. In these cases, the numbers truly are random.

Well, truly random, I guess, depends on your philosophy... Being a determinist, myself, I don't think anything is truly random in the grand scheme of things.

But I digress. Anyways, back on topic, the vast majority of random number generators out there use pseudo-random numbers. This is actually a fairly important field of research, because frankly computers as we know them are heavily, heavily reliant on pseudo-random numbers. Most databases use a technique called hashing to quickly store and retrieve information, and basically a hash function returns a pseudo-random number which is always the same for a given input, but even a slight variation changes the output value drastically. So basically, my point is that pseudo-random number generation is a very important topic, and there's a lot of really, really smart people who've put a lot of hard work into the field.

So, in conclusion, are computer-generated random numbers actually random? No. Are pseudo-random numbers close enough? More than likely. If you've got an important enough application where the difference between pseudo-random and actually-random numbers mattered, you probably wouldn't have had to ask this question in the first place.
 


palleomortis said:
Good answer, very explanitory and...good?

Yes, the random seed is critical. Typically a good program will use "current date/time" as the "random seed".

Since time is always ticking away, this is a pretty good way to ensure a random seed.

(example: it is October 4, 2007, 20:57 and 22 seconds. So, the seed would be something like 20071004205722. If someone hits the random number generator exactly 1 hour later, it would use a seed of 20071004215722.)

~Le
 

TheLe said:
Yes, the random seed is critical. Typically a good program will use "current date/time" as the "random seed".

Since time is always ticking away, this is a pretty good way to ensure a random seed.

(example: it is October 4, 2007, 20:57 and 22 seconds. So, the seed would be something like 20071004205722. If someone hits the random number generator exactly 1 hour later, it would use a seed of 20071004215722.)

~Le


You're making my head hurt buddy! :D
 

TheLe said:
Yes, the random seed is critical. Typically a good program will use "current date/time" as the "random seed".

Since time is always ticking away, this is a pretty good way to ensure a random seed.

(example: it is October 4, 2007, 20:57 and 22 seconds. So, the seed would be something like 20071004205722. If someone hits the random number generator exactly 1 hour later, it would use a seed of 20071004215722.)

~Le

And it is important for the programmer to know exactly how the random number generator works if you use date/time as a seed. A random number generator (RNG) will always generate the same sequence of random numbers from a given seed. If you initialze the RNG using the date time on every single roll and the particular system you are using is only precise to the second, if you generate more than one roll in the same second (easy to do on a computer) you will get the same roll. Most use an increment finer than seconds though, so it isn't as big of a concern.

One thing I've played with a little is building a 10x10 array, filling each slot with a random number, then when I need a random number I generate two random numbers between 1 and 10 and use that to determine which array slot to pull the number from, then I generate a new random number to put in that slot. But it is a lot of overhead for a minimal (if any) gain in randomness.
 

Remove ads

Top