Dice rolling does not seem random

Forum rules
Please DO NOT POST BUGS on this forum. Please report (and vote) bugs on : https://boardgamearena.com/bugs
User avatar
internetfloozy
Posts: 8
Joined: 22 February 2021, 18:52

Dice rolling does not seem random

Post by internetfloozy »

The amount of times my rolling seems way more programmed then random is mind boggling.

8-10-10-10-8, my most recent example, is not even close to random.

Does each dev make the dice rolling code on their own or is that code just available and shared across all games?
Attachments
IMG_20220717_152039.jpg
IMG_20220717_152039.jpg (286.12 KiB) Viewed 2183 times
User avatar
Jellby
Posts: 1343
Joined: 31 December 2013, 12:22

Re: Dice rolling does not seem random

Post by Jellby »

8 0 0 0 8 looks pretty random to me. Would you say 1 5 3 2 4 is more random? or 3 3 3 3 3?

My bank's website generates a "random" code every time I want to log in. About 90% of the times I can "clearly" seem some pattern in the random numbers. My point is that (a) we are not designed to evaluate randomness, so don't trust your feelings; and (b) a much larger sample of dice rolls is needed to say anything about it. The probability of a sequence X Y Y Y X in a 10-sided die roll is about 1 in 1000, if I'm not mistaken, which is not too crazy. Now, if you find this same sequence in 10 consecutive games, I could begin to be suspicious...
User avatar
Lunalol
Posts: 443
Joined: 09 October 2016, 23:21

Re: Dice rolling does not seem random

Post by Lunalol »

Nth post on the same topic.
"not even close to random", this sentence means nothing, do you know what random is ? 1 1 1 1 1 is random ! 1 2 3 4 5 6 too !
So, I warn right away, there is no point in continuing.
Good game.
User avatar
mwauters92
Posts: 1
Joined: 03 April 2020, 20:18

Re: Dice rolling does not seem random

Post by mwauters92 »

Being frustrated by very poor combat performances, I wanted to check if my dice rolls were indeed biased toward higher numbers. Turned out they were not.
I checked all dice throws in a solo match against Doomsday machines and out of a total 140 rolls, the average is 5.53 and the standard deviation 2.76. The ideal values for a uniform random distribution are 5.5 and 2.89, so the dice rolls of my match are rather close to that.
tarkalak
Posts: 26
Joined: 25 March 2022, 19:58

Re: Dice rolling does not seem random

Post by tarkalak »

Out of the dozens of games I played here, there is one that I lost directly from a few bad rolls in a large equal battle. Which is pretty normal, I think.

In some games my opponents blamed bad luck, but I don't think it was detrimental. I.e. with better luck on their side I would still have more and/or better stuff to throw at them.

You will remember only the bad moments like this. You will not remember all the better rolls when it didn't really matter.

I had written in the "Strategy Tips" a guide to approximately determine your odds, and if you had the worst odds, it is very likely that you were going to lose anyway.
User avatar
Dennis W
Posts: 42
Joined: 21 February 2022, 19:48

Re: Dice rolling does not seem random

Post by Dennis W »

It's Occam's Razor for me. RNG's are not overly difficult to code and very easy to check w/math like the examples above. Why would Dev purposefully leave in bad code to randomly screw players? He's done great work and should be proud of the result that many of us enjoy.

What would be the point of sabotaging his own code?

You play enough and roll enough dice and you will see it all. (SFB anyone?) The posted screenshot of misses pales in comparison to what an opponent suffered this weekend in a game. He missed 17 out of 17 (3's and 4's mostly) rolls in the first two rounds. I felt horrible for him but he just said "Well, this is going to be a struggle now'. I'm a hothead and would have been raging at my luck - but now I have an example to follow to keep my cool.
User avatar
Lunalol
Posts: 443
Joined: 09 October 2016, 23:21

Re: Dice rolling does not seem random

Post by Lunalol »

What would be the point of sabotaging his own code?
It's why I have nuclear weapons in Unconditional Surrender! 8-)
gabriellewhite
Posts: 2
Joined: 07 June 2023, 13:19
Location: London

Re: Dice rolling does not seem random

Post by gabriellewhite »

To answer your question, each game developer can make their own dice rolling code or they can use pre-existing libraries. However, just because a game uses a pre-existing library doesn't necessarily mean that it's going to be completely random. There can still be bugs or other factors that impact the randomness of the rolls. One option you might want to check out https://flipsimu.com, a website that uses a physics-based simulation to generate random dice rolls. It might be worth giving it a try to see if it feels more random than the dice rolling code in the games you've been playing.
Last edited by gabriellewhite on 09 June 2023, 08:24, edited 1 time in total.
User avatar
Lunalol
Posts: 443
Joined: 09 October 2016, 23:21

Re: Dice rolling does not seem random

Post by Lunalol »

each game developer can make their own dice rolling code or they can use pre-existing libraries
No, each developer use SAME random function 8-)
As of now, bga_rand is based on the PHP function "random_int", which ensures a cryptographic level of randomness.
In particular, it is mandatory to use it for all dice throw (ie: games using other methods for dice throwing will be rejected by BGA during review).
that it's going to be completely random
what is completely random ????
Oh, perhaps it is that : https://hitchhikers.fandom.com/wiki/Inf ... lity_Drive
There can still be bugs or other factors that impact the randomness of the rolls.
?????
tarkalak
Posts: 26
Joined: 25 March 2022, 19:58

Re: Dice rolling does not seem random

Post by tarkalak »

gabriellewhite wrote: 07 June 2023, 13:20 To answer your question, each game developer can make their own dice rolling code or they can use pre-existing libraries. However, just because a game uses a pre-existing library doesn't necessarily mean that it's going to be completely random. There can still be bugs or other factors that impact the randomness of the rolls. One option you might want to check out https://flipsimu.com, a website that uses a physics-based simulation to generate random dice rolls. It might be worth giving it a try to see if it feels more random than the dice rolling code in the games you've been playing.
Whatever algorithm for randomness is used it will throw out usual results that someone will percive as unusual. And someone will feel butthurt. It is definitely the same as using real dice.
Post Reply

Return to “Space Empires: 4X”