Page 1 of 4

The Dice - Explained

PostPosted: Tue Feb 22, 2011 2:03 am
by bedub1
I just popped in here to General Discussion, which I never really visit, and was surprised at the number of dice threads. I've tried to explain this in the past, but nobody seemed to care. I'll try again.

The dice aren't truly random because they are chosen from a set without uniform distribution.

random.org wrote:When discussing single numbers, a random number is one that is drawn from a set of possible values, each of which is equally probable. In statistics, this is called a uniform distribution, because the distribution of probabilities for each number is uniform (i.e., the same) across the range of possible values. For example, a good (unloaded) die has the probability 1/6 of rolling a one, 1/6 of rolling a two and so on. Hence, the probability of each of the six numbers coming up is exactly the same, so we say any roll of our die has a uniform distribution.


The reason I know the numbers are chosen from a set without uniform distribution is because lack told us so.

lackattack wrote:This is how the intensity cubes now work:

* We have a series of 50,000 true random numbers from random.org
* Each time the game engine processes an assault or auto-assault, it select a random spot in the series to read from using a pseudo-random computer function
* Each time the game engine generates a random intensity cube, the next number is read in sequence from the series (e.g. in a 3v1 attack 4 numbers are read sequentially)
* The series of 50,000 true random numbers from random.org is replaced every hour


A die that is a "good" and "valid" and not "rigged" has the following distribution of numbers on it:

Image
The probability of rolling any one of those numbers is EXACTLY 1/6th.
If you use a random number generator to pick a number out of the above "set", each number has a 1/6th chance of being drawn.

I asked random.org for 10k random numbers between 1 and 6. It gave me the following set:
Image
If you use a pseudo random number generator to pick a single number from the above set of numbers (which is what cc does), the odds are NOT 1/6th that each number will be drawn, because the set does not have uniform distribution. During that 1 hour period, before the 50k file is replaced, the odds are higher that you will receive a 3, 4, or 5. Lower that you will receive a 1 or 2, and much lower for a 6.

The next hour, CC will get a new file, and the distribution of the numbers in that set will be different.

Each Hour the "Dice" will be "loaded" differently. Thus, any single number extracted out of it won't be properly random, because the distribution of the set isn't split evenly 1/6th, thus failing to fulfill random.org's definition of a random number, and common sense.

Re: The Dice - Explained

PostPosted: Tue Feb 22, 2011 4:21 am
by natty dread
Eh, that's flawed logic.

Re: The Dice - Explained

PostPosted: Tue Feb 22, 2011 5:41 am
by JelleR
natty_dread wrote:Eh, that's flawed logic.


+1

Re: The Dice - Explained

PostPosted: Tue Feb 22, 2011 6:03 am
by natty dread
See, we have a list of truly random numbers. The distribution of numbers in that list is... random.

So if we go ahead and pick the first 5 numbers from that list... they are random.

Now if we go and pick those 5 numbers from another spot on the list... again, they are random.

See? It's not so hard!

Re: The Dice - Explained

PostPosted: Tue Feb 22, 2011 10:06 am
by Galatea
try to become a donator and you won't have problems with dice

Re: The Dice - Explained

PostPosted: Tue Feb 22, 2011 11:34 am
by Woodruff
bedub1 wrote:The dice aren't truly random because they are chosen from a set without uniform distribution.


This does not make logical sense.

Re: The Dice - Explained

PostPosted: Tue Feb 22, 2011 12:02 pm
by Army of GOD
The dice aren't random because I get bad rolls when I don't want them

Re: The Dice - Explained

PostPosted: Tue Feb 22, 2011 12:23 pm
by Metsfanmax
Bedub's argument seems logical on its face, but when you look at the subtleties, the argument falls apart. The practical reason is that the "error" is tiny, as evidenced by the fact that the point would be moot if the list were of length 50,004. The mathematical reason is that we wouldn't expect the list of 50,000 numbers to be uniform in the first place. We would expect that a list that large to be fairly close to uniform, but I would be suspicious if there were exactly the same of each number in such a list (assuming the list is divisible by 6). The only requirement of a process to be described as truly random is that as the number of trials N -> infinity, the distribution becomes uniform and without any patterns. If N is large but finite, we wouldn't expect a uniform distribution in most cases, we would just expect something fairly close to uniform (which is indeed what random.org gives us).

Re: The Dice - Explained

