[computer-go] [OT] All-integer scalable distribution algorithm.

Jacques Basaldúa jacques at dybot.com
Thu Nov 8 03:42:55 PST 2007


Mike Hill wrote:

> The essence of my idea is that I want a psuedo-random algorithm which 
> takes as a parameter a 'degree-of-randomness' value.  Something along 
> these lines:
> 
> int choose( int range, int degree-of-randomness)
> 
> Returns an integer in [0-range] distributed depending on the value of 
> degree-of-randomness.  At degree-of-randomness 100, I want the 
> distribution to be uniform.  At degree-of-randomness 0, I want the 
> distribution to be  -- I don't even know what to call this -- 
> half-of-a-normal-distribution  with the steepness proportionately 
> related to degree-of-randomness.

As mentioned, you can make your distribution parametric 
(depend on degree-of-randomness). The standard deviation is the 
right choice for that, but you have to trim results outside [0-range].

Or ..

You can perform a random experiment to mix both:

pseudo code:
------------

 if Uniform(0, 100) >= degree-of-randomness 
 then 
     return Normal (range/2, sd)
 else
     return Uniform(0, range)


Jacques.




More information about the computer-go mailing list