I'm not sure if everyone does this already, but I realized that at the end
of a random playout there are no territories bigger than one intersection,
so you don't really need to call your area score method in most cases.

Let D = blackStonesOnBoard - whiteStonesOnBoard + whiteStonesCaptured -
blackStonesCaptured - komi. If abs(D) > K for some small threshold K (I use
size/2 = 4 for a 9x9 board, but you can use size if you want to be super
safe) then D>0 means black wins, white wins otherwise. The only problem is
when D is close to 0, since the real area score also counts each eye as one
point and this is not reflected in D. So depending on how many eyes each
side has, the result might go one way or another. We can either keep track
of the number of eyes and update D accordingly, or we can just call the area
score method for these borderline cases. If we do the latter we are still
saving a lot of time in most cases if we choose K small enough.

This gave me a nice speedup of 10% or so if I remember correctly.
_______________________________________________
computer-go mailing list
[email protected]
http://www.computer-go.org/mailman/listinfo/computer-go/

Reply via email to