Random algorithm
Richard Gaskin
ambassador at fourthworld.com
Wed Nov 12 16:30:31 EST 2008
Jan Schenkel wrote:
> --- Richard Gaskin <ambassador at fourthworld.com> wrote:
>> Mark Brownell wrote:
>> > I'm surprised that the random seed was not
>> mentioned.
>>
>> Me too. Wouldn't it suffice to do this before each
>> run?:
>>
>> set the randomSeed to random(4570422)
>
> In theory, that could result in the same series of
> random numbers multiple times, as the first random may
> start with the same randomseed as another, thus
> resulting in the same random first number, and thus
> the same second number and so forth.
I'm pretty sure I'm missing something that will make the dim light in my
head brighter.
It would seem that resetting the randomSeed each time you use the random
function would only have a 1-in-4,570,422 chance of getting the same
seed as the previous run, no?
--
Richard Gaskin
Managing Editor, revJournal
_______________________________________________________
Rev tips, tutorials and more: http://www.revJournal.com
More information about the use-livecode
mailing list