Page 2 of 11

Re: dice used in catan is biased

Posted: 16 June 2024, 16:55
by Rufasu
Are we assuming that the program is right?
In fact, PHP's random generator had many problems.
Are you still using the latest PHP generators and programming properly?
Creating random numbers is very difficult.
We should not assume that our programs are correct, but we should examine them carefully to make sure that we are doing the right thing.

Re: dice used in catan is biased

Posted: 16 June 2024, 18:16
by Jellby
Rufasu wrote: ↑16 June 2024, 16:55 Are we assuming that the program is right?
Yes, until proven otherwise. And "a feeling" is not a proof.
In fact, PHP's random generator had many problems.
Maybe, but most likely nothing that can be detected in choosing two random integers between 1 and 6.

Re: dice used in catan is biased

Posted: 16 June 2024, 18:20
by The Settler Man
I agree...my friend and I in the regular board game switched to an app that gives a perfect distribution every 36 rolls called catan dice. After the 36 rolls it starts over so if you end in the middle of the next 36 rolls the distribution will be off some.

Even regular dice in any given game will not give you a good distribution....if you could have a game that had 10,000 rolls you would get a good distribution.

I am fairly new to the bga online platform but from what I see is 11's and 4's roll way more often than they should. EVEN 2'S and 12's are vastly more represented than they should be. A 2 and 12 should only on average be rolled 1 time each in 36 rolls. Games offen have these rolled 2-3 times or more in bga.

The problem with generating a truly random number is you need a way to randomly generate a random number for your algorithm so that it generates a unique number. I watched a video once about a powerball gambling generator that used the pressure of the weather(if I remember correctly) in a given place that was always changing to generate the powerball numbers.

This is why I rate catan (even the normal board game) with probably 15%-25% luck...

Re: dice used in catan is biased

Posted: 16 June 2024, 22:03
by 23Metime
I agree, the few games I've played, it's been noticable that the same numbers come up more times than explained by chance. 9 and 11 noticably.

Re: dice used in catan is biased

Posted: 17 June 2024, 01:47
by fiscused
The secret is sheep. The game algorithm doesn't like players who set up next to sheep spaces. Just stay away from sheep and you will win!

Re: dice used in catan is biased

Posted: 17 June 2024, 05:43
by Rufasu
I can theoretically figure it out by looking at the source code...
I can't see it, so I can't discuss it logically.

Re: dice used in catan is biased

Posted: 17 June 2024, 13:05
by ErikLevin
Rufasu wrote: ↑16 June 2024, 16:55 Are we assuming that the program is right?
In fact, PHP's random generator had many problems.
Are you still using the latest PHP generators and programming properly?
Creating random numbers is very difficult.
We should not assume that our programs are correct, but we should examine them carefully to make sure that we are doing the right thing.
Have you seen this in the FAQ? https://boardgamearena.com/faq?anchor=f ... ing_random

Creating random numbers is a solved problem. Your everyday activities on your computer and phone rely on random number generators working properly every day.

Perhaps you are thinking of PHP's "rand()", which isn't cryptographically secure (but would still, frankly, be perfectly fine to roll the dice in no-stakes board gaming). BGA doesn't use that, it uses random_int() which is cryptographically secure. And if you don't trust CSPRNGs I hope you don't have your money in a bank account.
The Settler Man wrote: ↑16 June 2024, 18:20 I am fairly new to the bga online platform but from what I see is 11's and 4's roll way more often than they should. EVEN 2'S and 12's are vastly more represented than they should be. A 2 and 12 should only on average be rolled 1 time each in 36 rolls. Games offen have these rolled 2-3 times or more in bga.
No, you are wrong. As has been explained many times, humans are terrible at determining whether a random distribution is truly random by feel.
The Settler Man wrote: ↑16 June 2024, 18:20 The problem with generating a truly random number is you need a way to randomly generate a random number for your algorithm so that it generates a unique number. I watched a video once about a powerball gambling generator that used the pressure of the weather(if I remember correctly) in a given place that was always changing to generate the powerball numbers.
Yes, you are talking about the seed. For cryptographically secure RNGs (which again, isn't really necessary for this purpose, but BGA uses that anyway), the seed needs to be secret (and thus, random). BGA uses a cryptographically secure function, so atmospheric noise or something along those lines is used to generate the seed.

Re: dice used in catan is biased

Posted: 17 June 2024, 15:27
by Rufasu
Are we running random_int at the right time?
If I cache it poorly or something, I get the same numbers.
The reason I doubt it is because I feel that I am more likely to get the same dice.

Re: dice used in catan is biased

Posted: 17 June 2024, 16:29
by ErikLevin
Rufasu wrote: ↑17 June 2024, 15:27 I feel that I am more likely to get the same dice.
You can't determine that by memory and gut feel.

Why don't you take an unbiased sample of a thousand or so dice rolls and look at it?

So many people "feel" or "are sure" that the dice are biased, and are so heavily invested about it to create endless threads in the forums, but nobody actually looks into it properly. I don't understand why. The data is all here, in the replays.

Re: dice used in catan is biased

Posted: 17 June 2024, 18:33
by Rufasu
If only they would release the random function, we could sample it a billion times...
Unless you make it open source, the suspicion will never go away.