On Sat, Sep 8, 2012 at 4:45 PM, Dave Dyer <[email protected]> wrote: > >> >>Are there performance reasons that made you try anything different? > > That's the whole point. Ideally, if the position has 100 legal moves, > generating 1 ought to be 100x faster than generating them all and > throwing 99 of them away.
Only if all 100 legal moves are different from the legal moves in the previous position. But note that I didn't say generate all legal moves. Instead I said to generate all possible moves, which you only need to do once ever. The legality test can come after the random selection. That obviously leads to more tries than when you restrict selection from legal moves, but that happens in your own case just as much. _______________________________________________ Computer-go mailing list [email protected] http://dvandva.org/cgi-bin/mailman/listinfo/computer-go
