gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] liberty counting


From: Paul Pogonyshev
Subject: [gnugo-devel] liberty counting
Date: Mon, 14 Oct 2002 02:26:11 +0300

the main intent of this patch is to make accurate_approxlib() much
faster. it is not widely used now, so it won't have noticable impact
on performance. but it allows potentially wider use of the function
(instead of approxlib() which ignores captures). this will hopefully
give a couple of PASSes one day.

here is the complete list of changes:
  - accurate_approxlib() is rewritten, moved to board.c and renamed to
    exactlib() (since it is complete and in contrast to approxlib()).
    it now never actually plays the move and only uses incremental
    board data. must be much faster.
  - is_self_atari() uses exactlib() instead of playing the move if
    incremental_sloppy_self_atari() don't know the answer.
  - change in the way fastlib() handles captures (generalized). it's
    #if'ed for now, for there must have been some reason for those
    conditions. i can't see it, but if anyone can, it will be easy to
    return to the old version.
  - updated comments before fastlib() (not related with the previous
    item).
  - two new macros in board.c: UNMARKED_COLOR_STRING and
    MARKED_COLOR_STRING. can potentially replace all instances of
    UNMARKED_OWN_STRING and UNMARKED_OPPONENT_STRING, but i replaced
    them only in obvious cases (so far).
  - minor changes in approxlib() which don't affect its behaviour.

regression delta is zero, as it should be. practically, there might
remain some small bug in exactlib(), since i've had lots of them in
first versions. if anyone is willing to dig through the code and chcek
it, that will be great ;)

per Evan's profile, this patch should somewhat reduce the number of
calls to do_trymove(). about 1% must be gone due to the fact that
exactlib() (formerly accurate_approxlib()) doesn't call do_trymove()
anymore. further, since is_self_atari() is called about as frequent as
do_trymove(), number of calls to do_trymove() must be reduced by
amount of incremental_sloppy_self_atari() fails.

now it mustn't be too expensive to replace a call to approxlib() with
a call to exactlib(). so, if such a replacement gives clear profit, it
must be at least tried. i haven't looked for examples yet (but hope
there are some ;).

Paul


Index: gnugo/engine/utils.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/utils.c,v
retrieving revision 1.58
diff -u -r1.58 utils.c
--- gnugo/engine/utils.c        9 Oct 2002 18:36:23 -0000       1.58
+++ gnugo/engine/utils.c        13 Oct 2002 23:17:48 -0000
@@ -762,52 +762,6 @@
   ko_depth          = save_ko_depth;
 }
 
-/* Play a stone at (pos) and count the number of liberties for the
- * resulting string. This requires (pos) to be empty.
- *
- * This function differs from approxlib() by the fact that it removes
- * captured stones before counting the liberties.
- */
-
-int
-accurate_approxlib(int pos, int color, int maxlib, int *libs)
-{
-  int fast_liberties = -1;
-  int liberties = 0;
-  SGFTree *save_sgf_dumptree = sgf_dumptree;
-  int save_count_variations = count_variations;
-
-  ASSERT1(board[pos] == EMPTY, pos);
-  ASSERT1(IS_STONE(color), pos);
-
-  if (!libs) {
-    fast_liberties = fastlib(pos, color, 0);
-    if (fast_liberties >= 0) {
-      return fast_liberties;
-    } 
-  }
-
-  sgf_dumptree = 0;
-  /* Use tryko() since we don't care whether the move would violate
-   * the ko rule.
-   */
-  if (tryko(pos, color, "accurate approxlib", EMPTY, 0)) {
-    if (libs != NULL)
-      liberties = findlib(pos, maxlib, libs);
-    else
-      liberties = countlib(pos);
-    popgo();
-  }
-
-  if (fast_liberties >= 0 && liberties > 0) {
-    ASSERT1(fast_liberties == liberties, pos);
-  }
-
-  sgf_dumptree = save_sgf_dumptree;
-  count_variations = save_count_variations;
-
-  return liberties;
-}
 
 /*******************
  * Detect blunders *
@@ -855,7 +809,7 @@
             char safe_stones[BOARDMAX])
 {
   int libs[5];
-  int liberties = accurate_approxlib(move, color, 5, libs);
+  int liberties = exactlib(move, color, 5, libs);
   int apos;
   int trouble = 0;
   int save_verbose = verbose;
Index: gnugo/engine/readconnect.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/readconnect.c,v
retrieving revision 1.36
diff -u -r1.36 readconnect.c
--- gnugo/engine/readconnect.c  10 Sep 2002 20:06:01 -0000      1.36
+++ gnugo/engine/readconnect.c  13 Oct 2002 23:17:54 -0000
@@ -2946,7 +2946,7 @@
   if (findlib(str, 1, &lib) > 1)
     return 0;
 
-  if (accurate_approxlib(lib, board[str], 2, NULL) > 1)
+  if (exactlib(lib, board[str], 2, NULL) > 1)
     return 0;
 
   /* FIXME: Should exclude snapback. */