PostPosted: Tue Feb 22, 2011 5:58 pm
by bedub1
Woodruff wrote:
bedub1 wrote:The dice aren't truly random because they are chosen from a set without uniform distribution.


This does not make logical sense.

Did you read the definition from Random.org?

Let me try again. Lets pretend you have a 7 sided die, it has the following numbers on it:

1,2,3,4,5,6,6

If you roll that die, will you get a truly random number? No. Why? Because the die doesn't have a uniform distribution.

The list of 50,000 numbers is our die. When the pseudo-random engine picks a spot to read, it is "rolling the die". Make sense now? It's not "TRULY" random unless the list of numbers picked from includes "PERFECT" uniformity.

Metsfanmax wrote:Bedub's argument seems logical on its face, but when you look at the subtleties, the argument falls apart. The practical reason is that the "error" is tiny, as evidenced by the fact that the point would be moot if the list were of length 50,004. The mathematical reason is that we wouldn't expect the list of 50,000 numbers to be uniform in the first place. We would expect that a list that large to be fairly close to uniform, but I would be suspicious if there were exactly the same of each number in such a list (assuming the list is divisible by 6). The only requirement of a process to be described as truly random is that as the number of trials N -> infinity, the distribution becomes uniform and without any patterns. If N is large but finite, we wouldn't expect a uniform distribution in most cases, we would just expect something fairly close to uniform (which is indeed what random.org gives us).

So you agree with me. You are just of the opinion that it's "random enough". You describe is as "the error is tiny".

The point would not be moot if the list was of length 50,004. The only way to make it be moot would be to ensure a uniform distribution. That means you take a list of 60,000 numbers, 10k which are 1, 10k which are 2, 10k which are 3 etc. Then you randomize the list. Now when you use a pseudo random number generator to pick a spot to start reading (IE roll the die) you will be picking a number from a list with uniform distribution.

Re: The Dice - Explained

PostPosted: Tue Feb 22, 2011 7:00 pm
by targetman377
so your whole arguments rest on this
"The list of 50,000 numbers is our die. When the pseudo-random engine picks a spot to read, it is "rolling the die"
well then if the initial numbers are random then there is a pseudo random engine would that not make it 2x as random?

Re: The Dice - Explained

PostPosted: Tue Feb 22, 2011 7:18 pm
by Woodruff
bedub1 wrote:
Woodruff wrote:
bedub1 wrote:The dice aren't truly random because they are chosen from a set without uniform distribution.


This does not make logical sense.


Did you read the definition from Random.org?


I don't need the definition from random.org...because I understand the REAL definition.

bedub1 wrote:Let me try again. Lets pretend you have a 7 sided die, it has the following numbers on it:
1,2,3,4,5,6,6
If you roll that die, will you get a truly random number? No. Why? Because the die doesn't have a uniform distribution.


This is quite honestly non-sensical. You will still absolutely get a random number, but the distribution will be weighted toward the six. If you have a six-sided die and all six sides have a 1 on them, you WILL STILL GET A RANDOMLY-SELECTED 1 when you roll the die.

Re: The Dice - Explained

PostPosted: Tue Feb 22, 2011 7:40 pm
by Haggis_McMutton
I think there's a misunderstanding of terms here.

I believe what bedub is trying to say is that when you roll a dice you indeed have 1/6 chances of getting each value, here you do not, it's not evenly distributed.
And the fact that it's more likely to get any specific number actually gives an advantage to the defender, since they win if both players have the same highest die.

Please correct me if I'm wrong, but I think this might indeed mean the defender has an unfair advantage.

Re: The Dice - Explained

PostPosted: Tue Feb 22, 2011 7:44 pm
by Army of GOD
Haggis_McMutton wrote:I think there's a misunderstanding of terms here.

I believe what bedub is trying to say is that when you roll a dice you indeed have 1/6 chances of getting each value, here you do not, it's not evenly distributed.
And the fact that it's more likely to get any specific number actually gives an advantage to the defender, since they win if both players have the same highest die.

Please correct me if I'm wrong, but I think this might indeed mean the defender has an unfair advantage.


That's how it's supposed to be though?

Re: The Dice - Explained

PostPosted: Tue Feb 22, 2011 7:48 pm
by Woodruff
Haggis_McMutton wrote:I think there's a misunderstanding of terms here.

I believe what bedub is trying to say is that when you roll a dice you indeed have 1/6 chances of getting each value, here you do not, it's not evenly distributed.


