Is the code available to review?

Forum rules
Please DO NOT POST BUGS on this forum. Please report (and vote) bugs on : https://boardgamearena.com/#!bugs
User avatar
Jest Phulin
Posts: 1856
Joined: 08 July 2013, 21:50

Re: Is the code available to review?

Post by Jest Phulin »

SluggerBaloney wrote: 20 May 2020, 20:58 All the code does is tell PHP to generate a seed, then the middleware layer passes that seed to the server OS's function for generating random numbers, and recieves the result from that call.

It's just where the seed is getting generated. I guess you could look to see if they are calling random_int() 4 separate times to generate 4 different seeds or once as an array and not re-seeding,
random_int() doesn't take a seed. https://www.php.net/manual/en/function.random-int.php Being a system call on Linux systems it uses environmental factors to generate the seed.
The only way to even attempt a seeding is through mt_srand(). https://www.php.net/manual/en/function.mt-srand.php Not only would this have been an extra step, it would be known that this would make the possibility of prediction higher.
User avatar
Jest Phulin
Posts: 1856
Joined: 08 July 2013, 21:50

Re: Is the code available to review?

Post by Jest Phulin »

RicardoRix wrote: 20 May 2020, 21:18 So we have one of you complaining about falling down too often, and another posting all of his lucky opponents storming to victory. The two ends of the luck spectrum - combine your findings and your back to the law of averages. Both can't be true.
<sarcasm>
Oh, you forgot the main problem with the RNG, Ricardo. The bit where the developer spent extra time to check who was playing, and bias the game against new and non-premium members :)
</sarcasm>
User avatar
47878478645674
Posts: 18
Joined: 13 May 2020, 15:45

Re: Is the code available to review?

Post by 47878478645674 »

Player wins in two moves! I will post as new thread as well as this proves number generator is broken ...

The end of the game: Poxe-le-terrible wins!
Replay the game

Poxe-le-terrible wins column 8
Poxe-le-terrible wins column 7
Poxe-le-terrible chooses to stop
Poxe-le-terrible progresses on column 7
Poxe-le-terrible progresses on column 7
Poxe-le-terrible progresses on column 7
Poxe-le-terrible progresses on column 5
Poxe-le-terrible progresses on column 5
Poxe-le-terrible progresses on column 5
Poxe-le-terrible progresses on column 7
Poxe-le-terrible progresses on column 8
Pastor Flapps is unable to continue and loses any progress made this turn!
Pastor Flapps progresses on column 7
Pastor Flapps progresses on column 7
10:39
Pastor Flapps progresses on column 8
Pastor Flapps progresses on column 7
Pastor Flapps progresses on column 8
Pastor Flapps progresses on column 8
Pastor Flapps progresses on column 5
Pastor Flapps progresses on column 7
Pastor Flapps progresses on column 7
Pastor Flapps progresses on column 7
Pastor Flapps progresses on column 8
Pastor Flapps progresses on column 8

Poxe-le-terrible wins column 6
Poxe-le-terrible chooses to stop
Poxe-le-terrible progresses on column 8
Poxe-le-terrible progresses on column 8
Poxe-le-terrible progresses on column 6
Poxe-le-terrible progresses on column 8
Poxe-le-terrible progresses on column 7
Poxe-le-terrible progresses on column 6
Poxe-le-terrible progresses on column 8
Poxe-le-terrible progresses on column 7
Poxe-le-terrible progresses on column 6
Poxe-le-terrible progresses on column 8
Poxe-le-terrible progresses on column 7
Poxe-le-terrible progresses on column 6
10:38
Poxe-le-terrible progresses on column 7
Poxe-le-terrible progresses on column 8
Poxe-le-terrible progresses on column 7
Poxe-le-terrible progresses on column 6
Poxe-le-terrible progresses on column 6
Poxe-le-terrible progresses on column 7
Poxe-le-terrible progresses on column 8
Poxe-le-terrible progresses on column 6
Poxe-le-terrible progresses on column 7
Poxe-le-terrible progresses on column 6
Poxe-le-terrible progresses on column 7
Poxe-le-terrible progresses on column 8
Poxe-le-terrible progresses on column 6
Poxe-le-terrible progresses on column 8
Poxe-le-terrible progresses on column 7
Poxe-le-terrible progresses on column 8
Poxe-le-terrible progresses on column 6
Poxe-le-terrible progresses on column 6
User avatar
RicardoRix
Posts: 2540
Joined: 29 April 2012, 23:43

Re: Is the code available to review?

Post by RicardoRix »

17 shakes on 6,7,8 to progress = (0.92) ^ 17 = 24%
User avatar
SluggerBaloney
Posts: 83
Joined: 07 February 2020, 14:26

Re: Is the code available to review?

Post by SluggerBaloney »

Deleted
Last edited by SluggerBaloney on 12 January 2024, 16:47, edited 2 times in total.
User avatar
RicardoRix
Posts: 2540
Joined: 29 April 2012, 23:43

