Quote:
Originally Posted by Suhiir
As I mentioned in another thread perhaps the random number generator code used by this laptop is faulty and generates an abnormal amount of low results.
|
The random number generator code is not dependent on your computer in quite the way you assume. Unless the Software engineer has goofed in a cosmically screwed up way. Which is unlikely since after "Hello World!" and "Hello John/Jane", "Hello Random" is like the 3rd (possibly 4th maybe 5th or 6th depending on flow control and variable assignment but right up there in top 10 things to do) thing described with examples in any programming language.
Please hit me with a dead fish as I put this subject to bed...
The Random Number Generator (henceforth RNG) takes as input the current Tick (1000th of a second) Count of the CPU Clock. Which is a Long Unsigned Integer counting number of Ticks since the System was Booted (some archaic systems used unsigned shorts and even more ancient systems used unsigned bytes).
The RNG takes this Tick Count does a bunch of math to it involving things like prime numbers and various digits of PI plus often a constant seed (the signature often being the a value similar to known values of the author aka his nickname) and spits out a pseudo-random number.
If the author of the software spitting out the Random Number is a total idiot he would declare the RNG Function as a Global Stored Constant. In other words this value is known to all other bits of Code and is Saved upon program exit. So that each consecutive call of RNG() yields the same sequence from A to Z no matter if the call is made from canIHitIt() or canISeeIt() with exiting and restarting the program making no difference. We know this isn't the case because restarting a save game will result in differences based on the RNG().
Since we assume that the Engineer is not foolish (properly that Don and Andy are not idiots

no matter how much we vehemently disagree with them on some aspects of this game) it is understood that RNG() is a Local Unstored Function. Every single individual call to RNG() is a unique state (every request asks for the current tick count and does the magical math dance at the time of request), not dependent on saved status or the function calling for it.
So that... in earlier examples in this thread, it was described that varying the location of AirStrikes around a known identified point would probably create a whole different set of results.
*scJazz ducks down in the HMG Foxhole Pit waiting for the totally ineffectual waterborne incoming*