On Sat, Sep 8, 2012 at 5:34 PM, Dave Dyer <[email protected]> wrote:
>
>>
>>Only if all 100 legal moves are different from the legal moves in the
>>previous position.
>
> The dynamics are different for each game. Go is an especially favorable
> case for incrementally maintaining the list of legal moves.
>

OK, I took a quick peek at the rules. There are 49 positions and each
position can move between 3 and 6 directions. That looks like 250 or
so possible moves (location + direction combinations). So you just
make a list of 250 large and pick a random one and see if it's legal.
If not, you swap it with the last untested item in the list and you
pick random from the same list - 1. Continue until you find a legal
move. When done, you reset your 'untested' pointer back to the end.

Mark
_______________________________________________
Computer-go mailing list
[email protected]
http://dvandva.org/cgi-bin/mailman/listinfo/computer-go

Reply via email to