Random algorithm

Jacques Hausser jacques.hausser at unil.ch
Wed Nov 12 13:04:22 EST 2008


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
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

******************************************
Prof. Jacques Hausser
Department of Ecology and Evolution
Biophore / Sorge
University of Lausanne
CH 1015 Lausanne
please use my private address:
6 route de Burtigny
CH-1269 Bassins
tel/fax: 	++ 41 22 366 19 40
mobile:	++ 41 79 757 05 24
E-Mail:	jacques.hausser at unil.ch
*******************************************




More information about the use-livecode mailing list