Pages: 1
Author Topic: Random number questions  (35,067 Views)
Offline (Unknown gender) Darkstar2

Member
Joined: Jan 2014
Posts: 1,238
View profile
Posted on: May 12, 2014, 01:06:00 AM
My question regards random numbers in ENIGMA.  Back in the days I was reading the GMC I remember many complaints from people that numbers were not truly random and had a tendency of repeating in patterns.  It was mentioned by YYG that this was by design to allow easy tracing and debugging and was suggested to people that they use randomize ();

Since ENIGMA is based off of C++, does it work the same ? Do I have to use random seed or just randomize for truly random sequences ?

Also does the randomize() also affect all random functions such as random range ?

Thanks.
Offline (Unknown gender) Goombert

Developer
Joined: Jan 2013
Posts: 2,991
View profile
Reply #1 Posted on: May 12, 2014, 03:35:40 AM
Yes I believe we wrap the actual c standard functions, that said, there is no such thing as a truly random number, which is up for philosophical debate.
Offline (Unknown gender) TheExDeus

Developer
Joined: Apr 2008
Posts: 1,860
View profile
Reply #2 Posted on: May 12, 2014, 09:44:31 AM
We actually use several implementations as far as I know. One is something from delphi which could work just like GM. But they are as random as they come. There shouldn't be any repeating patterns. We could use the C++11 random functions which would even use hardware if possible (like some intel CPU's have a instruction that returns random value based on some quantum effects).
Pages: 1