Randomness

From Maze

(Difference between revisions)
Jump to: navigation, search
(→The History of RND)
(→RND by Startup, Stopwatch, or Seed: first section and illustration)
Line 153:Line 153:
==== RND by Startup, Stopwatch, or Seed ====
==== RND by Startup, Stopwatch, or Seed ====
−
...
+
RND is, like most computational sources of randomness, a pseudorandom number generator (PRNG). While there may be no apparent pattern between any two numbers, each number is generated based on the previous one using a deterministic process. When the first number is the same, the entire sequence will be the same, every time. In the case of the C64, this is particularly important because the same first number is set, at startup, on almost every C64 system. This means that, when RND(1) is invoked immediately after startup, or before any other invocation of RND, it will always produce the same result: .185564016. The next invocation will also be the same, no matter what the time or which Commodore 64 is used, and the next. Since the sequence is deterministic, the pattern produced by the 10 PRINT program, when run before any other invocation of RND, is always the same, on any C64. [NOTE: last two sentences cribbed from early annotation, need to rephrase, think about repetition issue].
 +
 +
[[Image:10print-startup-canonical.png|160px|thumb|The first page of "canonical" 10 PRINT output when run immediately after startup.]]
==== The SID: Sound as a second stochastic source ====
==== The SID: Sound as a second stochastic source ====

Revision as of 22:56, 11 July 2011

View this revision of Randomness.

Personal tools