gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] eye value patch


From: Arend Bayer
Subject: Re: [gnugo-devel] eye value patch
Date: Mon, 17 Jun 2002 15:05:26 +0200 (CEST)

Gunnar wrote:
> This [patch] is a preparation for a later change to a more sophisticated eye
> value scheme, which will be slightly more powerful than the one
> described in the paper "Eyespace Values in Go" (linked from the web
> page). More about this later.

I had just a look at the owl failure in this position (at first not
realizing that it might be related to your plans):

|XXXX.
|OOOX.  (O to move)
|.O.OX  (GNU Go sees no way to live)
|.aOXX
+----

In trying to understand this failure, I came up with the patch below to
evaluate_diagonal_intersection, which changes the topological eye valuation
of a from 3.0 (half eye) to 2.75 (half eye, can be made false only with
ko) as it should be.
However, the existing graph matching can't use this improved information
yet, so I am not proposing this patch for CVS. It might however be worth
trying out together with your planned chanes.

Arend


diff -X /home/arend/.diffignore -ur ../gnugo/engine/optics.c ./engine/optics.c
--- ../gnugo/engine/optics.c    Fri Jun  7 12:46:50 2002
+++ ./engine/optics.c   Mon Jun 17 06:34:35 2002
@@ -1689,7 +1689,7 @@
   if (board[pos] == EMPTY) {
     /* We should normally have a safe move, but occasionally it may
      * happen that it's not safe. There are complications, however,
-     * with a position like this
+     * with a position like this:
      *
      * .XXXX|
      * XXOO.|
@@ -1697,6 +1697,8 @@
      * XXO.O|
      * -----+
      *
+     * Therefore we ignore our own safety if opponent's safety depends
+     * on ko.
      */

     int our_safety = safe_move(pos, color);
@@ -1704,16 +1706,14 @@

     if (your_safety == 0)
       value = 0.0;
-    else if (our_safety == 0 && your_safety == WIN)
+    else if (your_safety != WIN)
+      value = a;
+    else if (our_safety == 0)          /* So your_safety == WIN. */
       value = 2.0;
-    else if (our_safety == WIN && your_safety == WIN)
+    else if (our_safety == WIN)
       value = 1.0;
-    else if (our_safety == WIN && your_safety != WIN)
-      value = a;
-    else if (our_safety != WIN && your_safety == WIN)
+    else                               /* our_safety depends on ko. */
       value = b;
-    else
-      value = 1.0; /* Both contingent on ko. Probably can't happen. */

     apos = pos;
     dpos = pos;





reply via email to

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