So I made the effort to use BGA Studio and the same php random functions that are available to all developers that create games on this site, running test code on the same servers.SluggerBaloney wrote: ↑21 May 2020, 16:15 Seriously, just quit. The results are so hilariously biased, it's not even a game at this point.
500,000 samples of each function:
php: rand()
php: random_int()
bga_rand() that apparently is based on random_int()
All of the files: http://www.filedropper.com/bgarand
I used the ent program used accoring to this paper, coming from random.org.
https://www.random.org/analysis/Analysis2001.pdf
The statistical analysis program used:
http://www.fourmilab.ch/random/
The results:
C:\Users\dudealert\Documents\BGA\random>ent php_rand.bin
Entropy = 7.999661 bits per byte.
Optimum compression would reduce the size
of this 500000 byte file by 0 percent.
Chi square distribution for 500000 samples is 234.61, and randomly
would exceed this value 81.55 percent of the times.
Arithmetic mean value of data bytes is 127.4652 (127.5 = random).
Monte Carlo value for Pi is 3.144012576 (error 0.08 percent).
Serial correlation coefficient is -0.000040 (totally uncorrelated = 0.0).
C:\Users\dudealert\Documents\BGA\random>ent php_random_int.bin
Entropy = 7.999609 bits per byte.
Optimum compression would reduce the size
of this 500000 byte file by 0 percent.
Chi square distribution for 500000 samples is 270.36, and randomly
would exceed this value 24.31 percent of the times.
Arithmetic mean value of data bytes is 127.6915 (127.5 = random).
Monte Carlo value for Pi is 3.136572546 (error 0.16 percent).
Serial correlation coefficient is -0.000604 (totally uncorrelated = 0.0).
C:\Users\dudealert\Documents\BGA\random>ent bga_rand.bin
Entropy = 7.999635 bits per byte.
Optimum compression would reduce the size
of this 500000 byte file by 0 percent.
Chi square distribution for 500000 samples is 252.83, and randomly
would exceed this value 52.66 percent of the times.
Arithmetic mean value of data bytes is 127.3624 (127.5 = random).
Monte Carlo value for Pi is 3.150780603 (error 0.29 percent).
Serial correlation coefficient is 0.002800 (totally uncorrelated = 0.0).