This patch allows self atari in special_rescue_moves() when it may set
up a snapback. Regression results:
owl1:351 PASS 1 E11 [1 (PASS|E11|F19|G18)]
reading:218 pass
2 PASS (1 PASS, 1 pass)
Total nodes: 1675790408 3161119 13118597 (+0.16% -0.0056% -0.015%)
- special_rescue_moves() revised to allow self atari moves which may
set up a snapback
/Gunnar
Index: engine/reading.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/reading.c,v
retrieving revision 1.156
diff -u -r1.156 reading.c
--- engine/reading.c 7 Dec 2004 04:50:02 -0000 1.156
+++ engine/reading.c 7 Mar 2005 14:04:51 -0000
@@ -1840,10 +1840,12 @@
{
int color = board[str];
int other = OTHER_COLOR(color);
+ int otherlib;
int k;
/* Use approxlib() to test for trivial capture. */
- if (approxlib(lib, other, 3, NULL) > 2)
+ otherlib = approxlib(lib, other, 3, NULL);
+ if (otherlib > 2)
return;
/* Loop over the four neighbours of the liberty, (lib + d). */
@@ -1851,8 +1853,8 @@
int d = delta[k];
if (board[lib + d] == EMPTY) {
- /* Don't play into a self atari. */
- if (is_self_atari(lib + d, color))
+ /* Don't play into a self atari unless we have a potential snapback. */
+ if (is_self_atari(lib + d, color) && otherlib > 1)
continue;
/* Be more demanding when the string has four liberties. (Mostly
_______________________________________________
gnugo-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnugo-devel