Index: gnugo/engine/owl.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/owl.c,v
retrieving revision 1.111
diff -u -r1.111 owl.c
--- gnugo/engine/owl.c  9 Oct 2002 23:23:21 -0000       1.111
+++ gnugo/engine/owl.c  13 Oct 2002 23:18:05 -0000
@@ -4285,8 +4285,8 @@
       else
        pos2 = libs[0];
 
-      if (accurate_approxlib(pos2, color, MAXLIBS, NULL)
-         > accurate_approxlib(defense_point, color, MAXLIBS, NULL)
+      if (exactlib(pos2, color, MAXLIBS, NULL)
+         > exactlib(defense_point, color, MAXLIBS, NULL)
          && does_defend(pos2, lunch)) {
        TRACE("Moved defense of lunch %1m from %1m to %1m.\n",
              lunch, defense_point, pos2);
Index: gnugo/engine/liberty.h
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/liberty.h,v
retrieving revision 1.124
diff -u -r1.124 liberty.h
--- gnugo/engine/liberty.h      9 Oct 2002 18:36:23 -0000       1.124
+++ gnugo/engine/liberty.h      13 Oct 2002 23:18:10 -0000
@@ -159,6 +159,7 @@
 int findlib(int str, int maxlib, int *libs);
 int fastlib(int pos, int color, int ignore_capture);
 int approxlib(int pos, int color, int maxlib, int *libs);
+int exactlib(int pos, int color, int maxlib, int *libs);
 int count_common_libs(int str1, int str2);
 int find_common_libs(int str1, int str2, int maxlib, int *libs);
 int have_common_lib(int str1, int str2, int *lib);
@@ -169,9 +170,6 @@
 
 void update_random_seed(void);
 
-
-/* Play at (pos) and then count the liberties. */
-int accurate_approxlib(int pos, int color, int maxlib, int *libs);
 
 /* Check for self atari. */
 int is_self_atari(int pos, int color);
Index: gnugo/engine/board.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/board.c,v
retrieving revision 1.52
diff -u -r1.52 board.c
--- gnugo/engine/board.c        5 Oct 2002 09:15:44 -0000       1.52
+++ gnugo/engine/board.c        13 Oct 2002 23:18:18 -0000
@@ -202,6 +202,17 @@
   (board[pos] == string[s].color\
    && string[string_number[pos]].mark != string_mark)
 
+/* Note that these two macros are not complementary. Both return
+ * false if board[pos] != color.
+ */
+#define UNMARKED_COLOR_STRING(pos, color)\
+  (board[pos] == color\
+   && string[string_number[pos]].mark != string_mark)
+
+#define MARKED_COLOR_STRING(pos, color)\
+  (board[pos] == color\
+   && string[string_number[pos]].mark == string_mark)
+
 #define MARK_STRING(pos) string[string_number[pos]].mark = string_mark
 
 #define STRING_AT_VERTEX(pos, s)\
@@ -1996,16 +2007,17 @@
 
 /* Count the liberties a stone of the given color would get if played
  * at (pos).  Captures are ignored based on the ignore_capture flag.
- * (pos) must be empty.  It will fail if there is more than one
+ * (pos) must be empty.  It will fail if there is more than two
  * string neighbor of the same color.  In this case, the return value
- * is -1.  Captures are not handled, so if ignore_capture is 0, and
- * a capture is required, -1 is returned.
+ * is -1.  Captures are handled in a very limited way, so if 
+ * ignore_capture is 0, and a capture is required, it will often
+ * return -1.
  *
  * The intent of this function is to be as fast as possible, not
- * necessarily complete.
+ * necessarily complete. But if it returns a positive value (meaning
+ * it has succeeded), the value is guaranteed to be correct.
  *
- * Note well, that it relies on incremental data (?), and the number
- * of liberties (if over MAX_LIBERTIES) may be inaccurate (?).
+ * Note well, that it relies on incremental data.
  */
 
 int
@@ -2042,6 +2054,7 @@
         ally1 = neighbor;
     }
   }
