Page 4 of 5

Re: doubles in Castles of burgundy

Posted: 23 August 2026, 17:36
by Ehronde
JimBut wrote: 23 August 2026, 13:31
tbhp wrote: 23 August 2026, 10:15
I don't think that's true. When people say that, for example, they want a slot machine to be random, what they mean is true randomness. They want the randomness to be perfect in a mathematical sense.
I think most people just want the outcome to be unpredictable and fair. If I have two sources of randomness - one being a magic box that uses some source of perfect randomness that produces dice rolls and one that uses a cryptographically secure function, like the one used in BGA you would not be able to differentiate the two.

I don't think most people would complain about one of these when they are unable to tell them apart
According to some threats in the Catan forum and on Reddit, a lot of loud people want the see rolls according to the probabilities in ever single game. They just don't know how randomness and probabilities work.

Re: doubles in Castles of burgundy

Posted: 23 August 2026, 18:47
by BarnardsStar
I'm coming to the point of view that something here isn't right. As somebody suggested early in this thread, it could well be how statistics are calculated, or it could be something about how this game generates dice rolls. (I am not saying there is anything wrong with PHP's random_int()!)

The statistics page right now says that the global overall proportion of doubles in this game has been 16.61%. It should be 16.66̅%. This doesn't seem like very much, but on the scale we are talking about this is actually a huge difference. There have been (last I loaded the page) 4,369,880 games of CoB on this site. Each game entails 25 dice rolls per player; let's assume it's always 2 players, so 50 per game. That's 218,494,000 rolls. Now, 16.61% is presumably rounded. It could be as high as 16.615% (well, a smidge below that); that would be 36,302,778 doubles.

Plugging these into the binomial formula, I get that the chances of there being that many doubles (or fewer) is roughly 10^-93. That's a 0, a decimal point, 92 zeros, and then a 1. That is so exceedingly unlikely, there's probably some other reason for it.

I'll just note that the two assumptions I made (that 16.61% got rounded down from 16.615% and that there's only ever 2 players) were designed to maximize the odds. Change those numbers to something else reasonable and that 10^-93 becomes even smaller. (eg if you assume 16.61 was rounded up from 16.605, then the chance becomes 1.5*10^-132 )

Like I said, it's probably in the statistics gathering; it might be something about how the game handles the die rolls. It's not random_int, I know that. It could even be randomness, but when something this unlikely happens, I start to look for possible causes other than sheer randomness. So what is it?

And, really, I'd really appreciate it if somebody could show me where I went wrong. That would make me feel better too.

Re: doubles in Castles of burgundy

Posted: 23 August 2026, 19:13
by JimBut
BarnardsStar wrote: 23 August 2026, 18:47 And, really, I'd really appreciate it if somebody could show me where I went wrong. That would make me feel better too.

I don't know how much this would impact it but there is a dice roll (I believe) at the start of the game to determine turn order which can't be a double so I assume that would bump the percentage down a bit

Re: doubles in Castles of burgundy

Posted: 23 August 2026, 19:25
by Shivaware
BarnardsStar wrote: 23 August 2026, 18:47
Like I said, it's probably in the statistics gathering; it might be something about how the game handles the die rolls. It's not random_int, I know that. It could even be randomness, but when something this unlikely happens, I start to look for possible causes other than sheer randomness. So what is it?
I'm not premium, so I can't see these statistics.

I seem to recall someone going on and on about statistics not being recorded if someone concedes. Is it possible this is what's happening here?

And if that does happen, maybe someone is choosing to concede games when there have been more doubles than usual just to skew the results 8-)

Re: doubles in Castles of burgundy

Posted: 23 August 2026, 19:30
by Jellby
Not surprisingly, there have been claims that there are too many doubles: https://boardgamearena.com/forum/viewtopic.php?t=35093

Perhaps the code has changed recently (latest version is from June 2026), and statistics are collected now that were not before, or they have been reset at some point. Unfortunately, the game logs don't detail the rolls, so it's not convenient to verify the data, but checking a few games, the percentage of doubles reported seems to always a multiple of 4, which is consistent with 25 rolls. Maybe things are screwed if a game ends early (by concession or expulsion)?

Re: doubles in Castles of burgundy

Posted: 23 August 2026, 19:43
by lefalaf
BarnardsStar wrote: 23 August 2026, 18:47 And, really, I'd really appreciate it if somebody could show me where I went wrong. That would make me feel better too.
Without seeing the code for how the statistics are recalculated (Are they looking at all games back to #1, or doing something funky to make it faster, but less accurate, like using a stored prior value, e.g. 16.61 with little precision, and a stored number of rolls to recalc with each new value added in? or do they maintain a count of doubles and the number of rolls for doing the recalc, going all the way back?), the precision of the data types used to run and store the calculations (Rounding error along the way), and the game code (Is everything logged?), you are just wasting your time.

I believe I saw a post on here where someone just ran the raw function several hundred thousand times and the results came out fine. I don't care enough to find it, but be my guest...

EDIT: And of course it is random, so it need not revert to the mean, even over massive data sets.

Re: doubles in Castles of burgundy

Posted: 23 August 2026, 19:51
by JimBut
JimBut wrote: 23 August 2026, 19:13
BarnardsStar wrote: 23 August 2026, 18:47 And, really, I'd really appreciate it if somebody could show me where I went wrong. That would make me feel better too.

I don't know how much this would impact it but there is a dice roll (I believe) at the start of the game to determine turn order which can't be a double so I assume that would bump the percentage down a bit
I think this explanation alone would drop it down to 16.03% which is too much. I wonder if the rotate players on rematch feature is enough to bump this back up. Perhaps I'll check out the code if I get a chance

Re: doubles in Castles of burgundy

Posted: 23 August 2026, 21:22
by FrankJones
Suppose a website has exactly 2 games, both of which involve a coin being flipped and resulting in either "heads" or "tails". Let's call these games "Game_A" and "Game_B"

On a particular day, players played these two games an equal number of times, and the random_int function was used a total of 100 times combined across both games.

The results were 50 heads and 50 tails.

So, the function generated exactly as many heads and tails as we expected. But, the two games were being played simultaneously by players throughout the day, and 30 of those heads occurred in Game_A and only 20 occurred in Game_B.

Would this cause people to assert that the random_int function is malfunctioning in both games? If so, would they be right or wrong to assert this?

Re: doubles in Castles of burgundy

Posted: 24 August 2026, 00:20
by BarnardsStar
FrankJones wrote: 23 August 2026, 21:22 Would this cause people to assert that the random_int function is malfunctioning in both games? If so, would they be right or wrong to assert this?
a) Yes, they would. b) They would (almost certainly) be wrong. The chance of getting 30 or more heads out of 50 flips is approximately 10.1%, so the chance that both these situations would happen on the same day is 1%-ish. Entirely within the realm of likelihood, and nowhere near 10^-93.

If this hypothetical situation persisted day after day after day, then I would look to the game code, not random_int.

Re: doubles in Castles of burgundy

Posted: 24 August 2026, 00:46
by FrankJones
True, but I was thinking more generally. Should we expect the total number of heads and tails to be equal (in the long run), but not necessarily equal in every game? Or should we also expect them to be equal in every game?

If the unusual trend I described continued, would that necessary mean something is wrong? Or would it just be a weird coincidence that more heads are coming up in one game and less in the other, even though overall we are getting an equal amount of both.