Which has nothing to do with whether something is random or not.

Haggis_McMutton wrote:And the fact that it's more likely to get any specific number actually gives an advantage to the defender, since they win if both players have the same highest die.
Please correct me if I'm wrong, but I think this might indeed mean the defender has an unfair advantage.


Sure, that makes sense. But that doesn't change the randomality of it.

Re: The Dice - Explained

PostPosted: Tue Feb 22, 2011 8:26 pm
by Haggis_McMutton
Army of GOD wrote:
Haggis_McMutton wrote:I think there's a misunderstanding of terms here.

I believe what bedub is trying to say is that when you roll a dice you indeed have 1/6 chances of getting each value, here you do not, it's not evenly distributed.
And the fact that it's more likely to get any specific number actually gives an advantage to the defender, since they win if both players have the same highest die.

Please correct me if I'm wrong, but I think this might indeed mean the defender has an unfair advantage.


That's how it's supposed to be though?


I mean unfair-er than if you were rolling an actual die.

Let's take an example with a 3 sided die. if odds are 1/3 for every face you're odds or winning as attacker : (1/3)*(2/3) - defender rolls 1, you roll 2 or 3 + (1/3)*(1/3) - defender rolls 2, you roll 3, equal to 3/9 or 1/3.

Now, 3 sided dice but odds are: 3/6 it comes up 1, 1/6 it comes up 2, 2/6 it comes up 3(random example). Odds of winning as attacker are: (3/6)*(1/6+2/6) + (1/6*2/6) = 11/36 which is less than 1/3.

Woodruff, I agree it's random, but does it behave as it should if it were real dice or is it biased?

Re: The Dice - Explained

PostPosted: Tue Feb 22, 2011 8:36 pm
by Metsfanmax
bedub1 wrote:
Metsfanmax wrote:Bedub's argument seems logical on its face, but when you look at the subtleties, the argument falls apart. The practical reason is that the "error" is tiny, as evidenced by the fact that the point would be moot if the list were of length 50,004. The mathematical reason is that we wouldn't expect the list of 50,000 numbers to be uniform in the first place. We would expect that a list that large to be fairly close to uniform, but I would be suspicious if there were exactly the same of each number in such a list (assuming the list is divisible by 6). The only requirement of a process to be described as truly random is that as the number of trials N -> infinity, the distribution becomes uniform and without any patterns. If N is large but finite, we wouldn't expect a uniform distribution in most cases, we would just expect something fairly close to uniform (which is indeed what random.org gives us).

So you agree with me. You are just of the opinion that it's "random enough". You describe is as "the error is tiny".


No, you misinterpreted what I meant, which may be my fault. I intended to say that even if you are right, the error you describe is tiny, given that the sample size is so large. If the data set were "1,3,2,3,3,4,5,6" then I'd agree that the non-uniformity is an issue. If the data set is 50,000 numbers, the extra two making it non-uniform is pragmatically, even if we accept the paradigm that a uniform data set is ideal.

The point would not be moot if the list was of length 50,004. The only way to make it be moot would be to ensure a uniform distribution. That means you take a list of 60,000 numbers, 10k which are 1, 10k which are 2, 10k which are 3 etc. Then you randomize the list. Now when you use a pseudo random number generator to pick a spot to start reading (IE roll the die) you will be picking a number from a list with uniform distribution.


I was making the argument that all this requires is a multiple of 6 - then uniformity is theoretically possible.

The main point, though, is that non-uniformity is completely expected for a finite data set of a random number generator. It is incredibly unlikely that a set of 50,000 numbers would have exactly the same amount of each number. To claim that the non-uniformity is even a theoretical issue is to fundamentally misunderstand the nature of RNGs.

Re: The Dice - Explained

PostPosted: Tue Feb 22, 2011 8:47 pm
by bedub1
Woodruff wrote:
Haggis_McMutton wrote:I think there's a misunderstanding of terms here.

I believe what bedub is trying to say is that when you roll a dice you indeed have 1/6 chances of getting each value, here you do not, it's not evenly distributed.


Which has nothing to do with whether something is random or not.

Yes, it does. That is the definition of random. See below.

random.org wrote:When discussing single numbers, a random number is one that is drawn from a set of possible values, each of which is equally probable.

Re: The Dice - Explained

PostPosted: Wed Feb 23, 2011 12:59 am
by rdsrds2120
bedub1 wrote:By definition, if the list of 50,000 true random numbers are truly random, then the list will not have a perfectly uniform distribution. Thus, we are picking numbers from a list without uniform distribution, which can never result in truly random numbers.


