Random algorithm

Thomas McGrath III mcgrath3 at mac.com
Wed Nov 12 13:49:59 EST 2008


I am very glad that Mark posted the random seed idea. I have spent  
some time trying to get better random results in different projects  
but I think that reseting the random seed would have been a lot easier.

Regards,

Mark ---- (Tom McGrath)

Lazy River Software
3mcgrath at comcast.net

iTunes Library Suite - libITS
Information and download can be found on this page:
http://www.lazyriversoftware.com/RevOne.html

On Nov 12, 2008, at 1:04 PM, Jacques Hausser wrote:

> Many thanks for your two cents !
>
> I wonder if the first name of people answering my first question is  
> really random : Mark, Mark and Mark...
>
> Jacques
>
> Le 12 nov. 2008 à 18:46, Mark Brownell a écrit :
>
>> I'm surprised that the random seed was not mentioned. Please excuse  
>> this if someone has responded with that. I'm on digest mode.
>>
>> I've solved the random RNG problem by simulating the function of  
>> the Roulette wheel. This idea of using random bits or like some  
>> websites do it is the clue. When Revolution starts up it sets a new  
>> random seed and uses that same seed until the application shuts  
>> down. If you reset the random seed for each spin, like on a  
>> roulette wheel, then you can combine several things that must  
>> happen before the ball lands in a single slot. You can randomize  
>> the spin speed, the wheel speed, the track resistance, the bumper  
>> strike positions or misses, and the slot fin strikes or misses. In  
>> this way, by combining several random conditions you can do as well  
>> as any accepted form of so called true randomness.
>>
>> So I would stack about five different conditions that include  
>> millions of possibilities and use that to randomize the final  
>> outcome. I would always set a new random seed before starting.
>>
>> My two cents,
>>
>> another; Mark
>>
>>>
>>> Message: 8
>>> Date: Tue, 11 Nov 2008 22:16:18 +0100
>>> From: Jacques Hausser <Jacques.Hausser at unil.ch>
>>> Subject: Random algorithm
>>> Hi,
>>>
>>> Does somebody know which algorithm is hidden behind the random
>>> function ? Native random number generators have usually a poor
>>> reputation, and I need trustable random numbers. I have translated  
>>> the
>>> Mersenne twister algorithm which works OK, but slowly (47  
>>> milliseconds
>>> for 1000 numbers against five for the random function). If the  
>>> native
>>> function is a good one, I'll keep it...
>>>
>>> Thanks for any hint
>>>
>>> Jacques
>>
>>










More information about the use-livecode mailing list