gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnugo-devel] Optical patch


From: Daniel Bump
Subject: [gnugo-devel] Optical patch
Date: Thu, 10 Jan 2002 10:15:08 -0800

This is my second attempt to send this message to the list.
I'm not sure whether or not the list is working, since some
messages seem to be getting through, but this one did not
when I sent it earlier.

Trevor wrote:

> On:
> http://www.public32.com/regress/?tstfile=nngs&num=1860&move=D19
> 
> This is an extract of the output from:
> gq -l games/nngs/scf-gnugo-3.1.18-200201060027.sgf -L 117 -t -w -d0x101800
> 
> There's the line:
> Move at D19 vital eye point for dragon PASS (eye D19)

The attached patch fixes this problem. There seems no reason
to compute_eyes on eye spaces which are not attached to dragons.

Dan

? stamp-h1
? regression-3.1.19.tar.gz
? patterns/mkpat.c.cvs
Index: engine/dragon.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/dragon.c,v
retrieving revision 1.44
diff -u -r1.44 dragon.c
--- engine/dragon.c     8 Jan 2002 22:34:14 -0000       1.44
+++ engine/dragon.c     10 Jan 2002 17:15:42 -0000
@@ -282,7 +282,8 @@
       ii = POS(i, j);
 
       if (black_eye[ii].color == BLACK_BORDER
-         && black_eye[ii].origin == ii)
+         && black_eye[ii].origin == ii
+         && black_eye[ii].dragon != NO_MOVE)
       {
        int max, min, attack_point, defense_point;
 
@@ -298,7 +299,8 @@
       }
 
       if (white_eye[ii].color == WHITE_BORDER
-         && white_eye[ii].origin == ii)
+         && white_eye[ii].origin == ii
+         && white_eye[ii].dragon != NO_MOVE)
       {
        int max, min, attack_point, defense_point;
 
Index: engine/optics.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/optics.c,v
retrieving revision 1.34
diff -u -r1.34 optics.c
--- engine/optics.c     19 Dec 2001 20:59:34 -0000      1.34
+++ engine/optics.c     10 Jan 2002 17:15:43 -0000
@@ -1235,7 +1235,8 @@
              struct half_eye_data *this_half_eye = &heye[vpos[map[k]-1]];
 
              for (ix = 0; ix < this_half_eye->num_defends; ix++)
-               defense_points[num_defenses++] = 
this_half_eye->defense_point[ix];
+               defense_points[num_defenses++] 
+                 = this_half_eye->defense_point[ix];
            }
            else
              defense_points[num_defenses++] = vpos[map[k]];



reply via email to

[Prev in Thread] Current Thread [Next in Thread]