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

Nick Wedd nick at maproom.co.uk
Wed Nov 7 07:46:36 PST 2007


In message <47312AE5.4090203 at anarchycreek.com>, Mike Hill 
<mike.hill at anarchycreek.com> writes
>Folks...
>
>First, let me say how much pleasure my reading of this list has given 
>me.  I love that folks are out there cranking on this problem.  Truly, 
>it's one of the great problems.
>
>I have a rather strange request.  I am a statistical idiot, in both 
>senses of 'statistical'.  After scrolling through a half-dozen stat 
>tutorials online, I find myself completely unable to grasp how I'd get 
>the effect I want even if I wanted to use floats, which I don't.  As 
>you will soon be aware, I don't even have the language to figure out 
>how to describe my problem.  Seeing as how there are so many MC 
>algorithm workers on the list, I thought I'd turn to you for some guidance.
>
>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.
>
>Am I making *any* sense?  If so, you may need some sort of psychiatric 
>help, or alternatively, you could do me the favor of explaining how to 
>ask for what I want or even how to actually get it.  :)

So if you specify a range of 3 and a degree-of-randomness of 100, you 
get a uniform distribution of the range 0..3.  If you specify a range of 
3 and a degree-of-randomness of 0, you want something with a maximum at 
0, looking like the right half of a Gaussian, a zero steepness [?], and 
an unspecified variance.  Are you aware that, if it has any variance at 
all, its tail will extend beyond 3?

I think the maths will be easy enough, once you have made it clear what 
you want (or why you want it).

Maybe this would provide what you want:
   take a random number in the range 0..1
   raise it to the power (100/degree-of-randomness)
   multiply the result by range

Nick
-- 
Nick Wedd    nick at maproom.co.uk


More information about the computer-go mailing list