change the dice generator.

Forum rules
Please DO NOT POST BUGS on this forum. Please report (and vote) bugs on : https://boardgamearena.com/bugs
User avatar
Arjuna92
Posts: 103
Joined: 24 February 2014, 08:10

Re: change the dice generator.

Post by Arjuna92 »

Suoivax wrote: 20 February 2026, 23:50
Jellby wrote: 20 February 2026, 21:32 Actually, the game would be much better if you could just choose a number, instead of roll dice.
And if you could also choose which number correspond to each hex too.
And better yet if you could selectively choose which settlements/cities will produce during your turn, without including other settlements/cities that may share a hex.

PLEASE IMPLEMENT THIS SUPERIOR VARIANT!!!!!
But what if my choices don't end up equally distributed?
Evidence you're not playing randomly. Scandalous!
Somehow these complaints all tend to be about the Catan base game. At least with Cities & Knights they could point to a real reason why the dice would be a little skewed: the Alchemist.
RamblinAspie
Posts: 8
Joined: 11 February 2026, 10:25

Re: change the dice generator.

Post by RamblinAspie »

Have you written a better one they could use instead?
User avatar
Jellby
Posts: 3546
Joined: 31 December 2013, 12:22

Re: change the dice generator.

Post by Jellby »

Suoivax wrote: 20 February 2026, 23:50 But what if my choices don't end up equally distributed?
It's not about randomness, it's about having fun :D
User avatar
Deckeon
Posts: 17
Joined: 03 May 2024, 19:59

Re: change the dice generator.

Post by Deckeon »

Sorry about rezing the other thread, I found that in a large search on this subject across BGA forums.
That one is the closest to explaining a terrible flaw in random numbers on BGA.

The problem is not the averages or "fairness" or whatever and yes it all evens out, HOWEVER, for many games it does make the game moot. a simple Win/lose at times, so it is damaging.

I think games with multiple 6 "sided" dice are far less affected since the problem is "runs" of same number.

However 111 means you rolled a 2 and at most a 7 on two dice rolls, or 12 and at least a 7 (with 666), so it can be noticeable (and infuriating to prove) in these games.

In GMT games ( Such as Space Empires) however, it is shockingly noticeable. the triple number runs on d10s are GLARINGLY OBVIOUS. Certainly way the hell out of the 1in1000 chance. 111 and 000(101010) are when you really get jarred (particularly if it happens twice or more in a game), however these runs can happen to any of the 10 numbers.

I have no idea why this happens but it is not statistically probable. Not runs of 3s same number in a row, like this, this often. (sometimes 4s of course but I think one of the numbers was a "normal" 1/10).

I don't have enough data to assume it is three number in a row or just two in a row - with the third being more random - that is possible. Certainly numbers are stringing too often though.
User avatar
Jontia
Posts: 236
Joined: 06 March 2014, 22:59

Re: change the dice generator.

Post by Jontia »

Deckeon wrote: 26 February 2026, 19:17 That one is the closest to explaining a terrible flaw in random numbers on BGA.

The problem is not the averages or "fairness" or whatever and yes it all evens out, HOWEVER, for many games it does make the game moot. a simple Win/lose at times, so it is damaging.

...

I don't have enough data to assume it is three number in a row or just two in a row - with the third being more random - that is possible. Certainly numbers are stringing too often though.
There is no flaw.

That's how randomness works.

They're not stringing together too often.
User avatar
Suoivax
Posts: 345
Joined: 13 April 2022, 00:27

Re: change the dice generator.

Post by Suoivax »

Deckeon wrote: 26 February 2026, 19:17 Sorry about rezing the other thread, I found that in a large search on this subject across BGA forums.
That one is the closest to explaining a terrible flaw in random numbers on BGA.

The problem is not the averages or "fairness" or whatever and yes it all evens out, HOWEVER, for many games it does make the game moot. a simple Win/lose at times, so it is damaging.

I think games with multiple 6 "sided" dice are far less affected since the problem is "runs" of same number.

