Rufasu wrote: ↑29 July 2024, 08:30
Thanks for the new info.
I am not in a position to read the source code, so I will give my thoughts.
I think it would be better to use PCG64 or Xoshiro256** for the random number algorithm rather than Mersenne Twister.
And I think it is better not to specify the seed value.
If you're not in a position to read and understand the source code, why do you believe that those others are superior? Can you explain it in your own words (not quoting some tech site)?
I can say that the Xoshiro256** is one of the most-used algorithms, being used by Microsoft's .Net framework, LUA, Julia, and available in java. To me, that level of exposure means more people trying to figure out ways to break it - it's less secure.
None of these are cryptographically secure, but it's not a for-cash gambling site, we're dealing in a relatively simple gaming site, so that's not really relevant. It does not have to be super-fast (like an FPS might need), it just needs to be adequately fast, and the difference between 20 calls per second and 150 calls per second is functionally irrelevant for this purpose.
As for the seed value - I don't know it, but I'm quite certain it's not fixed. It wouldn't be hard to make the seed based on the time, down to the second, that the game starts, and that will prevent any seed-based attack vectors.
But we're getting into the weeds. All three of these - PCG64, Xoshiri256**, and Mersenne Twister - are suitable for this level of computation. AFAIK, there are no board games that involve anything more complex than shuffling cards, randomizing balls, or rolling dice, and even the most complex of these (fully-expanded Terraforming Mars) is still rolling numbers of less than 1000 possibilities. There's nothing here making Calculus-based (or even Algebra-based) computations.
The question isn't, "What's better," the question is, "What's wrong with the current setup, and why should it be changed?" Some people thinking that their numbers aren't random enough because they're seeing streaks isn't a valid reason to change. Even if the other two are better than Mersenne Twister, you'd have to demonstrate an actual
failing for Mersenne Twister within the scope of this purpose and use-case.