[computer-go] Counting the final score with seki

2008-08-25 Thread Jacques Basaldúa

Hi all,

When you detect self atari in the playouts (something I haven't tried 
yet, but
from recent posts in this group I am convinced that it is an important 
issue)

a new problem arises: How can you score the board _fast_ at the end?

My previous version killed all groups in seki and scanned starting from 
a stone

in zig-zag:



^
---(X)···

and

(X)--
|
|

If the stone is black/white, it starts counting for +1 or -1 and changes 
the sign
when the stone color changes. (Starting from a stone is easy because I 
keep lists
of chains, while starting from a corner would require to find out who it 
belongs

first.)

This way of counting does not require looking for any neighbors and is 
really fast.


But when self atari is avoided in the playouts, groups live in seki and 
counting
dame points really fast is required. Of course, I can imagine how to do 
it using
floodfill, what I want to know is if someone wants to share some better 
approach

if there is one.

Jacques.



___
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/


Re: [computer-go] Counting the final score with seki

2008-08-25 Thread Rémi Coulom

Jacques Basaldúa wrote:


But when self atari is avoided in the playouts, groups live in seki 
and counting

dame points really fast is required.


You should not worry about that kind of speedup. Looking at neighbors 
has a very small cost. Negligible in comparison to the playout. 
Especially if you plan to score seki correctly.


Rémi
___
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/


Re: [computer-go] Counting the final score with seki

2008-08-25 Thread Magnus Persson

Quoting Jacques Basaldúa [EMAIL PROTECTED]:

When you detect self atari in the playouts (something I haven't   
tried yet, but

from recent posts in this group I am convinced that it is an important issue)
a new problem arises: How can you score the board _fast_ at the end?


Valkyria makes a simple loop that goes through each position on the  
board. Remaining stones are always counted as points. Stones in seki  
are alive and should be counted as usual so that is not different. The  
dames created by sekis have to be detected and differentiated from  
eyes. It is enough to just count the black and white stones in the 4  
adjacent positions to see if it is an eye or a dame. There should be  
no dame that does not have *both* a black and white adjacent stone.


Best
Magnus
___
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/


Re: [computer-go] Counting the final score with seki

2008-08-25 Thread Álvaro Begué
On Mon, Aug 25, 2008 at 7:06 AM, Magnus Persson [EMAIL PROTECTED] wrote:
 Quoting Jacques Basaldúa [EMAIL PROTECTED]:

 When you detect self atari in the playouts (something I haven't  tried
 yet, but
 from recent posts in this group I am convinced that it is an important
 issue)
 a new problem arises: How can you score the board _fast_ at the end?

 Valkyria makes a simple loop that goes through each position on the board.
 Remaining stones are always counted as points. Stones in seki are alive and
 should be counted as usual so that is not different. The dames created by
 sekis have to be detected and differentiated from eyes. It is enough to just
 count the black and white stones in the 4 adjacent positions to see if it is
 an eye or a dame. There should be no dame that does not have *both* a black
 and white adjacent stone.

dimwit keeps track of the stone-count difference between black and
white as the game is played. We also have a list of empty points, so
we loop through them to count one point per eye. The game doesn't
change substantially if you consider that only eyes count as
territory, since you can always fill up your own territory until
everything left is single eyes. At the end of our playouts there
aren't any larger areas of territory anyway.
___
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/