gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] Caching of unbranched owl nodes.


From: Gunnar Farneback
Subject: [gnugo-devel] Caching of unbranched owl nodes.
Date: Wed, 28 Jan 2004 20:25:04 +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)

For the owl reading, caching of results is only done below (above?)
owl_branch_depth. The idea behind this is that there's no point in
further caching when the reading is unbranched. However, that
assumption is incorrect. It may very well happen that a transposition
of an earlier position is first reached in the unbranched part of the
reading tree. In fact it happens fairly often.

This patch removes this limitation on the caching. Regression results
are

arb:210         FAIL C8 [D8]
strategy2:53    PASS S15 [S15]
trevorc:1360    PASS F12 [F12]
global:4        FAIL F5 [Q6]
global:5        FAIL F5 [O4]
owl1:293        PASS 0 [0]
owl1:333        PASS 0 [0]
nngs4:650       PASS Q2 [Q2]
auto02:7        PASS 1 S15 [1 (S15|R15)]
safety:3        FAIL G16 [H15|H16|G14|F13|C17]
ninestones:640  PASS H2 [J2|H2]
7 PASS
4 FAIL
Total nodes: 1487167985 2644542 10879936 (+0.41% -3.6% +0.065%)

Comments on the failures:
arb:210     Owl reading improved (now certain that F15 cannot be
            attacked), accidental fail. 
global:4,5  Owl attack of E4 found at F5 after the patch and valued
            higher than the correct answer. I can't say whether this
            is unreasonable but it's not really the fault of this
            patch if it is.
safety:3    Now certain there's no owl attack on E16; seems reasonable
            to me. Mostly accidental fail since the urgency of
            strengthening the dragon isn't appreciated.

/Gunnar

Index: engine/owl.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/owl.c,v
retrieving revision 1.196
diff -u -r1.196 owl.c
--- engine/owl.c        24 Jan 2004 23:21:13 -0000      1.196
+++ engine/owl.c        28 Jan 2004 18:41:20 -0000
@@ -1697,7 +1697,7 @@
 
 #if USE_HASHTABLE_NG
 
-  if ((stackp <= owl_branch_depth) && (hashflags & HASH_OWL_ATTACK)
+  if ((hashflags & HASH_OWL_ATTACK)
       && tt_get(&ttable, komaster, kom_pos, OWL_ATTACK, str,
                depth - stackp, NULL, 
                &value1, &value2, &xpos) == 2) {
@@ -1729,7 +1729,7 @@
 
 #else
 
-  if ((stackp <= owl_branch_depth) && (hashflags & HASH_OWL_ATTACK)) {
+  if (hashflags & HASH_OWL_ATTACK) {
     found_read_result = get_read_result(OWL_ATTACK, komaster, kom_pos, 
                                        &str, &read_result);
     if (found_read_result) {
@@ -2425,7 +2425,7 @@
   
 #if USE_HASHTABLE_NG
 
-  if ((stackp <= owl_branch_depth) && (hashflags & HASH_OWL_DEFEND)
+  if ((hashflags & HASH_OWL_DEFEND)
       && tt_get(&ttable, komaster, kom_pos, OWL_DEFEND, str,
                depth - stackp, NULL, 
                &value1, &value2, &xpos) == 2) {
@@ -2457,7 +2457,7 @@
 
 #else
 
-  if ((stackp <= owl_branch_depth) && (hashflags & HASH_OWL_DEFEND)) {
+  if (hashflags & HASH_OWL_DEFEND) {
     found_read_result = get_read_result(OWL_DEFEND, komaster, kom_pos,
                                        &str, &read_result);
     if (found_read_result) {




reply via email to

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