UPDATE3
Mike Petch collected over a million rolls using the new dice and tells me that everything was well within statistical expectations, however I have not see his final publication. I don’t have the programming ability Mike does, so I am not going to attempt to analyze the matches I collected for him, but since I have switched to Extreme Gammon for my match analysis I can use its dice analysis feature. All of the following are all from rooms using the corrected dice (rooms marked with yellow dice), mostly Doubling Cube and Gammon Zone
So as you can see the frequency of doubles, distribution of doubles, and number of doubles in a row are all within what would be expected.
UPDATE2
There is a group that continues to complain about the new dice code at SHG. While data is still being collecting for version .35 it is clear that all the versions from .28 produced the correct amount of doubles, or at least something very close to it. I keep hearing complaints of “one-sided dice” “6 doubles in a row” “20 doubles in a game” and players losing “time and time and time again” to multiple doubles at the end of the game. However, as far as I can tell no one complaining about this has produced even one match log, not less the hundreds that should be out their, to show that this is happening. I would love to see all of these match logs, if it is happening with anywhere near the frequency some people claim there should be hundreds of these kinds of matches. So please, attach you mat files to an email and send them to showmethelogs@gmail.com.
UPDATE
The follow a couple of recent developments on this check out the following threads on the BGONLINE.ORG forum:
http://www.bgonline.org/forums/webbbs_config.pl?noframes;read=51451
http://www.bgonline.org/forums/webbbs_config.pl?noframes;read=51473
For those of you that don’t know Neilkaz is Neil Kazaross, the all times points leader on the American Backgammon Tour and #5 on the 2007 Giants of Backgammon List.
Original Post
This post does not really related to the subject of the blog, but i am putting it here so people that ask me about it on SHG can have a reference for what is going on.
If you see me (BigWill) kibitzing a lot of games on SHG it is because I am collecting data to continue a study of the dice at SHG. Mike Petch, who does a lot of gnubg development, is doing the analysis at this point, I am helping collect data.
Here is the whole story:
A few weeks ago in the bgonline.org forum there was a comment from Neil Robins that his XG gammons dice data from SHG showed less than the expected number of doubles. I doubted that could be true, so I analyzed my own matches. Doubles should occur 16.67% of the time, but on SHG they were only coming up about 9.2% of the time. If you want to read the whole thread that kicked off the whole thing you can find it here http://www.bgonline.org/forums/webbbs_config.pl?noframes;read=49530#Responses.
Mike’s data for the old dice can be found at http://www.capp-sysware.com/analysis/shgold_stats.txt.
Mike is a programmer and knows the people at SHG – he does not work for them, nor do I – so he let them know that there was an issue and shared our data with them.
As of this writing the corrected dice code is in the Cove, Doubling Cube, and Lagoon rooms on SHG.
The data we are collecting on the new dice is available here: http://www.capp-sysware.com/analysis/shgnewdc_stats.txt.
This data shows that doubles are now as you would expect. A lot of people are complaining about the number of doubles, but the data speaks for itself. Mike is continuing to look for other anomalies such as runs in the data, but runs can occur in truly random data sets. A good introduction to the issue of statistically proving randomness can be found here: http://www.random.org/analysis/.
Now if you are thinking that is a lot of crap to wade through I would say if you are not willing to spend the time to understand that then shut up about the dice, you don’t have a leg to stand on. For the rest of you, you now know as much as the story as I do.
Some Notes on Random Number Sets
Mike and I have taken quite a beating in the room lobbies, particularly the Cove, over our "ruining" the play at SHG. Of course, all we have done is analyze the data before and after the change (actually Mike has done all of the after change analysis I have just been helping collect data), SHG has made the changes based on seeing the problem. However, one of the things that we have learned in the course of those lobby chats is that many people do not have a good grasp of probabilities or "randomness." For example one person told us that our claim that doubles should occur every 1 in 6 rolls was "subjective." Another person e-mailed Mike and told him that their understanding was that if the dice were correct than if you got a roll of 12, for example, you should not expect to see 12 again for 18 rolls.
Neither of these, or many of the other things we are hearing from those convinced that the new code is generating too many doubles is correct. I am including this brief discussion to hopefully clear up some of the confusion people have with what they should expect to see in random dice.
There are numerous places on the internet to find the basic dice probabilities for backgammon, so I am not going to repeat that here. The simple fact is there are 36 possible rolls, 6 of which are doubles. Therefore the probability of getting any double is 6/36, or 1 in 6. There is nothing subjective about this.
The next thing to keep in mind is that every roll of the dice is independent of the previous or subsequent rolls. The dice don’t remember what was rolled, so on any given roll the probability of a double is 1/6, the probability of any specific nondouble 1/18 and so on. Those that think that they are more likely to get a double this roll because they "have not seen one in while" are committing one of the classic gambler’s fallacies.
Now, just because the probabilities of each roll are independent does not mean you cannot say anything about the probabilities of these independent events following one another. The math is very simple in this case, the probabilities of two independent events occurring is simply the probability of event 1 * the probability of event 2. So, if I ask the simple question what is the probability of throwing 2 doubles in a row the answer is simply 1/6 * 1/6, or 1 in 36.
This is all pretty simple, but now things get a little trickier, and this is where a lot of people, I think, struggle with the dice behavior. Consider the following two sequences of rolls: 21 21 21 21 and 54 63 31 42. Most people look at the first sequence and see non-random and the second sequence and see random. However the probability of those two sequences of four rolls occurring from random rolls of the dice is exactly the same. Of course if we saw 12 repeated say 15 times in a sequence of supposedly random numbers we would have reason to question if the numbers were truly random because this has a probability of only about 1.4e-19 times, or 1 time in about 67,000,000,000,000,000,000. Notice I said question, not say for sure, we would need more evidence before reaching a conclusion. On the other hand, if I had a set of 100,000,000,000,000,000,000 random dice rolls the fact that I found a run of 15 12s should not be too surprising.
The problem is that with smaller number sets it gets harder to say when a repeated sequence is evidence of non-randomness. There are various statistical test for runs in sets of data, but it has been shown that truly random numbers will sometimes produce runs that fail these test.
Sometimes it easier to get a handle on some of the statistical oddities by experimenting. To illustrate this I simulated 216 matches (216 was chosen simply because I was using Excel to handle the data and this was the biggest set that easily fit) of 300 rolls each to see what kind of things came up. 300 rolls for one player is a realistic number of rolls for many 7-11 point matches, of course the real world number will be highly variable, but for the purposes of this experiment it works well.
I downloaded simulated dice data from random.org. Random.org uses atmospheric noise to generate true random numbers and their numbers have passed a battery of statistical test. Short of rolling real dice multiple thousands of time this is as close as we are going to get to simulating true, random dice rolls.
So, what can we learn from this experiment? Well here are a couple of items of interest:
Repeated Sequences of Doubles: This is a complaint we hear a lot, "my opponent rolled 4 doubles in a row that never happens with real dice", for example. Well looking at the data from the simulation a sequence of 4 doubles in a row came up 38 times, and in 3 of the simulated matches this happened twice! Now from a pure probability standpoint a sequence of 4 doubles occurs only 1 time in every 1296 rolls. People see this and think that means that you will rarely see it, yet in our simulation it happened 38 times! (Actually 38 times is lower than what the probability would predict, which would be 50 times.
And what about an even longer sequence of doubles? The longest sequence in the simulation is 7 doubles in row! Which would, based on the probabilities occur only 1 time in 279,936 rolls, but here it is a data set of only 64,800 random rolls. There were also 5 sets of 5 doubles in row, which a lot of people might question but is fewer than what one would expect.
Rolling Multiples of the Same Double in a Game or Match: We hear people say something like "I got 13 double sixes in one game." In the few cases we have been able to get the match log we have found these types of claims to be greatly exaggerated. However, getting more, or less, of one double than expected is not all that unusual in these short sets of random numbers. I had one simulated match in which there were 17 double 6s in the 300 rolls, more than twice the number one would expect. More surprisingly, perhaps, I had a simulated match with only 1 double 1, another with only 1 double 2, and yet another with only 1 double 4. The probability of getting only 1 of a specific double in 300 rolls is 0.000006, or 1 time in 163,834 rolls. Yet here we have this low probability event occurring 3 times in a small set of simulated matches! Now rarely is anyone going to complain that I only got 1 double 1, yet the absence of these is just as powerful of an indicator of how far off from the "average" values short samplings of random numbers can be.
Hopefully these couple of examples will help you to see that what some might think are evidence of non-random dice are actually events that occur with some regularity in short sets of data from a random source. I will end with one additional story. A couple of days ago I won a game in 15 rolls (I should have doubled and gotten out of it a lot earlier probably), of which 7 were doubles. This included back to back 66s, followed a few rolls later by back to back 55s. Now I am sure that some people well read that and say, see I told you there was a problem with the SHG dice!
Only thing is, I was playing GNUBG!