[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] reading patch
From: |
Gunnar Farneback |
Subject: |
[gnugo-devel] reading patch |
Date: |
Tue, 20 Aug 2002 23:30:39 +0200 |
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 to reading.c solves test case reading:171. The total
regression delta is:
./regress.sh . reading.tst
171 unexpected PASS!
./regress.sh . rosebud.tst
1 unexpected PASS!
./regress.sh . lazarus.tst
5 unexpected FAIL: Correct 'R13', got 'N11'
14 unexpected FAIL: Correct 'Q15|T5|H5', got 'Q14'
./regress.sh . nicklas4.tst
1201 unexpected PASS!
./regress.sh . global.tst
34 unexpected FAIL: Correct 'N6', got 'L6'
Two of the three failures seem to be purely accidental. In lazarus:5
the difference is that an owl defense for P10 is found at N11, which
doesn't exactly look unreasonable. In lazarus:14 the difference is
that Q19 and O14 become amalgamated, which they clearly should be.
In global:34 the difference is that neither O6 nor M8 is considered
owl defendable any more. This looks tricky to determine and may
involve semeai considerations.
- break_chain2_moves() revised
/Gunnar
Index: engine/reading.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/reading.c,v
retrieving revision 1.66
diff -u -r1.66 reading.c
--- engine/reading.c 4 Jul 2002 19:33:00 -0000 1.66
+++ engine/reading.c 20 Aug 2002 20:45:35 -0000
@@ -4628,6 +4628,7 @@
int apos;
int adj;
int adjs[MAXCHAIN];
+ int dummy_adjs[MAXCHAIN];
int libs[2];
int unsafe[2];
@@ -4636,6 +4637,18 @@
for (r = 0; r < adj; r++) {
apos = adjs[r];
+ /* If stackp > backfill_depth, don't bother playing liberties of
+ * 2-liberty strings if those also have at least one neighbor in
+ * atari. This is intended to solve reading:171 and generally reduce
+ * the number of nodes.
+ *
+ * FIXME: We may need to still accept these moves if they happen to
+ * take the ataried string out of atari.
+ */
+ if (stackp > backfill_depth
+ && chainlinks2(apos, dummy_adjs, 1) > 0)
+ continue;
+
findlib(apos, 2, libs);
for (k = 0; k < 2; k++) {
unsafe[k] = is_self_atari(libs[k], color);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnugo-devel] reading patch,
Gunnar Farneback <=