Re: Is the code available to review?

Post by RicardoRix »

Yes, I think everyone is aware of the computer pseudo random debate which is why it's not termed like that, and everyone just uses the term random number even if it strictly isn't.
BGA didn't develop the RNG. They call a PHP function, which was developed by the creators of PHP, and that in turn calls an OS function, which was created by the developers of the OS. The games code has no impact on the result.
BGA did develop the bga_rand function, that you will not be able to see the code for, and you will not know exactly how it's generated. And is very likely used for Can't Stop. Psuedo random or not, passes every kind of statistical test as described here: https://www.random.org/analysis/
SluggerBaloney wrote: 21 May 2020, 14:28
RicardoRix wrote: 20 May 2020, 21:18 You can if you like make a BGA studio account and make a test project. And then do any statistical test you like which will be running on the same game servers.
Again, since the random number is generated by the OS and nothing on the PHP side, there's no point in talking about the game code at all. It's like complaining to the car dealer about the engine in your new car. They didn't build it, the manufacturer did. They just packaged it up and sold it to you.
Why is there no point talking about the game code.. This is the very thing you are questioning, and in the OP what you want to see...?

At suggested, you have the same resources available (BGA Studio) as is used for Can't stop. PHP game code is still php game code whether you use the Studio or not, and it will be running on the same sever(s). Let's see your findings...
SluggerBaloney wrote: 21 May 2020, 14:28
17 shakes on 6,7,8 to progress = (0.92) ^ 17 = 24%
So if you get 6, 7, and 8, you should be able to get 17 successfully rolls roughly 1 out of every 4 times you try? That is laughably inaccurate in the playing of the actual game. I've never done that or seen that done, not once, and I'm elite status with hundreds of games and thousands of rolls between me and opponents rolling 6,7,and 8. It's astonishing how much people can fervently believe things are random that are known to not be.
If it's wrong, then let's see your probability calculation....

Also something you're yet to speculate. How does the randomness skew help to obtain the actual combinations of 6,7,8? A moment ago you were complaining about triples. This is another thing you can prove in the BGA Studio or indeed any coding language. We're all ears.
User avatar
SluggerBaloney
Posts: 83
Joined: 07 February 2020, 14:26

Re: Is the code available to review?

Post by SluggerBaloney »

Deleted
Last edited by SluggerBaloney on 12 January 2024, 16:48, edited 2 times in total.
User avatar
Jest Phulin
Posts: 1856
Joined: 08 July 2013, 21:50

Re: Is the code available to review?

Post by Jest Phulin »

SluggerBaloney wrote: 21 May 2020, 15:49 You can't prove something by looking at the results.
Uh, how else is experimental science supposed to progress?

Physical dice are also pseudo random generators, just less so than computer dice.

In a computer, number is given to an algorithm that manipulates it and returns a number. The given number is the seed, the returned number is called the random number. If the same seed is given, the same number will be returned. For most computing, the initial seed is in the 32-bit range (about 4 billion possibilities). Most computer people understand this.

Physical dice obey the laws of physics. If I drop a die from a precise angle at a precise distance onto a surface, then do it again (with no structural changes to the surface or the die), air currents are the exact same, temperature at the exact same, etc., the result will be the same. In the physical world there are a greater number of variables to keep exactly the same, (definitely more than 4 billion) but the results are still determined by physical laws.

So, the question becomes what is random, and does a computer's pseudo-random number generator supply these?

There are two factors for this. 1-Even probability of a given result. 2-Inability to predict the result.

I have yet to see where anyone has stated that either of these is not being satisfied.
User avatar
RicardoRix
Posts: 2540
Joined: 29 April 2012, 23:43

Re: Is the code available to review?

Post by RicardoRix »

SluggerBaloney wrote: 21 May 2020, 15:49 Thats PHP code, not BGA code, which is the whole point I am making as to why this is a moot topic now.
BGA code is PHP code written by the BGA team. It will be written in the PHP language. There is no distinction.

You are free to start a new test project in BGA Studio and test anything you like:
bga_rand(), rand_int(), whatever.
If you can come up with a test for one RNG, then it shouldn't be too hard to generate for another.
The only fact we know is that a true random number is NOT being generated
And how do you know that? You're not back to the pseudo random argument again. As Jest above suggests the proof is in the pudding. If it passes statistical tests then it must be good to use.

Even it it wasn't correct, what would you suggest BGA to use? And how would you determine if that was really random. I think you've fallen down a hole here.
Last edited by RicardoRix on 21 May 2020, 16:44, edited 2 times in total.
User avatar
SluggerBaloney
Posts: 83
Joined: 07 February 2020, 14:26

Re: Is the code available to review?

Post by SluggerBaloney »

Deleted
Last edited by SluggerBaloney on 12 January 2024, 16:49, edited 2 times in total.
Post Reply

Return to “Can't Stop”