gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] more reading defense moves


From: Gunnar Farneback
Subject: Re: [gnugo-devel] more reading defense moves
Date: Mon, 18 Nov 2002 17:48:47 +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)

I wrote:
> Incidentally I have a snapback patch too, which has been lying around
> for a while without time for evaluation. Feel free to merge it with
> your patch as you like.

If you wonder I have one more reading patch pending for the same
reason, revising special_rescue6_moves().

/Gunnar

Index: engine/reading.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/reading.c,v
retrieving revision 1.84
diff -u -r1.84 reading.c
--- engine/reading.c    12 Nov 2002 16:34:05 -0000      1.84
+++ engine/reading.c    15 Nov 2002 13:34:58 -0000
@@ -2131,6 +2118,16 @@
  * |.X.   |.c*
  * |.O?   |ab?
  *
+ * It also adds the * move in these configurations:
+ * 
+ * |.X.   |.c*
+ * |.OX   |abX
+ *
+ * |.X.   |.c*
+ * |.O.   |ab.
+ *
+ * Provided that * is not a self atari and that the X strings have
+ * sufficiently few liberties.
  */
 static void
 special_rescue6_moves(int str, int libs[3], struct reading_moves *moves)
@@ -2172,20 +2169,19 @@
        if (board[cpos + right] != EMPTY)
          continue;
 
-       if (board[apos + up + up] != EMPTY)
-         continue;
-       
-       if (board[cpos + up] != EMPTY)
-         continue;
-       
-       if (board[cpos + up + right] != color)
-         continue;
-       
-       
-       if (!is_self_atari(cpos + right, color))
+       if (board[apos + up + up] == EMPTY
+           && board[cpos + up] == EMPTY
+           && board[cpos + up + right] == color) {
          ADD_CANDIDATE_MOVE(cpos + right, 0, *moves);
-       if (!is_self_atari(cpos + up, color))
          ADD_CANDIDATE_MOVE(cpos + up, 0, *moves);
+       }
+       else if (countlib(cpos) <= 3
+                && (board[bpos + right] == EMPTY
+                    || (board[bpos + right] == other
+                        && countlib(bpos + right) <= 4))
+                && !is_self_atari(cpos + right, color)) {
+         ADD_CANDIDATE_MOVE(cpos + right, 0, *moves);
+       }
       }
     }
   }




reply via email to

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