gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] filllib patch


From: Gunnar Farneback
Subject: [gnugo-devel] filllib patch
Date: Sat, 19 Jan 2002 12:08:45 +0100
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode)

This patch fixes test case filllib:31.

- find_backfilling_move() in filllib.c revised

/Gunnar

Index: engine/filllib.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/filllib.c,v
retrieving revision 1.14
diff -u -r1.14 filllib.c
--- engine/filllib.c    3 Dec 2001 20:57:53 -0000       1.14
+++ engine/filllib.c    18 Jan 2002 07:28:23 -0000
@@ -435,6 +435,21 @@
     }
   }
 
+  /* If no luck so far, try attacking superstring neighbors. */
+  if (!found_one) {
+    trymove(move, color, "find_backfilling_move", move, EMPTY, NO_MOVE);
+    superstring_chainlinks(move, &neighbors, adjs, 4);
+    popgo();
+    for (k = 0; k < neighbors; k++) {
+      if (attack(adjs[k], &bpos) == WIN) {
+       if (liberty_of_string(bpos, adjs[k])) {
+         *backfill_move = bpos;
+         return 1;
+       }
+      }
+    }
+  }
+
 
   if (found_one) {
   



reply via email to

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