So, if we increased the list to 60,000 and randomly generated a number for each of the 60,000 slots, you'd be ok? I doubt it.

Then, the argument would probably be that since the same amount of each number doesn't show up, then it isn't uniform and we'd have to start all over, right?

Let's say that I roll a die 5 times to determine my 3 attackers and 2 defenders, we can agree that that is indeed random, correct? Good. Now let's say that I jot those numbers down in the order that I rolled them, and did this 10,000 more times. I would then have a list of completely random numbers, which aren't uniform, but that's ok because each number I rolled by itself was random. Saying that since the number set isn't uniform, therefore it isn't random, is like saying then that if I roll a die 6 times, I should get a 1,2,3,4,5,6, and any differences would mean the die is loaded because we expect a uniform distribution.

Also like Metsfanmax said, it would probably only be completely uniform as we approach an infinite amount of dice rolls.

-rd

Re: The Dice - Explained

PostPosted: Wed Feb 23, 2011 6:00 am
by Haggis_McMutton
Guys.

The "assault cubes" are supposed to simulate real dice, correct?
I think I have just shown how they are consistently biased in favour of the defender in regards to how real dice should behave.

Could we please address this matter instead of debating the meaning of the term "random"?

bedub is using a definition where random = equal probabilities for each event, aka a biased coin isn't random. The rest of you are using the definition that as long as it's not deterministic it's random, aka a biased coin is random. Frankly I think it's immaterial, so let's just drop the damn terminology and talk about wether the virtual dice are a good simulation of real dice or not.

As for the method for dealing with this potential problem, always having equal numbers of 1s through 6s in each document and just randomly generating their position in the document should work.

Re: The Dice - Explained

PostPosted: Wed Feb 23, 2011 7:44 am
by natty dread
It's simple!

We have a string of 50 000 truly random numbers. No one disputes that the numbers that come from random.org are truly random, right?

So when we take 5 numbers from that list, they are random. It doesn't matter at which point we take the 5 numbers, they are still random, because the whole string is full of random numbers.

Here's the rub: With random, the previous results you've rolled should not affect the next roll in any way. It doesn't matter what you've previously rolled, it doesn't (and shouldn't) affect the odds of your next roll in any way.

So when we pick the position at "random", and then read the 2-5 random numbers from that list, they are just as random as if we'd be reading that list sequentially.

Not to mention that the string of 50000 random numbers is refreshed every hour.

Dice analyzer also records the ratio of dice rolls you get (1's, 2's, 3',s... 6's) so if someone here is sure that the current CC dice are favoring some number over others, go ahead and record your next 1000 dice rolls, see if there's not an uniform distribution.

Re: The Dice - Explained

PostPosted: Wed Feb 23, 2011 8:29 am
by Haggis_McMutton
natty_dread wrote:It's simple!

We have a string of 50 000 truly random numbers. No one disputes that the numbers that come from random.org are truly random, right?

So when we take 5 numbers from that list, they are random. It doesn't matter at which point we take the 5 numbers, they are still random, because the whole string is full of random numbers.

Here's the rub: With random, the previous results you've rolled should not affect the next roll in any way. It doesn't matter what you've previously rolled, it doesn't (and shouldn't) affect the odds of your next roll in any way.

So when we pick the position at "random", and then read the 2-5 random numbers from that list, they are just as random as if we'd be reading that list sequentially.

Not to mention that the string of 50000 random numbers is refreshed every hour.

Dice analyzer also records the ratio of dice rolls you get (1's, 2's, 3',s... 6's) so if someone here is sure that the current CC dice are favoring some number over others, go ahead and record your next 1000 dice rolls, see if there's not an uniform distribution.


The problem is, that due to the rules of risk if say "3" is more likely than 1/6 to come up in this document, the defender has an advantage. If in the next document "6" is more likely to come up, the defender still has an advantage. So even if they even out in 100 documents, the defender still had an advantage in each.

Again, examples. I'm considering 3 sided dice, both defender and attacker roll a single dice. I'm generating documents of 10 numbers with random .org.
As I've shown before, with a real dice odds of attacker winning should be 1/3.

Document 1: 1 3 2 2 1 1 2 2 3 1
So odds of getting each value is:
1 -> 4/10
2 -> 4/10
3 -> 2/10
Odds of attacker winning are: (4/10)*(6/10) + (4/10)*(2/10) = 32/100 less than 1/3

