#128564 - 2004-11-01 10:22 AM
Re: Kixtart Mini-putt challenge for tonight
|
Richard H.
Administrator
   
Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
|
Quote:
Regarding the randomness of Richards’s code it is not truly random in the sense the outcome is re-creatable. It is not easily re-creatable but it is not impossible. Given all the environmental variables preset I.E. the uptime of the system, the current millisecond in time, and so on, and the output would be the same each and every time.
You're missing a bit of the story. This is true, but only if the action is not subsequently subject to external influnces.
In the case of your PC it will be peturbed by small things like minor fluctuations in power supply or heat, and large things like your anti-virus software, screen saver or fast-find kicking in.
In fact, my code is *more* random than the built-in, by accident of design rather than any intention 
The built-in uses a well tried and trusted method of starting with a seed number and on each iteration pushing it through an algorithm which appears to generate a random number.
The number is not of course random, it is entirely predictable. I could give you a seed number and then describe the next 10,000 numbers that will be returned every single time, without error.
You can't do that with my algorithm. If you managed to get @TICKS and @MSECS the same then the numbers at the start of the process would be identical. However, no two computers will function exactly the same, especially over an extended period. This means that without some sort of governer the results will diverge.
|
|
Top
|
|
|
|
Moderator: Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 989 anonymous users online.
|
|
|