Which are absolutely bugs and should be (and have been) reported. Though, those kind of bugs still randomly favour different players, you still have to get "lucky" for them to fall in your favour.Jellby wrote: ↑18 July 2024, 14:01 Even if it's just calls to random functions, they could find things like:But most likely, they'll just claim that's not the real code.
- Rolling two 6-sided dice instead of one 12-sided die. Or getting a random number between 2 and 12, instead of a random number from 1 to 12. (https://boardgamearena.com/bug?id=130393)
- Selecting one random number between 1 and 5, and using that number for every card, instead of letting players choose a different number for each card(https://boardgamearena.com/forum/viewto ... 83#p126183)
Source Code
Forum rules
Warning: challenging a moderation in Forum = 10 days ban
More info & details about how to challenge a moderation: viewtopic.php?p=119756
Warning: challenging a moderation in Forum = 10 days ban
More info & details about how to challenge a moderation: viewtopic.php?p=119756
Re: Source Code
Re: Source Code
Thank you for that. MT19937 has a period of 2^19937-1, which means that it could take octillions* of numbers before it starts repeating itself. This is vastly more than a simple dice-roller like Catan would need, and is even robust enough to generate a few billion games of Terraforming Mars in sequence before a trackable and exploitable repetition could be found. And, of course, all of these games are not generated in sequence, each game has its own seed.
* I may be off by a few (million) orders of magnitude on this. There are no online calculators that can explain that period in a long-form number.
Re: Source Code
This person asked nicely for help in where to see the source code. They even voiced their concern only after they were asked.
Asking for source and then actually looking at it is the absolutely best thing one can do when having doubts about something. It deserves respect. No need to bash them or assume their reaction while they didn't even have a chance to do their digging.
Asking for source and then actually looking at it is the absolutely best thing one can do when having doubts about something. It deserves respect. No need to bash them or assume their reaction while they didn't even have a chance to do their digging.
Check out the Allround-League: https://boardgamearena.com/group?id=7870115 --> a league where you have matches of random games vs. other players in your group. Season 9 registration oct. '25.
Re: Source Code
Another possible thing maveleo might find is code that chooses an index for
[ (1,1) , (1,2) , (2,2) , (1,3) , (2,3) , (3,3) , (1,4) , (2,4) , (3,4) , (4,4) , (1,5) , (2,5) , (3,5) , (4,5) , (5,5) , (1,6) , (2,6) , (3,6) , (4,6) , (5,6) , (6,6) ]
, rather than choosing from (1,2,3,4,5,6) twice independently.
(Such code being used would mean the claims of too-many-doubles were accurate.)
[ (1,1) , (1,2) , (2,2) , (1,3) , (2,3) , (3,3) , (1,4) , (2,4) , (3,4) , (4,4) , (1,5) , (2,5) , (3,5) , (4,5) , (5,5) , (1,6) , (2,6) , (3,6) , (4,6) , (5,6) , (6,6) ]
, rather than choosing from (1,2,3,4,5,6) twice independently.
(Such code being used would mean the claims of too-many-doubles were accurate.)
Re: Source Code
Silene wrote: ↑18 July 2024, 19:27 This person asked nicely for help in where to see the source code. They even voiced their concern only after they were asked.
Asking for source and then actually looking at it is the absolutely best thing one can do when having doubts about something. It deserves respect. No need to bash them or assume their reaction while they didn't even have a chance to do their digging.
Code: Select all
$armory_choice_key = bga_rand( 0, count( $armory_choices ) -1 );- Meeplelowda
- Posts: 3836
- Joined: 14 March 2020, 10:31
Re: Source Code
Was this ever actually done in a game, or is it just theoretically a mistake someone could make?Gulchen wrote: ↑18 July 2024, 20:09 Another possible thing maveleo might find is code that chooses an index for
[ (1,1) , (1,2) , (2,2) , (1,3) , (2,3) , (3,3) , (1,4) , (2,4) , (3,4) , (4,4) , (1,5) , (2,5) , (3,5) , (4,5) , (5,5) , (1,6) , (2,6) , (3,6) , (4,6) , (5,6) , (6,6) ]
, rather than choosing from (1,2,3,4,5,6) twice independently.
(Such code being used would mean the claims of too-many-doubles were accurate.)
Play Now lobby 4ever! https://boardgamearena.com/lobby
Re: Source Code
It is just theoretically a mistake someone could make.Meeplelowda wrote: ↑18 July 2024, 23:04Was this ever actually done in a game, or is it just theoretically a mistake someone could make?
Re: Source Code
The problem with this sort of thing is that it is a combination of ignorant and insulting to those of us who are developers and have spent years carefully making the various game modules on here.
If someone truly, in good faith, is interested in double checking the dice code for a certain game, they could say "May I please see the dice code for Go Goa? I understand curve-fitting, have basic knowledge of statistics, and basic understanding of source code."
Someone might say "I played 5 games, carefully recorded the dice rolls for each, and the after applying a curve fitting check, it does not fit within reasonable margin."
In that case, I could say "Sure, here you go:"
Code: Select all
$new_dice_values = [];
$new_dice_values[] = bga_rand(1, 6);
$new_dice_values[] = bga_rand(1, 6);
$new_dice_values[] = bga_rand(1, 6);
But the problem is, users almost never do this. Instead, threads go down rabbit holes, e.g. suggesting "Here is some mistake which might theoretically be made." Not because they have a careful summary of dice rolls in 10 consecutive games, not because they have seen the source code, but because they have a feeling.
Sure, in THEORY someone might implement XKCD's getRandomNumber() function https://xkcd.com/221/ or any other silly approach, but they almost certainly haven't.
And above all, when some of us are spending literally years carefully adjusting every detail of a game implementation, it is tremendously draining to attempt to convince someone of basic source code functionality when they likely do not have the background, domain knowledge, or attitude where it would make a meaningful difference.
This is why these threads are largely ignored. Because I know my code has bga_rand(1, 6), and you know it does, and suggesting something is still wrong with this carries a very high burden of proof.
Re: Source Code
This is the thing - devs (usually) put a lot of work into making sure games work properly, and appropriate randomness is a big part of that. Most complaints tend to stem from one or maybe a few games where a user FEELS they've been unlucky, or another player has been too lucky. There's no attempt to record data objectively, even though that's the next logical step if you think there's an actual issue. To not put at least that work in can feel frustrating and disrespectful to the devs who put in all that hard work implementing the game for you.
Spoken as someone who has never developed a game for BGA, but is a developer in the real world, and still gets frustrated by people who don't appreciate the complexity of the job and the pride that (good) devs take in their work. Not saying there aren't lazy and/or bad devs, but like most professions, they're usually the exception.
Spoken as someone who has never developed a game for BGA, but is a developer in the real world, and still gets frustrated by people who don't appreciate the complexity of the job and the pride that (good) devs take in their work. Not saying there aren't lazy and/or bad devs, but like most professions, they're usually the exception.