[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] Proposed owl_determine_life() improvement
From: |
bump |
Subject: |
Re: [gnugo-devel] Proposed owl_determine_life() improvement |
Date: |
Mon, 4 Nov 2002 08:20:43 -0800 |
> I'll post the revised patch if the regressions are promising in
> a few hours.
Here's the alternative patch and breakage. I won't be working on this
if Nando or anyone else wants to look at this example.
Dan
./regress.sh . owl.tst
178 unexpected PASS!
212 unexpected FAIL: Correct '3 E16', got '0'
./regress.sh . nicklas4.tst
805 unexpected FAIL: Correct 'C5|B4', got 'K7'
./regress.sh . trevor.tst
340 unexpected FAIL: Correct '1 P9', got '1 Q9'
./regress.sh . semeai.tst
32 unexpected FAIL: Correct 'ALIVE_IN_SEKI ALIVE_IN_SEKI B6', got 'DEAD ALIVE
PASS'
./regress.sh . strategy4.tst
179 unexpected PASS!
./regress.sh . handtalk.tst
4 unexpected PASS!
./regress.sh . nngs2.tst
110 unexpected FAIL: Correct 'B14|B13', got 'L16'
150 unexpected PASS!
./regress.sh . nngs3.tst
320 unexpected PASS!
./regress.sh . nngs4.tst
30 unexpected PASS!
./regress.sh . auto01.tst
13 unexpected FAIL: Correct '1 (Q12|Q13)', got '0'
Index: engine/owl.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/owl.c,v
retrieving revision 1.115
diff -u -r1.115 owl.c
--- engine/owl.c 23 Oct 2002 18:32:35 -0000 1.115
+++ engine/owl.c 4 Nov 2002 01:32:26 -0000
@@ -4589,8 +4589,10 @@
int other = OTHER_COLOR(board[lunch]);
int size;
int libs[MAXLIBS];
+ int adjacent[MAXCHAIN];
+ int neighbors;
int liberties;
- int r;
+ int r, n;
ASSERT1(IS_STONE(board[lunch]), lunch);
@@ -4618,7 +4620,22 @@
}
}
}
-
+ /* If the lunch adjoins a neighbor that is not part of the goal,
+ * munch to escape.
+ */
+ neighbors = chainlinks(lunch, adjacent);
+ for (n = 0; n < neighbors; n++)
+ if (!owl->goal[adjacent[n]]) {
+ liberties = findlib(adjacent[n], MAXLIBS, libs);
+ for (r = 0; r < liberties; r++) {
+ if (owl->escape_values[libs[r]] > 0) {
+ *min = 2;
+ *probable = 2;
+ *max = 2;
+ return;
+ }
+ }
+ }
size = countstones(lunch);
if (size > 6) {
*min = 2;
- [gnugo-devel] Proposed owl_determine_life() improvement, Nando, 2002/11/03
- RE: [gnugo-devel] Proposed owl_determine_life() improvement, Portela Fernand, 2002/11/03
- RE: [gnugo-devel] Proposed owl_determine_life() improvement, Portela Fernand, 2002/11/03
- RE: [gnugo-devel] Proposed owl_determine_life() improvement, Portela Fernand, 2002/11/03
- RE: [gnugo-devel] Proposed owl_determine_life() improvement, Portela Fernand, 2002/11/04
- RE: [gnugo-devel] Proposed owl_determine_life() improvement, Portela Fernand, 2002/11/07