Re: TIB: Randseed theory for 92+


[Prev][Next][Index][Thread]

Re: TIB: Randseed theory for 92+




I wasn't actually trying to be "scientific," but...alright =).   Anyhow, I
think 1147 is the "breach" of the circle from the original equations (when it
overlaps and wrapsaround the circle), so it isn't just some number they pulled
out of thin air (although it was a nice conclusion ;p).

Anyhow, I'd like to submit the following code to you guys for use with the
92...the following will turn your calculator into a semi-true random state
(still using pseudo-random numbers, but since the only true random thing in
nature is humans, it requires a human touch):
random():Prgm
local rnd
rand(rand(1147)*rand(1147))->rnd
randseed rnd
disp "press a key"
while getkey()=0
rand()->rnd
endwhile
endprgm

Run the above program and wait a few seconds, press a key and the program
ends.  After you have finished running it DO NOT use RANDSEED ever again.  If
for some reason you had to use randseed, redo this program to set it back to
semi-true state or randomizing.  Here is a following example program that
rolls a set number of sided dice:

roll(dice,sides):Func
local temp1,temp2
0->temp2
for temp1,1,dice
temp2+rand(sides)->temp2
endfor
temp2
endfunc 

If you don't believe this is random, try the following examples (type them in
and hit enter on the homescreen):
randseed 0
rand(10)
randseed 0
rand(10)
random()
rand(10)
random()
rand(10)

Now tell me if you get the same numbers after running the random program? =)
(by the way, if you did, It's only a coincidence because the calculator is
only choosing between 1 and 10...try higher numbers to see)

-|2-



{{ Thank you all for your input.  My theory is disproven.  when the manual
said
"factory defaults" i was hoping randseed 0 would be different for each calc,
but to no avail.  As far as that pseudo-random algorithm, i don't think its
necessary to know it, so don't strain yourself.  btw, i like those
scientific terms (i.e. "whacked out").

I think the manual uses 1147 because when they wrote the scripts, they typed
rand(5000) and got 1147, so they decided to use that in the manual's
examples.  (I don't think this is true, but it sounded good) }}