On Jul 8, 2007, at 2:38 PM, Paul Pogonyshev wrote:

George Dahl wrote:
How would one go about creating a random board position with a uniform
distribution over all legal positions?  Is this even possible?  I am
not quite sure what I mean by uniform.  If one flipped a three sided
coin to determine if each vertex was white,black or empty, then one
would have to deal with stones with no liberties somehow. Could those
just removed?

As I remember from theory of probability, you can create such a uniformly
"random" position this way[1]:

1. create a really random position, i.e. traverse all intersection and
     assign a black/white/empty state at random to each;

  2. if it happens to be not legal, discard and repeat step 1.

I believe it should be very fast, and this mustn't be difficult to check.

The check is easy: play all the stones (in any order, e.g., whatever order you have the points indexed) and see if there are any captures. If so, the position isn't legal.

Peter Drake
http://www.lclark.edu/~drake/


_______________________________________________
computer-go mailing list
[email protected]
http://www.computer-go.org/mailman/listinfo/computer-go/

Reply via email to