+  
   for (k = 0; k < 4; k++) {
     int neighbor = pos + delta[k];
     int neighbor_color = board[neighbor];
@@ -2049,11 +2062,16 @@
         && neighbor_color == other
        && LIBERTIES(neighbor) == 1) {
       int neighbor_size = COUNTSTONES(neighbor);
+#if 0
       if ((neighbor_size <= 2 && !ally1)
-          || (neighbor_size == 1
+       || (neighbor_size == 1
               && ally1 
               && !ally2
               && COUNTSTONES(ally1) == 1)) {
+#else
+      if (neighbor_size == 1
+         || (neighbor_size == 2 && !ally1)) {
+#endif
         /* Here, we can gain only the adjacent new liberty. */
         fast_liberties++;
       }
@@ -2072,6 +2090,7 @@
     fast_liberties += LIBERTIES(ally1) - 1;
   if (ally2)
     fast_liberties += LIBERTIES(ally2) - count_common_libs(ally1, ally2);
+  
   return fast_liberties;
 }
 
@@ -2092,16 +2111,14 @@
 {
   int k;
   int liberties = 0;
-  int fast_liberties = 0;
 
   ASSERT1(board[pos] == EMPTY, pos);
   ASSERT1(IS_STONE(color), pos);
 
   if (!libs) {
-    fast_liberties = fastlib(pos, color, 1);
-    if (fast_liberties >= 0) {
+    int fast_liberties = fastlib(pos, color, 1);
+    if (fast_liberties >= 0)
       return fast_liberties;
-    }
   }
 
   if (!strings_initialized)
@@ -2123,7 +2140,7 @@
   MARK_LIBERTY(pos);
     
   if (UNMARKED_LIBERTY(SOUTH(pos))) {
-    if (libs != NULL && liberties < maxlib)
+    if (libs != NULL)
       libs[liberties] = SOUTH(pos);
     liberties++;
     /* Stop counting if we reach maxlib. */
@@ -2132,11 +2149,11 @@
     MARK_LIBERTY(SOUTH(pos));
   }
   else if (board[SOUTH(pos)] == color) {
-    int s = string_number[SOUTH(pos)];
-    for (k = 0; k < string[s].liberties; k++) {
-      int lib = string[s].libs[k];
+    struct string_data *s = &string[string_number[SOUTH(pos)]];
+    for (k = 0; k < s->liberties; k++) {
+      int lib = s->libs[k];
       if (UNMARKED_LIBERTY(lib)) {
-       if (libs != NULL && liberties < maxlib)
+       if (libs != NULL)
          libs[liberties] = lib;
        liberties++;
        if (liberties >= maxlib)
@@ -2147,7 +2164,7 @@
   }
   
   if (UNMARKED_LIBERTY(WEST(pos))) {
-    if (libs != NULL && liberties < maxlib)
+    if (libs != NULL)
       libs[liberties] = WEST(pos);
     liberties++;
     /* Stop counting if we reach maxlib. */
@@ -2156,11 +2173,11 @@
     MARK_LIBERTY(WEST(pos));
   }
   else if (board[WEST(pos)] == color) {
-    int s = string_number[WEST(pos)];
-    for (k = 0; k < string[s].liberties; k++) {
-      int lib = string[s].libs[k];
+    struct string_data *s = &string[string_number[WEST(pos)]];
+    for (k = 0; k < s->liberties; k++) {
+      int lib = s->libs[k];
       if (UNMARKED_LIBERTY(lib)) {
-       if (libs != NULL && liberties < maxlib)
+       if (libs != NULL)
          libs[liberties] = lib;
        liberties++;
        if (liberties >= maxlib)
@@ -2171,7 +2188,7 @@
   }
   
   if (UNMARKED_LIBERTY(NORTH(pos))) {
-    if (libs != NULL && liberties < maxlib)
+    if (libs != NULL)
       libs[liberties] = NORTH(pos);
     liberties++;
     /* Stop counting if we reach maxlib. */
@@ -2180,11 +2197,11 @@
     MARK_LIBERTY(NORTH(pos));
   }
   else if (board[NORTH(pos)] == color) {
-    int s = string_number[NORTH(pos)];
-    for (k = 0; k < string[s].liberties; k++) {
-      int lib = string[s].libs[k];
+    struct string_data *s = &string[string_number[NORTH(pos)]];
+    for (k = 0; k < s->liberties; k++) {
+      int lib = s->libs[k];
       if (UNMARKED_LIBERTY(lib)) {
-       if (libs != NULL && liberties < maxlib)
+       if (libs != NULL)
          libs[liberties] = lib;
        liberties++;
        if (liberties >= maxlib)
@@ -2194,29 +2211,27 @@
     }
   }
   
+  /* Note that we don't mark liberties anymore since we're about
+   * to leave.
+   */
   if (UNMARKED_LIBERTY(EAST(pos))) {
-    if (libs != NULL && liberties < maxlib)
+    if (libs != NULL)
       libs[liberties] = EAST(pos);
     liberties++;
     /* Stop counting if we reach maxlib. */
     if (liberties >= maxlib)
       return liberties;
-    /* Unneeded since we're about to leave. */
-#if 0
-    MARK_LIBERTY(EAST(pos));
-#endif
   }
   else if (board[EAST(pos)] == color) {
-    int s = string_number[EAST(pos)];
-    for (k = 0; k < string[s].liberties; k++) {
-      int lib = string[s].libs[k];
+    struct string_data *s = &string[string_number[EAST(pos)]];
+    for (k = 0; k < s->liberties; k++) {
+      int lib = s->libs[k];
       if (UNMARKED_LIBERTY(lib)) {
-       if (libs != NULL && liberties < maxlib)
+       if (libs != NULL)
          libs[liberties] = lib;
        liberties++;
        if (liberties >= maxlib)
          return liberties;
-       MARK_LIBERTY(lib);
       }
     }
   }  
@@ -2225,6 +2240,204 @@
 }
 
 
+/* Find the liberties a stone of the given color would get if played
+ * at (pos). This function takes into consideration all captures. Its
+ * return value is exact in that sense it counts all the liberties,
+ * unless (maxlib) allows it to stop earlier. (pos) must be empty. If
+ * libs != NULL, the locations of up to maxlib liberties are written
+ * into libs[]. The counting of liberties may or may not be halted
+ * when maxlib is reached. The number of liberties is returned.
+ *
+ * This function guarantees that liberties which are not results of
+ * captures come first in libs[] array. To find whether all the 
+ * liberties starting from a given one are results of captures, one
+ * may use  if (board[libs[k]] != EMPTY)  construction.
+ *
+ * If you want the number or the locations of all liberties, however
+ * many they are, you should pass MAXLIBS as the value for maxlib and
+ * allocate space for libs[] accordingly.
+ */
+
+int
+exactlib(int pos, int color, int maxlib, int *libs)
+{
+  int k, l;
+  int liberties = 0;
+  int lib;
+  int captured[4];
+  int captures = 0;
+
+  ASSERT1(board[pos] == EMPTY, pos);
+  ASSERT1(IS_STONE(color), pos);
+
+  if (!libs) {
+    int fast_liberties = fastlib(pos, color, 0);
+    if (fast_liberties >= 0)
+      return fast_liberties;
+  }
+
+  if (!strings_initialized)
+    init_board();
+
+  string_mark++;
+  liberty_mark++;
+  MARK_LIBERTY(pos);
+
+  for (k = 0; k < 4; k++) {
+    int pos2 = pos + delta[k];
+    if (UNMARKED_LIBERTY(pos2)) {
+      /* A trivial liberty */
+      if (libs)
+       libs[liberties] = pos2;
+      liberties++;
+      if (liberties >= maxlib)
+       return liberties;
+
+      MARK_LIBERTY(pos2);
+    }
+    else if (board[pos2] == color) {
+      /* An own neighbor string */
+      struct string_data *s = &string[string_number[pos2]];
+      
+      if (s->liberties <= MAX_LIBERTIES || maxlib <= MAX_LIBERTIES - 1) {
+       /* The easy case - we already have all (necessary) liberties of
+        * the string listed
+        */
+       for (l = 0; l < s->liberties; l++) {
+         lib = s->libs[l];
+         if (UNMARKED_LIBERTY(lib)) {
+           if(libs)
+             libs[liberties] = lib;
+           liberties++;
+           if(liberties >= maxlib)
+             return liberties;
+
+           MARK_LIBERTY(lib);
+         }
+       }
+      }
+      else {
+       /* The harder case - we need to find all the liberties of the
+        * string by traversing its stones. We stop as soon as we have
+        * found all of them or have reached maxlib.
+        */
+       int l_remaining = s->liberties;
+       while (1) {
+         if (LIBERTY(SOUTH(pos2))) {
+           if (UNMARKED_LIBERTY(SOUTH(pos2))) {
+             if (libs)
+               libs[liberties] = SOUTH(pos2);
+             liberties++;
+             if (liberties >= maxlib)
+               return liberties;
+             MARK_LIBERTY(SOUTH(pos2));
+           }
+           if (! --l_remaining)
+             break;
+         }
+         
+         if (LIBERTY(WEST(pos2))) {
+           if (UNMARKED_LIBERTY(WEST(pos2))) {
+             if (libs)
+               libs[liberties] = WEST(pos2);
+             liberties++;
+             if (liberties >= maxlib)
+               return liberties;
+             MARK_LIBERTY(WEST(pos2));
+           }
+           if (! --l_remaining)
+             break;
+         }
+
+         if (LIBERTY(NORTH(pos2))) {
+           if (UNMARKED_LIBERTY(NORTH(pos2))) {
+             if (libs)
+               libs[liberties] = NORTH(pos2);
+             liberties++;
+             if (liberties >= maxlib)
+               return liberties;
+             MARK_LIBERTY(NORTH(pos2));
+           }
+           if (! --l_remaining)
+             break;
+         }
+
+         if (LIBERTY(EAST(pos2))) {
+           if (UNMARKED_LIBERTY(EAST(pos2))) {
+             if (libs)
+               libs[liberties] = EAST(pos2);
+             liberties++;
+             if (liberties >= maxlib)
+               return liberties;
+             MARK_LIBERTY(EAST(pos2));
+           }
+           if (! --l_remaining)
+             break;
+         }
+
+         pos2 = NEXT_STONE(pos2);
+       }
+      }
+
+      MARK_STRING(pos2);
+    }
+    else if (board[pos2] == OTHER_COLOR(color)
+        && string[string_number[pos2]].liberties == 1) {
+      /* A capture. */
+      captured[captures++] = pos2;
+    }
+  }
+
+  /* Now we look at all the captures found in the previous step */
+  for (k = 0; k < captures; k++) {
+    lib = captured[k];
+
+    /* Add the stone adjacent to (pos) to the list of liberties if
+     * it is not also adjacent to an own marked string (otherwise,
+     * it will be added later).
+     */
+    if (!MARKED_COLOR_STRING(SOUTH(lib), color)
+       && !MARKED_COLOR_STRING(WEST(lib), color)
+       && !MARKED_COLOR_STRING(NORTH(lib), color)
+       && !MARKED_COLOR_STRING(EAST(lib), color)) {
+      if (libs)
+       libs[liberties] = lib;
+      liberties++;
+      if (liberties >= maxlib)
+       return liberties;
+    }
+
+    /* Check if we already know of this capture. */
+    for (l = 0; l < k; l++)
+      if (string_number[captured[l]] == string_number[lib])
+       break;
+
+    if (l == k) {
+      /* Traverse all the stones of the capture and add to the list
+       * of liberties those, which are adjacent to at least one own
+       * marked string.
+       */
+      do {
+       if (MARKED_COLOR_STRING(SOUTH(lib), color)
+           || MARKED_COLOR_STRING(WEST(lib), color)
+           || MARKED_COLOR_STRING(NORTH(lib), color)
+           || MARKED_COLOR_STRING(EAST(lib), color)) {
+         if (libs)
+           libs[liberties] = lib;
+         liberties++;
+         if (liberties >= maxlib)
+           return liberties;
+       }
+
+       lib = NEXT_STONE(lib);
+      } while (lib != captured[k]);
+    }
+  }
+
+  return liberties;
+}
+
+
 /* Find the number of common liberties of the two strings at str1 and str2.
  */
 
@@ -2636,7 +2849,6 @@
 int
 is_self_atari(int pos, int color)
 {
-  int liberties;
   int result;
   
   ASSERT_ON_BOARD1(pos);
@@ -2646,21 +2858,14 @@
   if (!strings_initialized)
     init_board();
 
-  /* 1. Try first without really putting the stone on the board. */
+  /* 1. Try first to solve the problem without much work. */
   /* FIXME: Integrate incremental_sloppy_self_atari() here. */
   result = incremental_sloppy_self_atari(pos, color);
   if (result != -1)
     return result;
 
-  /* 2. It was not so easy.  Now see if we can put the stone on the board.
-   *    If we can't, this is a self atari.
-   */
-  if (!do_trymove(pos, color, 1))
-    return 1;
-  liberties = string[string_number[pos]].liberties;
-  silent_popgo();
-  
-  return liberties <= 1;
+  /* 2. It was not so easy.  We use exactlib() in this case. */
+  return exactlib(pos, color, 2, NULL) <= 1;
 }
 
 
@@ -3854,44 +4059,44 @@
    */
   string_mark++;
 
-  if (board[south] == color && UNMARKED_STRING(south)) {
+  if (UNMARKED_COLOR_STRING(south, color)) {
     neighbor_allies++;
     s = string_number[south];
     MARK_STRING(south);
   }
-  else if (board[south] == other && UNMARKED_STRING(south)) {
+  else if (UNMARKED_COLOR_STRING(south, other)) {
     remove_liberty(string_number[south], pos);
     MARK_STRING(south);
   }    
   
-  if (board[west] == color && UNMARKED_STRING(west)) {
+  if (UNMARKED_COLOR_STRING(west, color)) {
     neighbor_allies++;
     s = string_number[west];
     MARK_STRING(west);
   }
-  else if (board[west] == other && UNMARKED_STRING(west)) {
+  else if (UNMARKED_COLOR_STRING(west, other)) {
     remove_liberty(string_number[west], pos);
     MARK_STRING(west);
   }    
   
-  if (board[north] == color && UNMARKED_STRING(north)) {
+  if (UNMARKED_COLOR_STRING(north, color)) {
     neighbor_allies++;
     s = string_number[north];
     MARK_STRING(north);
   }
-  else if (board[north] == other && UNMARKED_STRING(north)) {
+  else if (UNMARKED_COLOR_STRING(north, other)) {
     remove_liberty(string_number[north], pos);
     MARK_STRING(north);
   }    
   
-  if (board[east] == color && UNMARKED_STRING(east)) {
+  if (UNMARKED_COLOR_STRING(east, color)) {
     neighbor_allies++;
     s = string_number[east];
 #if 0
     MARK_STRING(east);
 #endif
   }
-  else if (board[east] == other && UNMARKED_STRING(east)) {
+  else if (UNMARKED_COLOR_STRING(east, other)) {
     remove_liberty(string_number[east], pos);
 #if 0
     MARK_STRING(east);
@@ -3953,8 +4158,7 @@
        return liberties;
       MARK_LIBERTY(pos + d);
     }
-    else if (board[pos + d] == color
-            && UNMARKED_STRING(pos + d)) {
+    else if (UNMARKED_COLOR_STRING(pos + d, color)) {
       int s = string_number[pos + d];
       int pos2;
       pos2 = FIRST_STONE(s);
Index: gnugo/patterns/mkpat.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/patterns/mkpat.c,v
retrieving revision 1.82
diff -u -r1.82 mkpat.c
--- gnugo/patterns/mkpat.c      30 Sep 2002 21:04:14 -0000      1.82
+++ gnugo/patterns/mkpat.c      13 Oct 2002 23:18:24 -0000
@@ -224,9 +224,9 @@
   {"approx_olib",              1, 0.03,
                "approxlib(%s, color, MAX_LIBERTIES, NULL)"},
   {"xlib",                     1, 0.05,
-       "accurate_approxlib(%s, OTHER_COLOR(color), MAX_LIBERTIES, NULL)"},
+       "exactlib(%s, OTHER_COLOR(color), MAX_LIBERTIES, NULL)"},
   {"olib",                     1, 0.05,
-       "accurate_approxlib(%s,color, MAX_LIBERTIES, NULL)"},
+       "exactlib(%s, color, MAX_LIBERTIES, NULL)"},
   {"xcut",                     1, 0.01, "cut_possible(%s,OTHER_COLOR(color))"},
   {"ocut",                     1, 0.05, "cut_possible(%s,color)"},
   {"edge_double_sente",        4, 3.00,





reply via email to

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