(no title)
archargelod | 1 month ago
This sample size is really small. I ran 100 million simulations in Nim[0] (takes around a minute). And distribution converges toward 9.09% on all positions equally:
Average turns: 65.99609065001634
Final position distribution:
4: 9.095%
11: 9.093%
7: 9.091%
3: 9.091%
10: 9.090%
9: 9.090%
1: 9.090%
8: 9.090%
2: 9.090%
6: 9.090%
5: 9.089%
0: 0.000%
[0] - https://play.nim-lang.org/#pasty=hwdfbsfh (reduced amount of runs to not abuse playground server resources)
JKCalhoun|1 month ago
Perhaps our pseudorandom algorithms are better at flipping a coin (this case) versus having to choose a random value over a range greater than 2 (or "1" if you like).
archargelod|1 month ago
Nim uses xoroshiro[0] algorithm for std/random module and it produces good quality statistically random bits until 5TB of output. And lower 4 bits have a little bias, but it should not matter as we only use upper 64 out of available 128 bits.
Also, I just now realise that xoroshiro-128+ is really cheap, so perhaps my batching optimisation was unnecessary here.
[0] - https://en.wikipedia.org/wiki/Xorshift#xoroshiro