Who programmed the dice?

Forum rules
Please DO NOT POST BUGS on this forum. Please report (and vote) bugs on : https://boardgamearena.com/bugs
User avatar
Maya-Neko
Posts: 3
Joined: 02 May 2024, 23:48

Re: Who programmed the dice?

Post by Maya-Neko »

BusterVA wrote: 27 February 2024, 00:09 The truth is, random numbers generated by computers is literally impossible. Computers follow rules. The same is in generating random numbers. They require a seed - replicate the seed and you get the same number over and over for instance.

They can be made to appear random, but true randomness is impossible for a computer.
RNGs cycle through so many different iterations of each seed and there are so many different seeds these days, that it doesn't matter to board games. since we're talking about int-values, the chances of hitting the same seed again is ~ 1:4 billion and hitting a specific sequence in said RNG-sequence isn't much better. If we assume 100 dice rolls on average per game, then we could easily play a quadrillion games before we even need to worry about repeating sequences and that only, if we can fully remember every single sequence over the course of these games (and good luck living 9 trillion years of continuous playing 24/7 to even hit that point)

And on top of that, "feeling" something to be wrong isn't really helping anybody to process (pseudo)-randomness. Our mind is primed to reinforce bad feelings, so obviously remembering the cases, where the bandit gets send to a specific place and the RNG randomly spits out the like 1 / 9 chance of hitting the same number of the bandits place is way easier than remembering the 8 / 9 times, where the game keeps running normally and you probably didn't even realized like half the time, where the bandit moved to before your dice roll
William Oilaven
Posts: 9
Joined: 05 August 2023, 21:36

Re: Who programmed the dice?

Post by William Oilaven »

Unless they show us the exact code used in the game we can guess all we want.

Initially I also got the feeling the dice were not truely random. Especially because I played Catan for years on Asobrain, with the C&K expansion. It displayed the dice roll statistics during the entire game, and everytime you would see the odds even out towards the end of the game. It felt natural, 6 and 8 always being the best spots, usually 7 being rolled most often... here on BGA you can get the best starting positions "on paper" and still lose by miles.

But, the major difference is that I always played C&K on Asobrain. It has more game mechanics that slow down the faster / luckier players, and need 13, 15 or 17 points to win. These games were usually a lot longer (in turns per game, not in time because the interface was much more playable). And the longer the game, the more dice rolls to even out the odds.

Consider this code (which should have the same randomness as the Catan game code here on BGA unless there really is something wrong), if you run it with 300 dice rolls, usually 7 is rolled most often, followed by 6 and 8, and so on. If you run it with 60 rolls (a realistic game length in basic Catan), the odds are often more off than what would "feel" right. I ran it a few times with 60 rolls, one time 7 was rolled only 4 times, sometimes 9 was rolled more often than 6/7/8, another time 10 wasn't rolled at all.

Code: Select all

//JS
let run = ( gameLength ) => {
  let numbers = {2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0};
  for (let i=0; i<gameLength; i++) {
    let roll = Math.ceil(Math.random()*6)+Math.ceil(Math.random()*6);
    numbers[roll]++;
  } 
  return numbers;
}
May I suggest the developer to first publish the codepiece that decides the dice roll, to give us peace of mind and make us sleep a little better when we lose the game because of weird dice roll stats.