However 111 means you rolled a 2 and at most a 7 on two dice rolls, or 12 and at least a 7 (with 666), so it can be noticeable (and infuriating to prove) in these games.

In GMT games ( Such as Space Empires) however, it is shockingly noticeable. the triple number runs on d10s are GLARINGLY OBVIOUS. Certainly way the hell out of the 1in1000 chance. 111 and 000(101010) are when you really get jarred (particularly if it happens twice or more in a game), however these runs can happen to any of the 10 numbers.

I have no idea why this happens but it is not statistically probable. Not runs of 3s same number in a row, like this, this often. (sometimes 4s of course but I think one of the numbers was a "normal" 1/10).

I don't have enough data to assume it is three number in a row or just two in a row - with the third being more random - that is possible. Certainly numbers are stringing too often though.
dude, that is how randomness works, clumps and streaks happen.
User avatar
Deckeon
Posts: 17
Joined: 03 May 2024, 19:59

Re: change the dice generator.

Post by Deckeon »

This seems to be what can happen (some time? all the time? I dont know...).

https://stackoverflow.com/questions/945 ... -every-run
User avatar
Deckeon
Posts: 17
Joined: 03 May 2024, 19:59

Re: change the dice generator.

Post by Deckeon »

Someone posted BGA uses rand() int and after reading up on it, I am convinced BGA needs to create a new "seed" before every call of that function.

It is NOT random it is specifically pseudo random and this is actually a common problem with the function (unprobable combos/runs of numbers and the fix is to keep changing the "seed" it calls from:

"Improving Randomness
To enhance the randomness of outputs from rand(), consider the following:

Use a Better Seed: Ensure that the seed used for the random number generator is varied, such as using the current time or other changing values.
Switch to a Different Algorithm: Some programming languages offer alternative random number generators that may provide better randomness characteristics.
Cryptographically Secure Generators: For applications requiring high levels of unpredictability, consider using cryptographically secure random number generators (CSPRNGs) that are designed to produce more random output"
User avatar
euklid314
Posts: 679
Joined: 06 April 2020, 22:56

Re: change the dice generator.

Post by euklid314 »

Deckeon wrote: 27 February 2026, 03:08 Someone posted BGA uses rand() int and after reading up on it, I am convinced BGA needs to create a new "seed" before every call of that function.

It is NOT random it is specifically pseudo random and this is actually a common problem with the function (unprobable combos/runs of numbers and the fix is to keep changing the "seed" it calls from:

"Improving Randomness
To enhance the randomness of outputs from rand(), consider the following:

Use a Better Seed: Ensure that the seed used for the random number generator is varied, such as using the current time or other changing values.
Switch to a Different Algorithm: Some programming languages offer alternative random number generators that may provide better randomness characteristics.
Cryptographically Secure Generators: For applications requiring high levels of unpredictability, consider using cryptographically secure random number generators (CSPRNGs) that are designed to produce more random output"
Read the FAQ and dont cite some random anonymous user with false claims: BGA does not use rand() but they use the cryptographically secure PHP function random_int().

There is no problem with this function and even rand() would absolutely have been good enough for such a simple application as in BGA games - despite the well-documented drawbacks of rand() which do not exist with random_int().

You complain about repeated dice outcomes but you do not give data. If I understand correctly, in "Space Empires" you roll 10sided dice. There is a 1/100 chance of a 3-fold repetition (or a 1/1000 chance of a specific number repeating 3-fold, e.g. 2-2-2). Since this is a rare event you need quite some games (how often are these dice rolled per game?) to analyze.

Please note that rare events cluster if they are random, i.e., several of them may happen in a short time span and then they will not happen for a long time. If a 1/100 event happens exactly once in a 100 time span it is *not* random!
Last edited by euklid314 on 27 February 2026, 15:50, edited 1 time in total.
User avatar
Jellby
Posts: 3546
Joined: 31 December 2013, 12:22

Re: change the dice generator.

Post by Jellby »

Please note: real, physical dice (or deck shuffling, for that matter) are NOT random, they follow the deterministic laws of physics. Whether or not RNG is truly random is therefore irrelevant.
Post Reply

Return to “Catan”