gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] revision of dragon_invincible()


From: Gunnar Farnebäck
Subject: [gnugo-devel] revision of dragon_invincible()
Date: Fri, 23 Apr 2004 03:42:04 +0200
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/21.3 (sparc-sun-solaris2.9) MULE/5.0 (SAKAKI)

This patch makes a small revision of the dragon_invincible() function.
The regression delta is 2 passes and a negligible increase in nodes.

strategy3:114   PASS D7 [D7]
seki:1001       PASS B2 [B2]

The seki:1001 pass is somewhat accidental but an improvement
nevertheless.

- dragon_invincible() revised

/Gunnar

Index: engine/dragon.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/dragon.c,v
retrieving revision 1.134
diff -u -r1.134 dragon.c
--- engine/dragon.c     10 Apr 2004 14:30:03 -0000      1.134
+++ engine/dragon.c     23 Apr 2004 01:40:01 -0000
@@ -968,14 +968,13 @@
 /* A dragon is considered invincible if it satisfies either of the two
  * following conditions:
  * a) At least two distinct eyespaces without topological halfeyes,
- * marginal vertices, or tactically critical or alive opponent strings.
+ *    marginal vertices, or tactically critical or alive opponent strings.
+ *    Furthermore there may not be an owl attack of the dragon.
  * b) At least one string which is unconditionally alive according to the
- * unconditional_life() function in utils.c.
+ *    unconditional_life() function in utils.c.
  *
  * For the requirement on opponent strings in a), see e.g.
  * seki:404,408,409,413,504,604,908.
- *
- * FIXME: This function fails for the lower left corner dragon in seki:1001.
  */
 
 static int
@@ -996,8 +995,11 @@
       return 1;
   }
 
-  /* Examine the eye spaces.
-   */
+  /* Can the dragon be owl attacked? */
+  if (DRAGON2(dr).owl_status != UNCHECKED && DRAGON2(dr).owl_status != ALIVE)
+    return 0;
+  
+  /* Examine the eye spaces. */
   if (board[dr] == BLACK) {
     eye = black_eye;
     eye_color = BLACK;




reply via email to

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