gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] Owl persistent cache


From: Gunnar Farneback
Subject: Re: [gnugo-devel] Owl persistent cache
Date: Thu, 28 Feb 2002 21:13:50 +0100
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)

Dan wrote:
>  Stored result in cache (entry 13):
> movenum         = 59
> tactical_nodes  = 276101
> routine         = OWL_DEFEND
> (apos)                     = C6
> (bpos)                          = PASS
> (cpos)                               = PASS

There shouldn't be any tabs in this output.

> result          = 3
> (move)          = D7
> (move2)         = PASS
>    A B C D E F G H J K L M N O P Q R S T
> 19 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 19
> 18 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 18
> 17 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 17
> 16 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 16
> 15 ? ? ? . ? ? ? ? ? ? . ? ? ? ? ? ? ? ? 15
> 14 ? ? . x . ? ? ? . . x . ? ? ? X X ? ? 14
> 13 ? ? . . . o . . x . . . . . . . . . . 13
> 12 ? . x . . . . O O . o . o . . . o . . 12
> 11 . . . . . . . . . . . . . . . . . . . 11
> 10 . . . . . . . x . x . . . . . . . . . 10
>  9 . . o . . . . . . . . . . . . . o . . 9
>  8 . . . . . x . . . . . . x . . . . . . 8
>  7 . . . . x . . . . . . . . . . . . . . 7
>  6 . .[O]. o x . . . . . . . . . . o . . 6
>  5 . . O . o . . . . . x . . . . . . x . 5
>  4 . o . x . x . . . . . . . x . x . . . 4
>  3 . X X . . . . . . . x . . . . . . . . 3
>  2 . . . . . . . . . . . . . . . . . . . 2
>  1 . . . . . . . . . . . . . . . . . . . 1
>    A B C D E F G H J K L M N O P Q R S T

This active area just doesn't make any sense. Indeed there's a huge
bug here which was introduced in 3.1.11, during the 1D conversions.

This is fixed by the appended patch, after which we instead get the
much more reasonable (but possibly too small) active area below.

owl_defend C6, result 3 D7 (802, 276101 nodes, 0.00 seconds)
 Stored result in cache (entry 13):
movenum         = 60
tactical_nodes  = 276101
routine         = OWL_DEFEND
(apos)          = C6
(bpos)          = PASS
(cpos)          = PASS
result          = 3
(move)          = D7
(move2)         = PASS
   A B C D E F G H J K L M N O P Q R S T
19 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 19
18 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 18
17 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 17
16 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 16
15 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 15
14 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 14
13 ? ? . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 13
12 ? . x . ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 12
11 . . . . . ? ? ? ? ? ? ? ? ? ? ? ? ? ? 11
10 . . . . . . ? ? ? ? ? ? ? ? ? ? ? ? ? 10
 9 . . o . . . . ? ? ? ? ? ? ? ? ? ? ? ? 9
 8 . . . . . x . ? ? ? ? ? ? ? ? ? ? ? ? 8
 7 . . . . x . . ? ? ? ? ? ? ? ? ? ? ? ? 7
 6 . .[O]. o x . . ? ? ? ? ? ? ? ? ? ? ? 6
 5 . . O . o . . . . ? ? ? ? ? ? ? ? ? ? 5
 4 . o . x . x . . ? ? ? ? ? ? ? ? ? ? ? 4
 3 . X X . . . . ? ? ? ? ? ? ? ? ? ? ? ? 3
 2 . . ? . . . ? ? ? ? ? ? ? ? ? ? ? ? ? 2
 1 . ? ? ? . ? ? ? ? ? ? ? ? ? ? ? ? ? ? 1
   A B C D E F G H J K L M N O P Q R S T

Expect a huge speed improvement when playing games after this patch
has been applied. It will probably also speed up the regressions, but
not dramatically. I've actually already added the patch to CVS without
checking any regressions. If something breaks, then so be it.

/Gunnar

Index: engine/owl.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/owl.c,v
retrieving revision 1.69
diff -u -r1.69 owl.c
--- engine/owl.c        28 Feb 2002 18:13:56 -0000      1.69
+++ engine/owl.c        28 Feb 2002 20:05:48 -0000
@@ -4780,10 +4780,10 @@
     for (pos = BOARDMIN; pos < BOARDMAX; pos++){
       if (!ON_BOARD(pos) || board[pos] == other || active[pos] != 0) 
        continue;
-      if ((ON_BOARD(SOUTH(pos)) && active[SOUTH(pos)])
-         || (ON_BOARD(WEST(pos)) && active[WEST(pos)])
-         || (ON_BOARD(NORTH(pos)) && active[NORTH(pos)])
-         || (ON_BOARD(EAST(pos)) && active[EAST(pos)])) {
+      if ((ON_BOARD(SOUTH(pos)) && active[SOUTH(pos)] == k)
+         || (ON_BOARD(WEST(pos)) && active[WEST(pos)] == k)
+         || (ON_BOARD(NORTH(pos)) && active[NORTH(pos)] == k)
+         || (ON_BOARD(EAST(pos)) && active[EAST(pos)] == k)) {
        if (board[pos] == EMPTY)
          active[pos] = k + 1;
        else
@@ -4858,9 +4858,9 @@
   gprintf("%omovenum         = %d\n",  entry->movenum);
   gprintf("%otactical_nodes  = %d\n",  entry->tactical_nodes);
   gprintf("%oroutine         = %s\n",  routine_to_string(entry->routine));
-  gprintf("%o(apos)         = %1m\n", entry->apos);
-  gprintf("%o(bpos)         = %1m\n", entry->bpos);
-  gprintf("%o(cpos)         = %1m\n", entry->cpos);
+  gprintf("%o(apos)          = %1m\n", entry->apos);
+  gprintf("%o(bpos)          = %1m\n", entry->bpos);
+  gprintf("%o(cpos)          = %1m\n", entry->cpos);
   gprintf("%oresult          = %d\n",  entry->result);
   gprintf("%o(move)          = %1m\n", entry->move);
   gprintf("%o(move2)         = %1m\n", entry->move2);



reply via email to

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