Document 2: 3 3 2 1 3 3 2 1 1 3
1-> 3/10
2 -> 2/10
3 -> 5/10
Winning: 3/10 * 7/10 + 2/10 * 5/10 = 31/100 less than 1/3

Document 3: 2 3 3 1 3 3 3 1 1 1
1 -> 4/10
2-> 1/10
3 -> 5/10
Winning: 4/10 * 6/10 + 1/10*5/10 = 29/100 less than 1/3

And so on. See what I'm saying?

Re: The Dice - Explained

PostPosted: Wed Feb 23, 2011 10:12 am
by Metsfanmax
Haggis_McMutton wrote:The problem is, that due to the rules of risk if say "3" is more likely than 1/6 to come up in this document, the defender has an advantage. If in the next document "6" is more likely to come up, the defender still has an advantage. So even if they even out in 100 documents, the defender still had an advantage in each.

Again, examples. I'm considering 3 sided dice, both defender and attacker roll a single dice. I'm generating documents of 10 numbers with random .org.
As I've shown before, with a real dice odds of attacker winning should be 1/3.

Document 1: 1 3 2 2 1 1 2 2 3 1
So odds of getting each value is:
1 -> 4/10
2 -> 4/10
3 -> 2/10
Odds of attacker winning are: (4/10)*(6/10) + (4/10)*(2/10) = 32/100 less than 1/3

Document 2: 3 3 2 1 3 3 2 1 1 3
1-> 3/10
2 -> 2/10
3 -> 5/10
Winning: 3/10 * 7/10 + 2/10 * 5/10 = 31/100 less than 1/3

Document 3: 2 3 3 1 3 3 3 1 1 1
1 -> 4/10
2-> 1/10
3 -> 5/10
Winning: 4/10 * 6/10 + 1/10*5/10 = 29/100 less than 1/3

And so on. See what I'm saying?


The non-uniformity is tiny for a sample of 50,000 numbers. This effect is almost entirely irrelevant even if it does exist (which it does not). Besides, as long as it's consistent for all players there's no bias towards anyone.

Re: The Dice - Explained

PostPosted: Wed Feb 23, 2011 10:30 am
by natty dread
Haggis_McMutton wrote:And so on. See what I'm saying?


Well, if you want to prove that the dice number distribution is not uniform, that should be easy: record 10000 rolls on dice analyzer. With that sample size, if there's a significant distortion in the distribution between the dice numbers, then you have a case.

Re: The Dice - Explained

PostPosted: Wed Feb 23, 2011 1:07 pm
by Woodruff
bedub1 wrote:
Woodruff wrote:
Haggis_McMutton wrote:I think there's a misunderstanding of terms here.

I believe what bedub is trying to say is that when you roll a dice you indeed have 1/6 chances of getting each value, here you do not, it's not evenly distributed.


Which has nothing to do with whether something is random or not.

Yes, it does. That is the definition of random. See below.


No, it absolutely is NOT the "definition of random". As I explained in my last post.

bedub1 wrote:
random.org wrote:When discussing single numbers, a random number is one that is drawn from a set of possible values, each of which is equally probable.


This is NOT the definition of random, this is random.org's statement used to show how their numbers are derived. Good Lord, this isn't difficult. Open a stinking dictionary, please.

Re: The Dice - Explained

PostPosted: Wed Feb 23, 2011 1:15 pm
by Woodruff
Haggis_McMutton wrote:Guys.

The "assault cubes" are supposed to simulate real dice, correct?
I think I have just shown how they are consistently biased in favour of the defender in regards to how real dice should behave.

Could we please address this matter instead of debating the meaning of the term "random"?

bedub is using a definition where random = equal probabilities for each event, aka a biased coin isn't random. The rest of you are using the definition that as long as it's not deterministic it's random, aka a biased coin is random. Frankly I think it's immaterial, so let's just drop the damn terminology and talk about wether the virtual dice are a good simulation of real dice or not.

Haggis_McMutton wrote:As for the method for dealing with this potential problem, always having equal numbers of 1s through 6s in each document and just randomly generating their position in the document should work.


Nope, you can't randomly generate their position and have it still be random by your methodology/explanation for non-bias toward defense (which I agree with). The problem lying in the fact that a computer cannot be truly random in its method (which is why random.org derives it's numbers in the method it does.