And after that, perhaps implement the C&K (and seafarers while you're at it) expansion(s). And maybe a smoother ui.
User avatar
euklid314
Posts: 679
Joined: 06 April 2020, 22:56

Re: Who programmed the dice?

Post by euklid314 »

How BGA treats random events is covered in BGA's FAQ.

As an example, the developer of Backgammon gave his code:
// Roll dices
$dice1_value = bga_rand(1, 6);
$dice2_value = bga_rand(1, 6);

It is not rocket science - everybody who chooses to may still be fighting with their peace of mind and may miss their good sleep...
User avatar
Jellby
Posts: 3544
Joined: 31 December 2013, 12:22

Re: Who programmed the dice?

Post by Jellby »

William Oilaven wrote: 04 May 2024, 22:59 Unless they show us the exact code used in the game we can guess all we want.
Even then, people would claim that that's not the real code used, that there are hidden variables or that they replaced the random function with something else.
everytime you would see the odds even out towards the end of the game. It felt natural, 6 and 8 always being the best spots, usually 7 being rolled most often...
Which makes one suspect that perhaps that other site was not using random dice, but some kind of tweaked system. If it feels natural, it's (probably) not random :D
User avatar
Maya-Neko
Posts: 3
Joined: 02 May 2024, 23:48

Re: Who programmed the dice?

Post by Maya-Neko »

William Oilaven wrote: 04 May 2024, 22:59 Consider this code (which should have the same randomness as the Catan game code here on BGA unless there really is something wrong), if you run it with 300 dice rolls, usually 7 is rolled most often, followed by 6 and 8, and so on. If you run it with 60 rolls (a realistic game length in basic Catan), the odds are often more off than what would "feel" right. I ran it a few times with 60 rolls, one time 7 was rolled only 4 times, sometimes 9 was rolled more often than 6/7/8, another time 10 wasn't rolled at all.
That's just how the bell curve works or statistics in general. The less rolls you do, the more likely it is to have a more extreme outcome. If you get even results even with low amounts of rolls most of the time, then that's actually a reason to look into why that happens, as that doesn't "feel" like the math is mathing properly.
User avatar
Ila_Cazeta
Posts: 1
Joined: 06 February 2024, 19:00

Re: Who programmed the dice?

Post by Ila_Cazeta »

It’s obvious that the dice rolls often aid the player ahead of the game to finish it faster or the newer players…

I played a game where the newer player (it was his second game of Catan) had 1 point to make to win… he could only place cities and he had number 2 for ore and number 3 for wheat.. guess what were the last couple of rolls before the newer player won the game??
Yes my friends the 2 and the 3 one after the other.


Catan is one of my favourite games on here and I’m utterly disappointed with the dice!
User avatar
Jellby
Posts: 3544
Joined: 31 December 2013, 12:22

Re: Who programmed the dice?

Post by Jellby »

Ila_Cazeta wrote: 13 May 2024, 08:22 It’s obvious that the dice rolls often aid the player ahead of the game to finish it faster or the newer players…
... or the premium player, or the green player, or the highest-ranked player, or the lowest-ranked player... In sum, it's obvious that the dice rolls often aid some player. I agree :D
User avatar
vegasjj
Posts: 3
Joined: 23 June 2013, 14:23

Re: Who programmed the dice?

Post by vegasjj »

Appears the dice totals equal 100 rolls to me- and with zero 8s. Very broken system indeed
cowboy_dan
Posts: 74
Joined: 10 May 2015, 22:56

Re: Who programmed the dice?

Post by cowboy_dan »

vegasjj wrote: 14 May 2024, 21:32 Appears the dice totals equal 100 rolls to me- and with zero 8s. Very broken system indeed
The end game stats show the percentage of rolls that were each number, so they will add up to ~100. However, the number of rolls is lower, you can find that by adding up the # of turns for each player.
User avatar
Nekojin
Posts: 121
Joined: 28 March 2024, 01:21

Re: Who programmed the dice?

Post by Nekojin »

BusterVA wrote: 27 February 2024, 00:09 The truth is, random numbers generated by computers is literally impossible. Computers follow rules. The same is in generating random numbers. They require a seed - replicate the seed and you get the same number over and over for instance.

They can be made to appear random, but true randomness is impossible for a computer.
They cannot be truly random, that is true, but they can be sufficiently random as to be indistinguishable in play from true randomness. Take, for example, poker. That only deals with 52 values at a time. A randomness generator that has a sequential loop around the 1000th decimal place is too random to be detectable and trackable. (and note that recursion after only 1000 places is absurdly low for a randomizer.)

The human mind is really, REALLY good at picking up patterns... even when there's not actually a pattern occurring.
Post Reply

Return to “Catan”