1. Euphoria's random number generator
- Posted by hacker Jan 08, 2011
- 1392 views
Does anyone know what algorithm Eu uses for its RNG? I'm creating an app which needs a high quality RNG and am wondering if Eu's is good enough.
2. Re: Euphoria's random number generator
- Posted by CoJaBo Jan 08, 2011
- 1381 views
How high quality, and for what purpose?
If I recall correctly, it did have some serious issues with predictability (unless this changed since Eu4 alpha), so using it for applications that require unpredictability would be a bad idea.
Using it for any other cryptographic/high security use would also likely be a bad idea, as it doesn't seem that the integrity of the algorithm has ever been tested.
If those things aren't necessary, it would likely be adequate- the numbers aren't appallingly bad as with some implementations of C rand().
3. Re: Euphoria's random number generator
- Posted by hacker Jan 08, 2011
- 1310 views
Thanks for the feedback. I'm writing a poker simulator, so maybe it doesn't need to be as good as for a cryptographic application. I've just been looking at different RNG algorithms and it seems a good one is the "Mersenne Twister". Theres a routine for it in the archive, so probably better that I use that, rather than the default Eu RNG.
4. Re: Euphoria's random number generator
- Posted by CoJaBo Jan 08, 2011
- 1298 views
Assuming predictability isn't too much a concern (e.g. Multiplayer game where people would cheat), it should be fine for that purpose.
5. Re: Euphoria's random number generator
- Posted by hacker Jan 08, 2011
- 1261 views
it should be fine for that purpose.
Ok, thanks. I won't bother with the Mersenne Twister then.