gnugo-devel
[Top][All Lists]
Advanced

[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: Sun, 3 Nov 2002 17:42:44 -0800

> I didn't try yet to find alternatives to this policy. I suspect it
> would cause quite a bunch of problems. I'm ready to investigate more,
> but I'd need more examples like this one. Can you provide some Dan ?

I tried the patch revising sniff_lunch() at the end here and got the
following breakage.  These may be positions to investigate. This
patch increases the owl nodes in owl.tst from 22704 to 24113. I don't
think this is a good patch but this may be the right piece of code to
revise.

I have a revision of this patch that looks at the escape values
of the liberties adjacent to friendly non-goal neighbor of the
the captured lunch. That works in this case, because D6 has
positive escape value. Here are the escape values for this example.

0000001100000000011
1100011100000000142
2240442100000001642
2441442110011116444
2444411111111124444
1122111111101114644
0000011111111112444
0000011111111122244
0000000111111124444
0000111111111144444
0000111111111124422
0000111111110014110
0000111111110014100
0001111111110002000
0000111111111004001
2600411111112112111
4666001111124444444
4441001111244444444
2220001111124444444

I'll post the revised patch if the regressions are promising in
a few hours.

I haven't investigated this breakage much but it might help
answer your query for more examples. The PASS at owl:178 does
not look like a valid example of where this patch is supposed
to be useful.

Dan

./regress.sh . owl.tst 
178 unexpected PASS!
212 unexpected FAIL: Correct '3 E16', got '0'
./regress.sh . owl_rot.tst 
262 unexpected FAIL: Correct '0', got '1 E8'
./regress.sh . nicklas1.tst 
1110 unexpected FAIL: Correct '!T15', got 'T15'
./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 . global.tst 
32 unexpected 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 
230 unexpected PASS!
320 unexpected PASS!
./regress.sh . nngs4.tst 
30 unexpected PASS!
./regress.sh . auto01.tst 
13 unexpected FAIL: Correct '1 (Q12|Q13)', got '0'

===================================================================
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        3 Nov 2002 17:08:47 -0000
@@ -4589,6 +4589,8 @@
   int other = OTHER_COLOR(board[lunch]);
   int size;
   int libs[MAXLIBS];
+  int adjacent[MAXCHAIN];
+  int neighbors;
   int liberties;
   int r;
 
@@ -4618,6 +4620,30 @@
       }
     }
   }
+  /* If the lunch adjoins a neighbor that is not part of the goal,
+   * munch to escape.
+   *
+   * FIXME: If one neighbor is a singleton, one not, the result
+   * depends on the order in which they are visited.
+   *
+   * FIXME: Examine escape values near the neighbors.
+   */
+  neighbors = chainlinks(lunch, adjacent);
+  for (r = 0; r < neighbors; r++)
+    if (!owl->goal[adjacent[r]]) {
+      /* a singleton neighbor is slightly less appealing. */
+      if (countstones(adjacent[r]) == 1) {
+       *min = 1;
+       *probable = 1;
+       *max = 2;
+      }
+      else {
+       *min = 2;
+       *probable = 2;
+       *max = 2;
+      }
+      return;
+    }
   
   size = countstones(lunch);
   if (size > 6) {




reply via email to

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