Peter Drake wrote:
I tried creating a random number generator
java.util.Random rand = new java.util.Random()
and then asking it for a random int
rand.nextInt()
which I would then take modulo the board size to choose a random
point.
Note that rand.nextInt(int n) might be what you want: Returns a
pseudorandom, uniformly distributed int value between 0 (inclusive) and
the specified value (exclusive), drawn from this random number
generator's sequence.. This also takes into account that simply taking
the modulus does usually _not_ result in a uniformly distribution, since
usually MAX_INT is no multiple of n.
greets
eph
___
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/