gnugo-devel
[Top][All Lists]
Advanced

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

[gnugo-devel] Patch: new cache implementation


From: Inge Wallin
Subject: [gnugo-devel] Patch: new cache implementation
Date: Sat, 5 Jul 2003 13:38:43 -0400 (EDT)

Here is the first implementation of the new hash and cache scheme that
I described in
http://mail.gnu.org/archive/html/gnugo-devel/2003-02/msg00046.html. If
you don't remember it, I suggest that you reread that mail before
going any further here.

I started out to implement the suggestion yesterday.  It turned out to
be even simpler than I thought, so I managed to finish it in one
evening.  However, I really should thank Paul Pogonyshev that spotted
a serious bug in the preliminary code.

Contained at the end of this mail is a patch that implements the new
cache in parallel with the old one.  This means that I use the new
transposition table for the tactical reading functions and the old one
for owl, readconnect and semeai reading.

I present the initial patch here so that it can be discussed.  Please
note that there are a few issues with it right now, and that it will
be better integrated as I continue to work on it.  I don't regard it
as finished in any sense of the word. Known issues right now are:

1. I use the type uint64_t from stdint.h as a 64 bit integer that
   stores the hash value.  This is a type that is defined in the C99
   standard.   However, we were discussing the patch on NNGS yesterday
   and Gunnar has issues with that, since he thinks that there are too
   many old compilers out there that don't have stdint.h.

   I hope that some expert in autoconfig can device a test for stdint
   so that I can use it if it works and implement another way if there
   are only 32 bit integers on the target system.  Arend?


2. The old implementation and the new one currently resides side by
   side.  The plan is to retire the old one and only use the new one.
   That will have to be done after I come back from my vacation in two
   weeks. 

   Currently I allocate 1% of the memory to the old hash table and 99%
   of it for the new one.  The reason for this is that we discussed
   the relation between owl nodes and tactical reading nodes
   yesterday, and Gunnar stated that in the regressions approximately
   500 tactical nodes per owl node were used.

   I think that owl nodes are more important to save than tactical
   reading nodes so instead of 0.2% I allocate 1%, and that seems to
   work out pretty well.

What are the results then?  Pretty promising.

Although I have only implemented the new scheme for do_attack() and
do_find_defense() yet, there is already a 5% increase in performace.
This is completely due to a more efficient caching of reading nodes.
This makes me think that it might even be useful to enter the patch
into gnugo before 3.4.  

I have run the regressions and one might think that there should be no
changes.  There are changes, however.  Here is the current breakage
due to this patch:

./regress.sh . ld_owl.tst
194 unexpected FAIL: Correct '3 B1', got '1 A5'
./regress.sh . optics.tst
1201 unexpected FAIL: Correct '1 2 T8 T8', got '0 0'
./regress.sh . arb.tst
203 unexpected FAIL: Correct 'T7', got 'N3'
./regress.sh . trevorb.tst
120 unexpected PASS!
./regress.sh . nicklas1.tst
1406 unexpected PASS!
./regress.sh . nngs.tst
1060 unexpected PASS!
./regress.sh . 13x13.tst
31 unexpected PASS!
53 unexpected PASS!
65 unexpected PASS!

There might be a few more, but my run has only gotten as far as
strategy4.tst.  

I beleive the FAILs are due to the difference in number of
owl/readconnect/semeai nodes in the cache.  A few heavy readings will
use more owl nodes than there are room for in the table, and this
leads to worse caching and less efficient usage of the available 1000
owl nodes.  This will go away, when the new cache is integrated into
all corners of GNU go.

The PASSes are more interesting.  Why would there be any PASSes at
all?  I don't know, but I don't think it signals anything significant
like a bug in the implementation or so.

A few words about the implementation.  It did it pretty quickly and I
was more interested in getting it to work than in beauty.  One way
that you can see this is that I have a suffix, _ng, to all variables
and functions.  The letters ng mean Next Generation and this suffix
will be removed in the final version.  I just wanted to poke around as
little as possible in the old cache and this seemed like a safe way to
do it.

I am going away on a two week vacation starting tomorrow.  That is why
I present this to you already today before it is finished.  I would be
interested in seeing any quick comments that you have.  I will not see
arything that is not written tonight until I come back.

         -Inge


================================================================

diff -ur gnugo/engine/.deps/aftermath.Po gnugo-tt/engine/.deps/aftermath.Po
--- gnugo/engine/.deps/aftermath.Po     Sun Jun 29 21:51:56 2003
+++ gnugo-tt/engine/.deps/aftermath.Po  Sat Jul  5 13:58:13 2003
@@ -14,7 +14,8 @@
   /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
-  /usr/include/bits/string2.h liberty.h hash.h
+  /usr/include/bits/string2.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h
 
 gnugo.h:
 
@@ -91,3 +92,9 @@
 liberty.h:
 
 hash.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
diff -ur gnugo/engine/.deps/board.Po gnugo-tt/engine/.deps/board.Po
--- gnugo/engine/.deps/board.Po Sun Jun 29 21:51:57 2003
+++ gnugo-tt/engine/.deps/board.Po      Sat Jul  5 13:58:15 2003
@@ -13,7 +13,8 @@
   /usr/include/bits/string.h /usr/include/bits/string2.h \
   /usr/include/endian.h /usr/include/bits/endian.h /usr/include/stdlib.h \
   /usr/include/sys/types.h /usr/include/sys/sysmacros.h \
-  /usr/include/alloca.h liberty.h hash.h ../utils/gg_utils.h
+  /usr/include/alloca.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h ../utils/gg_utils.h
 
 gnugo.h:
 
@@ -91,4 +92,10 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../utils/gg_utils.h:
diff -ur gnugo/engine/.deps/breakin.Po gnugo-tt/engine/.deps/breakin.Po
--- gnugo/engine/.deps/breakin.Po       Sun Jun 29 21:52:03 2003
+++ gnugo-tt/engine/.deps/breakin.Po    Sat Jul  5 13:58:23 2003
@@ -9,7 +9,8 @@
   ../sgf/sgftree.h ../sgf/sgf_properties.h clock.h \
   /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \
   /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h liberty.h hash.h readconnect.h \
+  /usr/include/bits/sigset.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h readconnect.h \
   /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
@@ -73,6 +74,12 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 readconnect.h:
 
 /usr/include/stdlib.h:
diff -ur gnugo/engine/.deps/cache.Po gnugo-tt/engine/.deps/cache.Po
--- gnugo/engine/.deps/cache.Po Sat Jul  5 13:53:36 2003
+++ gnugo-tt/engine/.deps/cache.Po      Sat Jul  5 13:58:24 2003
@@ -1,5 +1,6 @@
-cache.o: cache.c gnugo.h /usr/include/stdio.h /usr/include/features.h \
-  /usr/include/sys/cdefs.h /usr/include/gnu/stubs.h \
+cache.o: cache.c ../utils/random.h gnugo.h /usr/include/stdio.h \
+  /usr/include/features.h /usr/include/sys/cdefs.h \
+  /usr/include/gnu/stubs.h \
   /usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stddef.h \
   /usr/include/bits/types.h /usr/include/bits/pthreadtypes.h \
   /usr/include/bits/sched.h /usr/include/libio.h /usr/include/_G_config.h \
@@ -19,7 +20,9 @@
   /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
   /usr/include/bits/posix2_lim.h /usr/include/string.h \
   /usr/include/bits/string.h /usr/include/bits/string2.h liberty.h hash.h \
-  cache.h
+  /usr/include/stdint.h /usr/include/bits/wordsize.h cache.h
+
+../utils/random.h:
 
 gnugo.h:
 
@@ -111,4 +114,8 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
 cache.h:
diff -ur gnugo/engine/.deps/clock.Po gnugo-tt/engine/.deps/clock.Po
--- gnugo/engine/.deps/clock.Po Sun Jun 29 21:52:05 2003
+++ gnugo-tt/engine/.deps/clock.Po      Sat Jul  5 13:58:26 2003
@@ -9,7 +9,8 @@
   ../sgf/sgftree.h ../sgf/sgf_properties.h clock.h \
   /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \
   /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h liberty.h hash.h ../utils/gg_utils.h
+  /usr/include/bits/sigset.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h ../utils/gg_utils.h
 
 gnugo.h:
 
@@ -69,4 +70,10 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../utils/gg_utils.h:
diff -ur gnugo/engine/.deps/combination.Po gnugo-tt/engine/.deps/combination.Po
--- gnugo/engine/.deps/combination.Po   Sun Jun 29 21:52:05 2003
+++ gnugo-tt/engine/.deps/combination.Po        Sat Jul  5 13:58:27 2003
@@ -13,7 +13,8 @@
   /usr/include/bits/sigset.h /usr/include/string.h \
   /usr/include/bits/string.h /usr/include/bits/string2.h \
   /usr/include/endian.h /usr/include/bits/endian.h /usr/include/stdlib.h \
-  liberty.h hash.h ../utils/gg_utils.h ../patterns/patterns.h
+  liberty.h hash.h /usr/include/stdint.h /usr/include/bits/wordsize.h \
+  cache.h ../utils/gg_utils.h ../patterns/patterns.h
 
 gnugo.h:
 
@@ -85,6 +86,12 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../utils/gg_utils.h:
 
 ../patterns/patterns.h:
diff -ur gnugo/engine/.deps/dragon.Po gnugo-tt/engine/.deps/dragon.Po
--- gnugo/engine/.deps/dragon.Po        Sat Jul  5 13:53:37 2003
+++ gnugo-tt/engine/.deps/dragon.Po     Sat Jul  5 13:58:29 2003
@@ -14,6 +14,7 @@
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
   /usr/include/bits/string2.h /usr/include/ctype.h liberty.h hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h cache.h \
   ../utils/gg_utils.h
 
 gnugo.h:
@@ -94,4 +95,10 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../utils/gg_utils.h:
diff -ur gnugo/engine/.deps/endgame.Po gnugo-tt/engine/.deps/endgame.Po
--- gnugo/engine/.deps/endgame.Po       Sun Jun 29 21:52:11 2003
+++ gnugo-tt/engine/.deps/endgame.Po    Sat Jul  5 13:58:34 2003
@@ -9,7 +9,8 @@
   ../sgf/sgftree.h ../sgf/sgf_properties.h clock.h \
   /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \
   /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h liberty.h hash.h
+  /usr/include/bits/sigset.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h
 
 gnugo.h:
 
@@ -68,3 +69,9 @@
 liberty.h:
 
 hash.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
diff -ur gnugo/engine/.deps/filllib.Po gnugo-tt/engine/.deps/filllib.Po
--- gnugo/engine/.deps/filllib.Po       Sun Jun 29 21:52:11 2003
+++ gnugo-tt/engine/.deps/filllib.Po    Sat Jul  5 13:58:35 2003
@@ -13,7 +13,8 @@
   /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
-  /usr/include/bits/string2.h liberty.h hash.h
+  /usr/include/bits/string2.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h
 
 gnugo.h:
 
@@ -90,3 +91,9 @@
 liberty.h:
 
 hash.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
diff -ur gnugo/engine/.deps/fuseki.Po gnugo-tt/engine/.deps/fuseki.Po
--- gnugo/engine/.deps/fuseki.Po        Sun Jun 29 21:52:12 2003
+++ gnugo-tt/engine/.deps/fuseki.Po     Sat Jul  5 13:58:37 2003
@@ -12,7 +12,8 @@
   /usr/include/bits/sigset.h /usr/include/stdlib.h \
   /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
-  /usr/include/alloca.h liberty.h hash.h ../patterns/patterns.h \
+  /usr/include/alloca.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h ../patterns/patterns.h \
   ../utils/random.h
 
 gnugo.h:
@@ -85,6 +86,12 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../patterns/patterns.h:
 
 ../utils/random.h:
diff -ur gnugo/engine/.deps/genmove.Po gnugo-tt/engine/.deps/genmove.Po
--- gnugo/engine/.deps/genmove.Po       Sun Jun 29 21:52:13 2003
+++ gnugo-tt/engine/.deps/genmove.Po    Sat Jul  5 13:58:37 2003
@@ -13,7 +13,8 @@
   /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
-  /usr/include/bits/string2.h liberty.h hash.h ../utils/gg_utils.h
+  /usr/include/bits/string2.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h ../utils/gg_utils.h
 
 gnugo.h:
 
@@ -91,4 +92,10 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../utils/gg_utils.h:
diff -ur gnugo/engine/.deps/globals.Po gnugo-tt/engine/.deps/globals.Po
--- gnugo/engine/.deps/globals.Po       Sun Jun 29 21:52:14 2003
+++ gnugo-tt/engine/.deps/globals.Po    Sat Jul  5 13:58:39 2003
@@ -9,7 +9,8 @@
   ../sgf/sgftree.h ../sgf/sgf_properties.h clock.h \
   /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \
   /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h liberty.h hash.h
+  /usr/include/bits/sigset.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h
 
 gnugo.h:
 
@@ -68,3 +69,9 @@
 liberty.h:
 
 hash.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
diff -ur gnugo/engine/.deps/handicap.Po gnugo-tt/engine/.deps/handicap.Po
--- gnugo/engine/.deps/handicap.Po      Sun Jun 29 21:52:14 2003
+++ gnugo-tt/engine/.deps/handicap.Po   Sat Jul  5 13:58:40 2003
@@ -10,7 +10,8 @@
   ../sgf/sgftree.h ../sgf/sgf_properties.h clock.h \
   /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \
   /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h liberty.h hash.h ../patterns/patterns.h \
+  /usr/include/bits/sigset.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h ../patterns/patterns.h \
   ../utils/random.h
 
 gnugo.h:
@@ -71,6 +72,12 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../patterns/patterns.h:
 
 ../utils/random.h:
diff -ur gnugo/engine/.deps/hash.Po gnugo-tt/engine/.deps/hash.Po
--- gnugo/engine/.deps/hash.Po  Sun Jun 29 21:52:14 2003
+++ gnugo-tt/engine/.deps/hash.Po       Sat Jul  5 13:58:40 2003
@@ -17,7 +17,8 @@
   /usr/lib/gcc-lib/i386-redhat-linux/2.96/include/syslimits.h \
   /usr/include/limits.h /usr/include/bits/posix1_lim.h \
   /usr/include/bits/local_lim.h /usr/include/linux/limits.h \
-  /usr/include/bits/posix2_lim.h liberty.h hash.h ../utils/random.h
+  /usr/include/bits/posix2_lim.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h ../utils/random.h
 
 gnugo.h:
 
@@ -103,4 +104,10 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../utils/random.h:
diff -ur gnugo/engine/.deps/influence.Po gnugo-tt/engine/.deps/influence.Po
--- gnugo/engine/.deps/influence.Po     Sun Jun 29 21:52:15 2003
+++ gnugo-tt/engine/.deps/influence.Po  Sat Jul  5 13:58:41 2003
@@ -14,8 +14,9 @@
   /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
-  /usr/include/bits/string2.h liberty.h hash.h influence.h \
-  /usr/include/assert.h ../patterns/patterns.h ../utils/gg_utils.h
+  /usr/include/bits/string2.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h influence.h /usr/include/assert.h \
+  ../patterns/patterns.h ../utils/gg_utils.h
 
 gnugo.h:
 
@@ -93,6 +94,12 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 influence.h:
 
 /usr/include/assert.h:
diff -ur gnugo/engine/.deps/interface.Po gnugo-tt/engine/.deps/interface.Po
--- gnugo/engine/.deps/interface.Po     Sun Jun 29 21:52:17 2003
+++ gnugo-tt/engine/.deps/interface.Po  Sat Jul  5 13:58:45 2003
@@ -14,7 +14,8 @@
   /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
-  /usr/include/bits/string2.h liberty.h hash.h ../utils/gg_utils.h
+  /usr/include/bits/string2.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h ../utils/gg_utils.h
 
 gnugo.h:
 
@@ -92,4 +93,10 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../utils/gg_utils.h:
diff -ur gnugo/engine/.deps/matchpat.Po gnugo-tt/engine/.deps/matchpat.Po
--- gnugo/engine/.deps/matchpat.Po      Sun Jun 29 21:52:18 2003
+++ gnugo-tt/engine/.deps/matchpat.Po   Sat Jul  5 13:58:46 2003
@@ -14,7 +14,8 @@
   /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
-  /usr/include/bits/string2.h liberty.h hash.h ../utils/gg_utils.h \
+  /usr/include/bits/string2.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h ../utils/gg_utils.h \
   ../patterns/patterns.h ../patterns/dfa.h /usr/include/errno.h \
   /usr/include/bits/errno.h /usr/include/linux/errno.h \
   /usr/include/asm/errno.h
@@ -95,6 +96,12 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../utils/gg_utils.h:
 
 ../patterns/patterns.h:
diff -ur gnugo/engine/.deps/move_reasons.Po 
gnugo-tt/engine/.deps/move_reasons.Po
--- gnugo/engine/.deps/move_reasons.Po  Sun Jun 29 21:52:19 2003
+++ gnugo-tt/engine/.deps/move_reasons.Po       Sat Jul  5 13:58:47 2003
@@ -17,7 +17,8 @@
   /usr/include/bits/string2.h /usr/include/math.h \
   /usr/include/bits/huge_val.h /usr/include/bits/mathdef.h \
   /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h liberty.h \
-  hash.h ../utils/gg_utils.h ../utils/random.h move_reasons.h
+  hash.h /usr/include/stdint.h /usr/include/bits/wordsize.h cache.h \
+  ../utils/gg_utils.h ../utils/random.h move_reasons.h
 
 gnugo.h:
 
@@ -105,6 +106,12 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../utils/gg_utils.h:
 
 ../utils/random.h:
diff -ur gnugo/engine/.deps/movelist.Po gnugo-tt/engine/.deps/movelist.Po
--- gnugo/engine/.deps/movelist.Po      Sun Jun 29 21:52:22 2003
+++ gnugo-tt/engine/.deps/movelist.Po   Sat Jul  5 13:58:51 2003
@@ -14,7 +14,8 @@
   /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
-  /usr/include/bits/string2.h liberty.h hash.h
+  /usr/include/bits/string2.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h
 
 gnugo.h:
 
@@ -91,3 +92,9 @@
 liberty.h:
 
 hash.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
diff -ur gnugo/engine/.deps/optics.Po gnugo-tt/engine/.deps/optics.Po
--- gnugo/engine/.deps/optics.Po        Sun Jun 29 21:52:22 2003
+++ gnugo-tt/engine/.deps/optics.Po     Sat Jul  5 13:58:52 2003
@@ -13,7 +13,8 @@
   /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
-  /usr/include/bits/string2.h liberty.h hash.h ../patterns/eyes.h \
+  /usr/include/bits/string2.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h ../patterns/eyes.h \
   ../utils/gg_utils.h
 
 gnugo.h:
@@ -92,6 +93,12 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../patterns/eyes.h:
 
 ../utils/gg_utils.h:
diff -ur gnugo/engine/.deps/owl.Po gnugo-tt/engine/.deps/owl.Po
--- gnugo/engine/.deps/owl.Po   Sat Jul  5 13:53:41 2003
+++ gnugo-tt/engine/.deps/owl.Po        Sat Jul  5 13:58:57 2003
@@ -13,8 +13,9 @@
   /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
-  /usr/include/bits/string2.h liberty.h hash.h ../patterns/patterns.h \
-  cache.h ../utils/gg_utils.h
+  /usr/include/bits/string2.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h ../patterns/patterns.h \
+  ../utils/gg_utils.h
 
 gnugo.h:
 
@@ -92,8 +93,12 @@
 
 hash.h:
 
-../patterns/patterns.h:
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
 
 cache.h:
 
+../patterns/patterns.h:
+
 ../utils/gg_utils.h:
diff -ur gnugo/engine/.deps/persistent.Po gnugo-tt/engine/.deps/persistent.Po
--- gnugo/engine/.deps/persistent.Po    Sat Jul  5 13:53:47 2003
+++ gnugo-tt/engine/.deps/persistent.Po Sat Jul  5 13:59:06 2003
@@ -13,7 +13,8 @@
   /usr/include/bits/sigset.h /usr/include/string.h \
   /usr/include/bits/string.h /usr/include/bits/string2.h \
   /usr/include/endian.h /usr/include/bits/endian.h /usr/include/stdlib.h \
-  liberty.h hash.h cache.h
+  liberty.h hash.h /usr/include/stdint.h /usr/include/bits/wordsize.h \
+  cache.h
 
 gnugo.h:
 
@@ -85,4 +86,8 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
 cache.h:
diff -ur gnugo/engine/.deps/printutils.Po gnugo-tt/engine/.deps/printutils.Po
--- gnugo/engine/.deps/printutils.Po    Sat Jul  5 13:53:49 2003
+++ gnugo-tt/engine/.deps/printutils.Po Sat Jul  5 13:59:09 2003
@@ -15,7 +15,8 @@
   /usr/include/endian.h /usr/include/bits/endian.h /usr/include/stdlib.h \
   /usr/include/sys/types.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/ctype.h liberty.h hash.h \
-  ../utils/gg_utils.h cache.h
+  /usr/include/stdint.h /usr/include/bits/wordsize.h cache.h \
+  ../utils/gg_utils.h
 
 gnugo.h:
 
@@ -95,6 +96,10 @@
 
 hash.h:
 
-../utils/gg_utils.h:
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
 
 cache.h:
+
+../utils/gg_utils.h:
diff -ur gnugo/engine/.deps/readconnect.Po gnugo-tt/engine/.deps/readconnect.Po
--- gnugo/engine/.deps/readconnect.Po   Sat Jul  5 13:53:50 2003
+++ gnugo-tt/engine/.deps/readconnect.Po        Sat Jul  5 13:59:10 2003
@@ -14,8 +14,8 @@
   /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
-  /usr/include/bits/string2.h liberty.h hash.h cache.h \
-  ../utils/gg_utils.h readconnect.h
+  /usr/include/bits/string2.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h ../utils/gg_utils.h readconnect.h
 
 gnugo.h:
 
@@ -93,6 +93,10 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
 cache.h:
 
 ../utils/gg_utils.h:
diff -ur gnugo/engine/.deps/reading.Po gnugo-tt/engine/.deps/reading.Po
--- gnugo/engine/.deps/reading.Po       Sat Jul  5 13:53:59 2003
+++ gnugo-tt/engine/.deps/reading.Po    Sat Jul  5 13:59:23 2003
@@ -13,8 +13,9 @@
   /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
-  /usr/include/bits/string2.h liberty.h hash.h cache.h \
-  ../patterns/patterns.h ../utils/gg_utils.h
+  /usr/include/bits/string2.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h ../patterns/patterns.h \
+  ../utils/gg_utils.h
 
 gnugo.h:
 
@@ -92,6 +93,10 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
 cache.h:
 
 ../patterns/patterns.h:
diff -ur gnugo/engine/.deps/score.Po gnugo-tt/engine/.deps/score.Po
--- gnugo/engine/.deps/score.Po Sun Jun 29 21:52:51 2003
+++ gnugo-tt/engine/.deps/score.Po      Sat Jul  5 13:59:31 2003
@@ -12,7 +12,8 @@
   /usr/include/bits/sigset.h /usr/include/string.h \
   /usr/include/bits/string.h /usr/include/bits/string2.h \
   /usr/include/endian.h /usr/include/bits/endian.h /usr/include/stdlib.h \
-  liberty.h hash.h ../utils/gg_utils.h
+  liberty.h hash.h /usr/include/stdint.h /usr/include/bits/wordsize.h \
+  cache.h ../utils/gg_utils.h
 
 gnugo.h:
 
@@ -84,4 +85,10 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../utils/gg_utils.h:
diff -ur gnugo/engine/.deps/semeai.Po gnugo-tt/engine/.deps/semeai.Po
--- gnugo/engine/.deps/semeai.Po        Sun Jun 29 21:52:52 2003
+++ gnugo-tt/engine/.deps/semeai.Po     Sat Jul  5 13:59:32 2003
@@ -12,7 +12,8 @@
   /usr/include/bits/sigset.h /usr/include/stdlib.h \
   /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
-  /usr/include/alloca.h liberty.h hash.h
+  /usr/include/alloca.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h
 
 gnugo.h:
 
@@ -83,3 +84,9 @@
 liberty.h:
 
 hash.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
diff -ur gnugo/engine/.deps/sgfdecide.Po gnugo-tt/engine/.deps/sgfdecide.Po
--- gnugo/engine/.deps/sgfdecide.Po     Sun Jun 29 21:52:53 2003
+++ gnugo-tt/engine/.deps/sgfdecide.Po  Sat Jul  5 13:59:34 2003
@@ -13,7 +13,8 @@
   /usr/include/bits/sigset.h /usr/include/string.h \
   /usr/include/bits/string.h /usr/include/bits/string2.h \
   /usr/include/endian.h /usr/include/bits/endian.h /usr/include/stdlib.h \
-  liberty.h hash.h
+  liberty.h hash.h /usr/include/stdint.h /usr/include/bits/wordsize.h \
+  cache.h
 
 gnugo.h:
 
@@ -84,3 +85,9 @@
 liberty.h:
 
 hash.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
diff -ur gnugo/engine/.deps/sgffile.Po gnugo-tt/engine/.deps/sgffile.Po
--- gnugo/engine/.deps/sgffile.Po       Sun Jun 29 21:52:54 2003
+++ gnugo-tt/engine/.deps/sgffile.Po    Sat Jul  5 13:59:35 2003
@@ -13,7 +13,8 @@
   /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
-  /usr/include/bits/string2.h liberty.h hash.h ../utils/gg_utils.h
+  /usr/include/bits/string2.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h ../utils/gg_utils.h
 
 gnugo.h:
 
@@ -91,4 +92,10 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../utils/gg_utils.h:
diff -ur gnugo/engine/.deps/shapes.Po gnugo-tt/engine/.deps/shapes.Po
--- gnugo/engine/.deps/shapes.Po        Sun Jun 29 21:52:54 2003
+++ gnugo-tt/engine/.deps/shapes.Po     Sat Jul  5 13:59:36 2003
@@ -12,7 +12,8 @@
   /usr/include/bits/sigset.h /usr/include/stdlib.h \
   /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
-  /usr/include/alloca.h liberty.h hash.h ../patterns/patterns.h
+  /usr/include/alloca.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h ../patterns/patterns.h
 
 gnugo.h:
 
@@ -84,4 +85,10 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../patterns/patterns.h:
diff -ur gnugo/engine/.deps/showbord.Po gnugo-tt/engine/.deps/showbord.Po
--- gnugo/engine/.deps/showbord.Po      Sun Jun 29 21:52:56 2003
+++ gnugo-tt/engine/.deps/showbord.Po   Sat Jul  5 13:59:38 2003
@@ -14,7 +14,8 @@
   /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
-  /usr/include/bits/string2.h liberty.h hash.h ../utils/gg_utils.h
+  /usr/include/bits/string2.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h ../utils/gg_utils.h
 
 gnugo.h:
 
@@ -92,4 +93,10 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../utils/gg_utils.h:
diff -ur gnugo/engine/.deps/surround.Po gnugo-tt/engine/.deps/surround.Po
--- gnugo/engine/.deps/surround.Po      Sun Jun 29 21:52:56 2003
+++ gnugo-tt/engine/.deps/surround.Po   Sat Jul  5 13:59:39 2003
@@ -15,7 +15,8 @@
   /usr/include/endian.h /usr/include/bits/endian.h /usr/include/stdlib.h \
   /usr/include/math.h /usr/include/bits/huge_val.h \
   /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/bits/mathinline.h liberty.h hash.h ../utils/gg_utils.h
+  /usr/include/bits/mathinline.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h ../utils/gg_utils.h
 
 gnugo.h:
 
@@ -97,4 +98,10 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../utils/gg_utils.h:
diff -ur gnugo/engine/.deps/utils.Po gnugo-tt/engine/.deps/utils.Po
--- gnugo/engine/.deps/utils.Po Sun Jun 29 21:52:58 2003
+++ gnugo-tt/engine/.deps/utils.Po      Sat Jul  5 13:59:42 2003
@@ -15,7 +15,8 @@
   /usr/include/sys/types.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/math.h /usr/include/bits/huge_val.h \
   /usr/include/bits/mathdef.h /usr/include/bits/mathcalls.h \
-  /usr/include/bits/mathinline.h liberty.h hash.h ../utils/random.h \
+  /usr/include/bits/mathinline.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h ../utils/random.h \
   ../utils/gg_utils.h
 
 gnugo.h:
@@ -104,6 +105,12 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../utils/random.h:
 
 ../utils/gg_utils.h:
diff -ur gnugo/engine/.deps/value_moves.Po gnugo-tt/engine/.deps/value_moves.Po
--- gnugo/engine/.deps/value_moves.Po   Sun Jun 29 21:53:01 2003
+++ gnugo-tt/engine/.deps/value_moves.Po        Sat Jul  5 13:59:45 2003
@@ -17,7 +17,8 @@
   /usr/include/bits/string2.h /usr/include/math.h \
   /usr/include/bits/huge_val.h /usr/include/bits/mathdef.h \
   /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h liberty.h \
-  hash.h ../utils/gg_utils.h move_reasons.h
+  hash.h /usr/include/stdint.h /usr/include/bits/wordsize.h cache.h \
+  ../utils/gg_utils.h move_reasons.h
 
 gnugo.h:
 
@@ -105,6 +106,12 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../utils/gg_utils.h:
 
 move_reasons.h:
diff -ur gnugo/engine/.deps/worm.Po gnugo-tt/engine/.deps/worm.Po
--- gnugo/engine/.deps/worm.Po  Fri Jul  4 00:04:48 2003
+++ gnugo-tt/engine/.deps/worm.Po       Sat Jul  5 13:59:52 2003
@@ -13,7 +13,8 @@
   /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
-  /usr/include/bits/string2.h liberty.h hash.h ../patterns/patterns.h
+  /usr/include/bits/string2.h liberty.h hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h cache.h ../patterns/patterns.h
 
 gnugo.h:
 
@@ -91,4 +92,10 @@
 
 hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+cache.h:
+
 ../patterns/patterns.h:
Binary files gnugo/engine/aftermath.o and gnugo-tt/engine/aftermath.o differ
diff -ur gnugo/engine/board.c gnugo-tt/engine/board.c
--- gnugo/engine/board.c        Sun Jun 29 00:41:18 2003
+++ gnugo-tt/engine/board.c     Sat Jul  5 13:57:04 2003
@@ -270,12 +270,14 @@
     PUSH_VERTEX(board[pos]);\
     board[pos] = color;\
     hashdata_invert_stone(&hashdata, pos, color);\
+    hashval_ng = hashvalue_ng_invert_stone(hashval_ng, pos, color);\
   } while (0)
 
 #define DO_REMOVE_STONE(pos)\
   do {\
     PUSH_VERTEX(board[pos]);\
     hashdata_invert_stone(&hashdata, pos, board[pos]);\
+    hashval_ng = hashvalue_ng_invert_stone(hashval_ng, pos, board[pos]);\
     board[pos] = EMPTY;\
   } while (0)
 
@@ -394,6 +396,7 @@
   movenum = state->move_number;
   
   hashdata_recalc(&hashdata, board, board_ko_pos);
+  hashval_ng = hashvalue_ng_recalc(board, board_ko_pos);
   new_position();
 }
 
@@ -430,6 +433,7 @@
   movenum = 0;
   
   hashdata_recalc(&hashdata, board, board_ko_pos);
+  hashval_ng = hashvalue_ng_recalc(board, board_ko_pos);
   new_position();
 }
 
@@ -463,6 +467,7 @@
 static int move_color[MAXSTACK];
 
 static Hash_data hashdata_stack[MAXSTACK];
+static Hashvalue_ng hashval_ng_stack[MAXSTACK];
 
 
 /* KOMASTER_SCHEME 4 handles empty case differently from other schemes */
@@ -528,25 +533,25 @@
     if (str == NO_MOVE) {
       if (!komaster_is_empty(komaster, kom_pos))
        gg_snprintf(buf, 100, "%s (variation %d, hash %lx, komaster %s:%s)", 
-                   message, count_variations, hashdata.hashval[0],
+                   message, count_variations, hashval_ng,
                    komaster_to_string(komaster, kom_pos),
                    location_to_string(kom_pos));
       else
        gg_snprintf(buf, 100, "%s (variation %d, hash %lx)", 
-                   message, count_variations, hashdata.hashval[0]);
+                   message, count_variations, hashval_ng);
     }
     else {
       if (!komaster_is_empty(komaster, kom_pos))
        gg_snprintf(buf, 100, 
                    "%s at %s (variation %d, hash %lx, komaster %s:%s)", 
                    message, location_to_string(str), count_variations,
-                   hashdata.hashval[0], 
+                   hashval_ng, 
                     komaster_to_string(komaster, kom_pos),
                    location_to_string(kom_pos));
       else
        gg_snprintf(buf, 100, "%s at %s (variation %d, hash %lx)", 
                    message, location_to_string(str), count_variations,
-                   hashdata.hashval[0]);
+                   hashval_ng);
     }
     sgftreeAddPlayLast(sgf_dumptree, color, I(pos), J(pos));
     sgftreeAddComment(sgf_dumptree, buf);
@@ -584,12 +589,12 @@
       message = "UNKNOWN";
     if (!komaster_is_empty(komaster, kom_pos))
       gg_snprintf(buf, 100, "tryko: %s (variation %d, %lx, komaster %s:%s)", 
-                 message, count_variations, hashdata.hashval[0],
+                 message, count_variations, hashval_ng,
                  komaster_to_string(komaster, kom_pos), 
                   location_to_string(kom_pos));
     else
       gg_snprintf(buf, 100, "tryko: %s (variation %d, %lx)", 
-                 message, count_variations, hashdata.hashval[0]);
+                 message, count_variations, hashval_ng);
 
     /* Add two pass moves to the SGF output to simulate the ko threat
      * and the answer.
@@ -704,9 +709,12 @@
   BEGIN_CHANGE_RECORD();
   PUSH_VALUE(board_ko_pos);
   memcpy(&hashdata_stack[stackp], &hashdata, sizeof(hashdata));
+  hashval_ng_stack[stackp] = hashval_ng;
 
-  if (board_ko_pos != NO_MOVE)
+  if (board_ko_pos != NO_MOVE) {
     hashdata_invert_ko(&hashdata, board_ko_pos);
+    hashval_ng = hashvalue_ng_invert_ko(hashval_ng, board_ko_pos);
+  }
   board_ko_pos = NO_MOVE;
   
   PUSH_VALUE(black_captured);
@@ -735,6 +743,8 @@
   undo_trymove();
   
   memcpy(&hashdata, &(hashdata_stack[stackp]), sizeof(hashdata));
+  hashval_ng = hashval_ng_stack[stackp];
+
   if (sgf_dumptree) {
     char buf[100];
     gg_snprintf(buf, 100, "(next variation: %d)", count_variations);
@@ -761,6 +771,7 @@
   stackp--;
   undo_trymove();
   memcpy(&hashdata, &(hashdata_stack[stackp]), sizeof(hashdata));
+  hashval_ng = hashval_ng_stack[stackp];
 }
 
 #endif
@@ -810,7 +821,7 @@
   if (count_variations)
     gprintf("%o (variation %d)", count_variations-1);
 #else
-  gprintf("%o (%d)", hashdata.hashval[0]);
+  gprintf("%o (%d)", hashval_ng);
 #endif
 
   gprintf("%o\n");
@@ -846,6 +857,7 @@
 
   board[pos] = color;
   hashdata_invert_stone(&hashdata, pos, color);
+  hashval_ng = hashvalue_ng_invert_stone(hashval_ng, pos, color);
   reset_move_history();
   new_position();
 }
@@ -863,6 +875,7 @@
   ASSERT1(IS_STONE(board[pos]), pos);
 
   hashdata_invert_stone(&hashdata, pos, board[pos]);
+  hashval_ng = hashvalue_ng_invert_stone(hashval_ng, pos, board[pos]);
   board[pos] = EMPTY;
   reset_move_history();
   new_position();
@@ -881,9 +894,11 @@
 {
 #if CHECK_HASHING
   Hash_data oldkey;
+  Hashvalue_ng  oldhashval_ng;
 
   /* Check the hash table to see if it corresponds to the cumulative one. */
   hashdata_recalc(&oldkey, board, board_ko_pos);
+  old_hashval_ng = hashvalue_ng_recalc(board, board_ko_pos);
 #if FULL_POSITION_IN_HASH
   gg_assert(hashdata_diff_dump(&oldkey, &hashdata) == 0);
 #else
@@ -891,8 +906,10 @@
 #endif
 #endif
 
-  if (board_ko_pos != NO_MOVE)
+  if (board_ko_pos != NO_MOVE) {
     hashdata_invert_ko(&hashdata, board_ko_pos);
+    hashval_ng = hashvalue_ng_invert_ko(hashval_ng, board_ko_pos);
+  }
   board_ko_pos = NO_MOVE;
 
   /* If the move is a pass, we can skip some steps. */
@@ -909,6 +926,7 @@
 #if CHECK_HASHING
     /* Check the hash table to see if it equals the previous one. */
     hashdata_recalc(&oldkey, board, board_ko_pos);
+    oldhashval_ng = hashvalue_ng_recalc(board, board_ko_pos);
 #if FULL_POSITION_IN_HASH
     gg_assert(hashdata_diff_dump(&oldkey, &hashdata) == 0);
 #else
@@ -2194,6 +2212,7 @@
   int threshold;
   int liberties;
   Hash_data position_hash;
+  Hashvalue_ng  position_hash_ng;
 };
 
 
@@ -2241,19 +2260,9 @@
 
   if (!libs) {
     /* First see if this result is cached. */
-    if (hashdata.hashval[0] == entry->position_hash.hashval[0]
+    if (hashval_ng == entry->position_hash_ng
        && maxlib <= entry->threshold) {
-      int k;
-      for (k = 1; k < NUM_HASHVALUES; k++) {
-       if (hashdata.hashval[k] != entry->position_hash.hashval[k])
-         break;
-      }
-
-      /* If position hash values match and `maxlib' is not greater than
-       * the threshold, we already know the result.
-       */
-      if (k == NUM_HASHVALUES)
-       return entry->liberties;
+      return entry->liberties;
     }
 
     liberties = fastlib(pos, color, 1);
@@ -2265,6 +2274,7 @@
       entry->threshold = MAXLIBS;
       entry->liberties = liberties;
       entry->position_hash = hashdata;
+      entry->position_hash_ng = hashval_ng;
 
       return liberties;
     }
@@ -2284,6 +2294,7 @@
 
   entry->liberties = liberties;
   entry->position_hash = hashdata;
+  entry->position_hash_ng = hashval_ng;
 
 #else /* not USE_BOARD_CACHES */
 
@@ -2549,19 +2560,9 @@
 
   if (!libs) {
     /* First see if this result is cached. */
-    if (hashdata.hashval[0] == entry->position_hash.hashval[0]
+    if (hashval_ng == entry->position_hash_ng
        && maxlib <= entry->threshold) {
-      int k;
-      for (k = 1; k < NUM_HASHVALUES; k++) {
-       if (hashdata.hashval[k] != entry->position_hash.hashval[k])
-         break;
-      }
-
-      /* If position hash values match and `maxlib' is not greater than
-       * the threshold, we already know the result.
-       */
-      if (k == NUM_HASHVALUES)
-       return entry->liberties;
+      return entry->liberties;
     }
 
     liberties = fastlib(pos, color, 0);
@@ -2573,6 +2574,7 @@
       entry->threshold = MAXLIBS;
       entry->liberties = liberties;
       entry->position_hash = hashdata;
+      entry->position_hash_ng = hashval_ng;
 
       return liberties;
     }
@@ -2587,6 +2589,7 @@
   entry->threshold = liberties < maxlib ? MAXLIBS : maxlib;
   entry->liberties = liberties;
   entry->position_hash = hashdata;
+  entry->position_hash_ng = hashval_ng;
 
 #else /* not USE_BOARD_CACHES */
 
@@ -4441,10 +4444,13 @@
       && string[s].size == 1
       && captured_stones == 1) {
     /* In case of a double ko: clear old ko position first. */
-    if (board_ko_pos != NO_MOVE)
+    if (board_ko_pos != NO_MOVE) {
       hashdata_invert_ko(&hashdata, board_ko_pos);
+      hashval_ng = hashvalue_ng_invert_ko(hashval_ng, board_ko_pos);
+    }
     board_ko_pos = string[s].libs[0];
     hashdata_invert_ko(&hashdata, board_ko_pos);
+    hashval_ng = hashvalue_ng_invert_ko(hashval_ng, board_ko_pos);
   }
 }
 
Binary files gnugo/engine/board.o and gnugo-tt/engine/board.o differ
Binary files gnugo/engine/breakin.o and gnugo-tt/engine/breakin.o differ
diff -ur gnugo/engine/cache.c gnugo-tt/engine/cache.c
--- gnugo/engine/cache.c        Wed Jun  4 14:48:49 2003
+++ gnugo-tt/engine/cache.c     Sat Jul  5 13:57:19 2003
@@ -21,6 +21,7 @@
 \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 
+#include "random.h"
 #include "gnugo.h"
 
 #include <stdio.h>
@@ -33,6 +34,186 @@
 #include "cache.h"
 #include "sgftree.h"
 
+
+/* ================================================================ */
+/*                    The new transposition table                   */
+
+
+
+/* ---------------------------------------------------------------- */
+
+
+/* Initialize the transposition table.
+ */
+ 
+void
+tt_init(Transposition_table *table, int memsize)
+{
+  int  num_entries;
+ 
+  /* Make sure the hash system is initialized. */
+  hash_ng_init();
+
+  num_entries = memsize / sizeof(Hashentry_ng);
+
+#if 0
+  printf("Creating hash table of size double entries (%d bytes)\n", 
+        bits, size);
+#endif
+ 
+  table->num_entries = num_entries;
+  table->entries     = (Hashentry_ng *) malloc(num_entries
+                                              * sizeof(Hashentry_ng));
+
+  if (table->entries == NULL) {
+    perror("Couldn't allocate memory for transposition table. \n");
+    exit(1);
+  }
+
+  table->is_clean = 0;
+  tt_clear(table);
+}
+
+
+/* Clear the transposition table.
+ */
+
+void
+tt_clear(Transposition_table *table)
+{
+  Hashentry_ng  hash_null = {{0LL, 0}, {0LL, 0}};
+  unsigned      i;
+ 
+  if (table->is_clean)
+    return;
+
+  for (i = 0; i < table->num_entries; i++)
+    table->entries[i] = hash_null;
+
+  table->is_clean = 1;
+}
+ 
+ 
+/* Free the transposition table.
+ */
+
+void
+tt_free(Transposition_table *table)
+{
+  free(table->entries);
+}
+
+
+/* Set result and move and return 1 if found, otherwise return 0.
+ */
+ 
+int
+tt_get(Transposition_table *table, 
+       int komaster, int kom_pos, int routine, int target, 
+       int remaining_depth,
+       int *result, int *move)
+{
+  Hashvalue_ng  hashval;
+  Hashentry_ng *entry;
+  Hashnode_ng  *node;
+ 
+  hashval = calculate_hashval_ng(komaster, kom_pos, routine, target);
+
+  /* Get the correct entry and node. */
+  entry = &table->entries[hashval % table->num_entries];
+  if (hashval == entry->deepest.key)
+    node = &entry->deepest;
+  else if (hashval == entry->newest.key)
+    node = &entry->newest;
+  else
+    return 0;
+
+  /* Return data.  Only set the result if remaining depth in the table
+   * is big enough to be trusted.  The move can always be used for move
+   * ordering if nothing else.
+   */
+  if ((unsigned) remaining_depth <= hn_get_remaining_depth(*node)) {
+    if (result)
+      *result = hn_get_result1(*node);
+  }
+  if (move)
+    *move = hn_get_move(*node);
+
+  return 1;
+}
+
+
+/* Update a transposition table entry.
+ */
+
+void
+tt_update(Transposition_table *table,
+         int komaster, int kom_pos, int routine, int target, 
+         int remaining_depth,
+         int result, int move)
+{
+  Hashvalue_ng  hashval;
+  Hashentry_ng *entry;
+  Hashnode_ng  *deepest;
+  Hashnode_ng  *newest;
+  uint32_t      data;
+
+  /* Calculate the hash value. */
+  hashval = calculate_hashval_ng(komaster, kom_pos, routine, target);
+  data = hn_create_data(remaining_depth, result, 0, move, 0);
+
+  /* Get the entry and nodes. */ 
+  entry = &table->entries[hashval % table->num_entries];
+  deepest = &entry->deepest;
+  newest  = &entry->newest;
+ 
+  /* See if we found an already existing node. */
+  if (hashval == deepest->key
+      && (unsigned) remaining_depth >= hn_get_remaining_depth(*deepest)) {
+ 
+    /* Found deepest */
+    deepest->data = data;
+ 
+  } 
+  else if (hashval == newest->data
+          && (unsigned) remaining_depth >= hn_get_remaining_depth(*newest)) {
+ 
+    /* Found newest */
+    newest->data = data;
+ 
+    /* If newest has become deeper than deepest, then switch them. */
+    if (hn_get_remaining_depth(*newest) > hn_get_remaining_depth(*deepest)) {
+      Hashnode_ng temp;
+ 
+      temp = *deepest;
+      *deepest = *newest;
+      *newest = temp;
+    }
+ 
+  } 
+  else if ((unsigned) remaining_depth > hn_get_remaining_depth(*deepest)) {
+ 
+    /* This can only happen if newest is empty. */
+    if (hn_get_remaining_depth(*newest) < hn_get_remaining_depth(*deepest))
+      *newest = *deepest;
+ 
+    deepest->key  = hashval;
+    deepest->data = data;
+  } 
+  else {
+    /* Replace newest. */
+    newest->key  = hashval;
+    newest->data = data;
+  }
+
+  table->is_clean = 0;
+}
+
+
+/* ================================================================ */
+/*                    The old transposition table                   */
+
+
 static Hashtable *movehash;
 
 static int hashtable_init(Hashtable *table, int tablesize, int num_nodes,
@@ -629,16 +810,34 @@
 void
 reading_cache_init(int bytes)
 {
+  float nodes;
+
+#ifdef USE_HASHTABLE_NG
+  /* Use 99% of the memory for the transposition table because that
+   * one is used for the tactical reading.  We use approximately 500 
+   * reading nodes for each owl node, so this is actually a bit low,
+   * but it is better to have a bit too many owl nodes in the cache
+   * than too few.
+   */
+  tt_init(&ttable, bytes * 99 / 100);
+
+  /* Use the rest of the available memory for the old cache where
+   * still owl, semeai and readconnect caching takes place.
+   */
+  bytes = bytes * 1 / 100;
+#endif
+  
+    
   /* Initialize hash table.
    *
    * The number 1.4 below is the quotient between the number of nodes
    * and the number of read results.  It was found in a test that this 
    * number varies between 1.15 and 1.4.  Thus we use 1.4.
    */
-  float nodes = ((float) bytes
-                / (1.5 * sizeof(Hashnode *)
-                   + sizeof(Hashnode)
-                   + 1.4 * sizeof(Read_result)));
+  nodes = ((float) bytes
+          / (1.5 * sizeof(Hashnode *)
+             + sizeof(Hashnode)
+             + 1.4 * sizeof(Read_result)));
   if (0)
     gprintf("Allocated memory for %d hash nodes. \n", (int) nodes);
   /* If we get a zero size hash table, disable hashing completely. */
@@ -661,6 +860,7 @@
 reading_cache_clear()
 {
   hashtable_clear(movehash);
+  tt_clear(&ttable);
 }
 
 int
diff -ur gnugo/engine/cache.h gnugo-tt/engine/cache.h
--- gnugo/engine/cache.h        Sat Jul  5 13:52:21 2003
+++ gnugo-tt/engine/cache.h     Sat Jul  5 13:57:24 2003
@@ -32,6 +32,80 @@
 #ifndef _CACHE_H_
 #define _CACHE_H_
 
+
+/* Hashnode: a node stored in the transposition table.
+ *
+ * In addition to the position, the hash lock encodes the following data,
+ * all hashed:
+ *   komaster
+ *   kom_pos
+ *   routine
+ *   str1
+ *   str2
+ *
+ * The data field packs into 32 bits the following
+ * fields:
+ *
+ *   RESERVED       :  5 bits
+ *   remaining_depth:  5 bits (depth - stackp)
+ *   result1        :  4 bits
+ *   result2        :  4 bits
+ *   move           : 10 bits
+ *   flags          :  4 bits
+ */
+typedef struct {
+  Hashvalue_ng  key;
+  uint32_t      data;
+} Hashnode_ng;
+
+
+/* Hashentry: an entry, with two nodes of the hash_table
+ */
+typedef struct {
+  Hashnode_ng  deepest;
+  Hashnode_ng  newest;
+} Hashentry_ng;
+
+/* Hn is for hash node. */
+#define hn_get_remaining_depth(hn)  (((hn).data >> 22) & 0x1f)
+#define hn_get_result1(hn)          (((hn).data >> 18) & 0x0f)
+#define hn_get_result2(hn)          (((hn).data >> 14) & 0x0f)
+#define hn_get_move(hn)             (((hn).data >>  4) & 0x3ff)
+#define hn_get_flags(hn)            (((hn).data >>  0) & 0x0f)
+
+#define hn_create_data(remaining_depth, result1, result2, move, flags) \
+  (((remaining_depth & 0x1f)  << 22) \
+   | (((result1)     & 0x0f)  << 18) \
+   | (((result2)     & 0x0f)  << 14) \
+   | (((move)        & 0x3ff) << 4) \
+   | (((flags)       & 0x0f)  << 0))
+
+
+/* Transposition_table: transposition table used for caching. */
+typedef struct {
+  unsigned int   num_entries;
+  Hashentry_ng  *entries;
+  int            is_clean;
+} Transposition_table;
+
+
+extern void  tt_init(Transposition_table *table, int memsize);
+extern void  tt_clear(Transposition_table *table);
+extern void  tt_free(Transposition_table *table);
+extern int   tt_get(Transposition_table *table, 
+                   int komaster, int kom_pos, int routine, int target,
+                   int remaining_depth,
+                   int *result, int *move);
+extern void  tt_update(Transposition_table *table,
+                      int komaster, int kom_pos, int routine, int target, 
+                      int remaining_depth,
+                      int result, int move);
+
+
+/* ================================================================ */
+/*                    The old transposition table                   */
+
+
 /* Dump (almost) all read results. */
 #define TRACE_READ_RESULTS 0
 
@@ -271,6 +345,19 @@
  */
 #if !TRACE_READ_RESULTS
 
+#define READ_RETURN0_NG(komaster, kom_pos, routine, str, remaining_depth) \
+  do { \
+    tt_update(&ttable, komaster, kom_pos, routine, str, remaining_depth, 0, 
0);\
+    return 0; \
+  } while (0)
+
+#define READ_RETURN_NG(komaster, kom_pos, routine, str, remaining_depth, 
point, move, value) \
+  do { \
+    tt_update(&ttable, komaster, kom_pos, routine, str, remaining_depth, 
value, move);\
+    if ((value) != 0 && (point) != 0) *(point) = (move); \
+    return (value); \
+  } while (0)
+
 #define READ_RETURN0(read_result) \
   do { \
     if (read_result) { \
@@ -288,6 +375,7 @@
     return (value); \
   } while (0)
 
+
 #define READ_RETURN_SEMEAI(read_result, point, move, value_a, value_b) \
   do { \
     if ((value_a) != 0 && (point) != 0) *(point) = (move); \
Binary files gnugo/engine/cache.o and gnugo-tt/engine/cache.o differ
Binary files gnugo/engine/clock.o and gnugo-tt/engine/clock.o differ
Binary files gnugo/engine/combination.o and gnugo-tt/engine/combination.o differ
Binary files gnugo/engine/dragon.o and gnugo-tt/engine/dragon.o differ
Binary files gnugo/engine/endgame.o and gnugo-tt/engine/endgame.o differ
Binary files gnugo/engine/filllib.o and gnugo-tt/engine/filllib.o differ
Binary files gnugo/engine/fuseki.o and gnugo-tt/engine/fuseki.o differ
diff -ur gnugo/engine/genmove.c gnugo-tt/engine/genmove.c
--- gnugo/engine/genmove.c      Wed Jun 18 16:26:58 2003
+++ gnugo-tt/engine/genmove.c   Sat Jul  5 13:57:27 2003
@@ -77,7 +77,9 @@
 
   /* Initialize things for hashing of positions. */
   reading_cache_clear();
+  
   hashdata_recalc(&hashdata, board, board_ko_pos);
+  hashval_ng = hashvalue_ng_recalc(board, board_ko_pos);
 
   worms_examined = -1;
   initial_influence_examined = -1;
Binary files gnugo/engine/genmove.o and gnugo-tt/engine/genmove.o differ
diff -ur gnugo/engine/globals.c gnugo-tt/engine/globals.c
--- gnugo/engine/globals.c      Thu Jun 19 20:57:45 2003
+++ gnugo-tt/engine/globals.c   Sat Jul  5 13:57:31 2003
@@ -57,7 +57,9 @@
 Intersection shadow[BOARDMAX];
 
 /* Hashing of positions. */
-Hash_data    hashdata;
+Hash_data     hashdata;
+Hashvalue_ng  hashval_ng;
+Transposition_table  ttable;
 
 int hashflags = HASH_DEFAULT;
 
Binary files gnugo/engine/globals.o and gnugo-tt/engine/globals.o differ
Binary files gnugo/engine/handicap.o and gnugo-tt/engine/handicap.o differ
diff -ur gnugo/engine/hash.c gnugo-tt/engine/hash.c
--- gnugo/engine/hash.c Mon Jun  9 18:05:32 2003
+++ gnugo-tt/engine/hash.c      Sat Jul  5 13:57:34 2003
@@ -38,6 +38,153 @@
  */
 
 
+/* Random values for the hash function. */
+static Hashvalue_ng  white_hash_ng[BOARDMAX];
+static Hashvalue_ng  black_hash_ng[BOARDMAX];
+static Hashvalue_ng  ko_hash_ng[BOARDMAX];
+
+static Hashvalue_ng  komaster_hash[4]; /* EMPTY, BLACK, WHITE, GRAY */
+static Hashvalue_ng  kom_pos_hash[BOARDMAX];
+static Hashvalue_ng  target1_hash[BOARDMAX];
+static Hashvalue_ng  target2_hash[BOARDMAX];
+static Hashvalue_ng  routine_hash[NUM_ROUTINES];
+
+static struct init_struct {
+  Hashvalue_ng  *array;
+  int            array_size;
+} hash_init_values[] = {
+  {white_hash_ng, BOARDMAX},
+  {black_hash_ng, BOARDMAX},
+  {ko_hash_ng,    BOARDMAX},
+  {komaster_hash, 4},
+  {kom_pos_hash,  BOARDMAX},
+  {target1_hash,  BOARDMAX},
+  {target2_hash,  BOARDMAX},
+  {routine_hash,  NUM_ROUTINES},
+};
+
+
+/*
+ * Initialize the entire hash and transposition table system.
+ *
+ * This should only be called once, and before calling any other 
+ * functions in this file.
+ */
+
+void
+hash_ng_init(void)
+{
+  static int  is_initialized = 0;
+  Hashvalue_ng  *array;
+  int         size;
+  unsigned    i;
+  int         j;
+  
+
+  if (is_initialized)
+    return;
+  
+#if TRACE_READ_RESULTS
+  /* We need consistent hash values when this option is enabled. */
+  gg_srand(1);
+#endif
+  
+  for (i = 0; 
+       i < sizeof(hash_init_values) / sizeof(struct init_struct);
+       i++) {
+    array = hash_init_values[i].array;
+    size  = hash_init_values[i].array_size;
+
+    for (j = 0; j < size; j++)
+      array[j] = ((uint64_t) gg_urand() << 32) | ((uint64_t) gg_urand());
+  }
+
+  is_initialized = 1;
+}
+
+
+/* Calculate the hashvalue for a position.
+ */
+
+Hashvalue_ng
+hashvalue_ng_recalc(Intersection *p, int ko_pos)
+{
+  Hashvalue_ng  hashval;
+  int           pos;
+
+  hashval = 0;
+  for (pos = BOARDMIN; pos < BOARDMAX; pos++) {
+    if (!ON_BOARD(pos))
+      continue;
+
+    switch (p[pos]) {
+      default:
+      case EMPTY: 
+       break;
+
+      case WHITE:
+       hashval ^= white_hash_ng[pos];
+       break;
+
+      case BLACK:
+       hashval ^= black_hash_ng[pos];
+       break;
+    }
+  }
+
+  if (ko_pos != NO_MOVE)
+    hashval ^= ko_hash_ng[ko_pos];
+
+  return hashval;
+}
+
+
+Hashvalue_ng
+calculate_hashval_ng(int komaster, int kom_pos, int routine, int target)
+{
+  Hashvalue_ng  hashval;
+
+  hashval = hashval_ng;                /* from globals.c */
+  hashval ^= komaster_hash[komaster];
+  hashval ^= kom_pos_hash[kom_pos];
+  hashval ^= routine_hash[routine];
+  hashval ^= target1_hash[target];
+
+  return hashval;
+}
+
+
+/*
+ * Set or remove ko in the hash value.
+ */
+
+Hashvalue_ng
+hashvalue_ng_invert_ko(Hashvalue_ng hashval, int ko_pos)
+{
+  return hashval ^ ko_hash_ng[ko_pos];
+}
+
+
+
+/*
+ * Set or remove a stone of COLOR at pos in a Hash_data.
+ */
+
+Hashvalue_ng
+hashvalue_ng_invert_stone(Hashvalue_ng hashval, int pos, int color)
+{
+  if (color == BLACK)
+    hashval ^= black_hash_ng[pos];
+  else if (color == WHITE)
+    hashval ^= white_hash_ng[pos];
+
+  return hashval;
+}
+
+
+/* ================================================================ */
+
+
 static int is_initialized = 0;
 
 
diff -ur gnugo/engine/hash.h gnugo-tt/engine/hash.h
--- gnugo/engine/hash.h Mon Jun  9 18:05:32 2003
+++ gnugo-tt/engine/hash.h      Sat Jul  5 13:57:37 2003
@@ -21,6 +21,7 @@
 \* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 
 #include <stdio.h>
+#include <stdint.h>
 #include "gnugo.h"
 
 /*
@@ -54,6 +55,25 @@
 typedef unsigned long Hashvalue;
 typedef unsigned long Compacttype;
 
+
+/* Next generation hash implementation.  
+ * 
+ * FIXME: Once this is the standard, remove all the _ng suffixes.
+ */
+typedef uint64_t      Hashvalue_ng;
+
+
+extern void          hash_ng_init(void);
+extern Hashvalue_ng  calculate_hashval_ng(int komaster, int kom_pos, 
+                                         int routine, int target);
+extern Hashvalue_ng  hashvalue_ng_recalc(Intersection *p, int ko_pos);
+extern Hashvalue_ng  hashvalue_ng_invert_ko(Hashvalue_ng hashval, int ko_pos);
+extern Hashvalue_ng  hashvalue_ng_invert_stone(Hashvalue_ng hashval, 
+                                              int pos, int color);
+
+
+
+
 /* for testing: Enables a lot of checks. */
 #define CHECK_HASHING 0
 
Binary files gnugo/engine/hash.o and gnugo-tt/engine/hash.o differ
Binary files gnugo/engine/influence.o and gnugo-tt/engine/influence.o differ
Binary files gnugo/engine/interface.o and gnugo-tt/engine/interface.o differ
Binary files gnugo/engine/libboard.a and gnugo-tt/engine/libboard.a differ
Binary files gnugo/engine/libengine.a and gnugo-tt/engine/libengine.a differ
diff -ur gnugo/engine/liberty.h gnugo-tt/engine/liberty.h
--- gnugo/engine/liberty.h      Sun Jun 29 00:41:18 2003
+++ gnugo-tt/engine/liberty.h   Sat Jul  5 13:57:42 2003
@@ -42,10 +42,15 @@
 
 /* We need the defintion of type Hash_data here. */
 #include "hash.h"
+#include "cache.h"
 
 /* Other modules get read-only access to this variable. */
-extern Hash_data    hashdata;
+extern Hash_data     hashdata;
+extern Hashvalue_ng  hashval_ng;
+extern Transposition_table  ttable;
 
+/* Define if you want the new transposition table. */
+#define USE_HASHTABLE_NG
 
 
 /* ================================================================ */
Binary files gnugo/engine/matchpat.o and gnugo-tt/engine/matchpat.o differ
Binary files gnugo/engine/move_reasons.o and gnugo-tt/engine/move_reasons.o 
differ
Binary files gnugo/engine/movelist.o and gnugo-tt/engine/movelist.o differ
Binary files gnugo/engine/optics.o and gnugo-tt/engine/optics.o differ
Binary files gnugo/engine/owl.o and gnugo-tt/engine/owl.o differ
Binary files gnugo/engine/persistent.o and gnugo-tt/engine/persistent.o differ
Binary files gnugo/engine/printutils.o and gnugo-tt/engine/printutils.o differ
Binary files gnugo/engine/readconnect.o and gnugo-tt/engine/readconnect.o differ
diff -ur gnugo/engine/reading.c gnugo-tt/engine/reading.c
--- gnugo/engine/reading.c      Sat Jun 21 08:02:14 2003
+++ gnugo-tt/engine/reading.c   Sat Jul  5 13:57:44 2003
@@ -1058,6 +1058,7 @@
   int liberties;
   int found_read_result;
   Read_result *read_result = NULL;
+  int retval;
   
   SETUP_TRACE_INFO("find_defense", str);
   
@@ -1069,6 +1070,7 @@
    * storing the position in the hash table, we must do this test
    * before we look for cached results.
    */
+  str = find_origin(str);
   liberties = countlib(str);
   
   if (liberties > 4
@@ -1081,6 +1083,16 @@
     return WIN;
   }
 
+#ifdef USE_HASHTABLE_NG
+
+  if ((stackp <= depth) && (hashflags & HASH_FIND_DEFENSE)
+      && tt_get(&ttable, komaster, kom_pos, FIND_DEFENSE, str, 
+               10 /* FIXME */,
+               &retval, move))
+    return retval;
+
+#else
+
   if ((stackp <= depth) && (hashflags & HASH_FIND_DEFENSE)) {
     found_read_result = get_read_result(FIND_DEFENSE, komaster, kom_pos, 
                                        &str, &read_result);
@@ -1096,6 +1108,8 @@
     }
   }
 
+#endif
+
 #if EXPERIMENTAL_READING
   if (defend_by_pattern) {
     dcode = do_defend_pat(str, &xpos, komaster, kom_pos);
@@ -1114,10 +1128,19 @@
     dcode = defend4(str, &xpos, komaster, kom_pos);
 
   if (dcode) {
+#ifdef USE_HASHTABLE_NG
+    READ_RETURN_NG(komaster, kom_pos, FIND_DEFENSE, str, 10, 
+                  move, xpos, dcode);
+#else
     READ_RETURN(read_result, move, xpos, dcode);
+#endif
   }
     
+#ifdef USE_HASHTABLE_NG
+  READ_RETURN0_NG(komaster, kom_pos, FIND_DEFENSE, str, 10);
+#else
   READ_RETURN0(read_result);
+#endif
 }
 
 
@@ -2945,6 +2968,7 @@
   int result = 0;
   int found_read_result;
   Read_result *read_result = NULL;
+  int  retval;
 
   SETUP_TRACE_INFO("attack", str);
 
@@ -2956,6 +2980,7 @@
   if (color == 0)      /* if assertions are turned off, silently fails */
     return 0;
 
+  str = find_origin(str);
   libs = countlib(str);
 
   if (libs > 4
@@ -2970,6 +2995,16 @@
     return 0;
   }
 
+#ifdef USE_HASHTABLE_NG
+
+  if ((stackp <= depth) && (hashflags & HASH_ATTACK)
+      && tt_get(&ttable, komaster, kom_pos, ATTACK, str, 
+               10 /* FIXME */,
+               &retval, move))
+    return retval;
+
+#else
+
   if ((stackp <= depth) && (hashflags & HASH_ATTACK)) {
     found_read_result = get_read_result(ATTACK, komaster, kom_pos, 
                                        &str, &read_result);
@@ -2985,6 +3020,8 @@
     }
   }
 
+#endif
+
 #if EXPERIMENTAL_READING
   if (attack_by_pattern) {
     result = do_attack_pat(str, &xpos, komaster, kom_pos);
@@ -3012,9 +3049,18 @@
   ASSERT1(result >= 0 && result <= WIN, str);
   
   if (result)
+#ifdef USE_HASHTABLE_NG
+    READ_RETURN_NG(komaster, kom_pos, ATTACK, str, 10, 
+                  move, xpos, result);
+#else
     READ_RETURN(read_result, move, xpos, result);
+#endif
 
+#ifdef USE_HASHTABLE_NG
+  READ_RETURN0_NG(komaster, kom_pos, ATTACK, str, 10);
+#else
   READ_RETURN0(read_result);
+#endif
 }
 
 
Binary files gnugo/engine/reading.o and gnugo-tt/engine/reading.o differ
Binary files gnugo/engine/score.o and gnugo-tt/engine/score.o differ
Binary files gnugo/engine/semeai.o and gnugo-tt/engine/semeai.o differ
Binary files gnugo/engine/sgfdecide.o and gnugo-tt/engine/sgfdecide.o differ
Binary files gnugo/engine/sgffile.o and gnugo-tt/engine/sgffile.o differ
Binary files gnugo/engine/shapes.o and gnugo-tt/engine/shapes.o differ
Binary files gnugo/engine/showbord.o and gnugo-tt/engine/showbord.o differ
Binary files gnugo/engine/surround.o and gnugo-tt/engine/surround.o differ
Binary files gnugo/engine/utils.o and gnugo-tt/engine/utils.o differ
Binary files gnugo/engine/value_moves.o and gnugo-tt/engine/value_moves.o differ
Binary files gnugo/engine/worm.o and gnugo-tt/engine/worm.o differ
diff -ur gnugo/interface/.deps/main.Po gnugo-tt/interface/.deps/main.Po
--- gnugo/interface/.deps/main.Po       Sun Jun 29 21:54:04 2003
+++ gnugo-tt/interface/.deps/main.Po    Sat Jul  5 14:01:25 2003
@@ -17,6 +17,7 @@
   /usr/include/bits/string2.h /usr/include/ctype.h /usr/include/unistd.h \
   /usr/include/bits/posix_opt.h /usr/include/bits/confname.h \
   /usr/include/getopt.h ../engine/liberty.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   ../utils/gg-getopt.h ../utils/gg_utils.h interface.h ../utils/random.h
 
 ../engine/gnugo.h:
@@ -105,6 +106,12 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 ../utils/gg-getopt.h:
 
 ../utils/gg_utils.h:
diff -ur gnugo/interface/.deps/play_ascii.Po 
gnugo-tt/interface/.deps/play_ascii.Po
--- gnugo/interface/.deps/play_ascii.Po Sun Jun 29 21:54:04 2003
+++ gnugo-tt/interface/.deps/play_ascii.Po      Sat Jul  5 14:01:28 2003
@@ -15,7 +15,8 @@
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
   /usr/include/bits/string2.h /usr/include/ctype.h ../engine/liberty.h \
-  ../engine/hash.h interface.h ../utils/gg_utils.h
+  ../engine/hash.h /usr/include/stdint.h /usr/include/bits/wordsize.h \
+  ../engine/cache.h interface.h ../utils/gg_utils.h
 
 ../engine/gnugo.h:
 
@@ -95,6 +96,12 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 interface.h:
 
 ../utils/gg_utils.h:
diff -ur gnugo/interface/.deps/play_gtp.Po gnugo-tt/interface/.deps/play_gtp.Po
--- gnugo/interface/.deps/play_gtp.Po   Sun Jun 29 21:54:07 2003
+++ gnugo-tt/interface/.deps/play_gtp.Po        Sat Jul  5 14:01:32 2003
@@ -14,6 +14,7 @@
   /usr/include/endian.h /usr/include/bits/endian.h /usr/include/string.h \
   /usr/include/bits/string.h /usr/include/bits/string2.h \
   /usr/include/stdlib.h interface.h ../engine/liberty.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   gtp.h ../utils/gg_utils.h
 
 ../engine/gnugo.h:
@@ -92,6 +93,12 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 gtp.h:
 
 ../utils/gg_utils.h:
diff -ur gnugo/interface/.deps/play_solo.Po 
gnugo-tt/interface/.deps/play_solo.Po
--- gnugo/interface/.deps/play_solo.Po  Sun Jun 29 21:54:08 2003
+++ gnugo-tt/interface/.deps/play_solo.Po       Sat Jul  5 14:01:38 2003
@@ -17,7 +17,8 @@
   /usr/include/bits/string2.h /usr/include/math.h \
   /usr/include/bits/huge_val.h /usr/include/bits/mathdef.h \
   /usr/include/bits/mathcalls.h /usr/include/bits/mathinline.h \
-  interface.h ../engine/liberty.h ../engine/hash.h ../utils/random.h \
+  interface.h ../engine/liberty.h ../engine/hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h ../engine/cache.h ../utils/random.h \
   ../utils/gg_utils.h
 
 ../engine/gnugo.h:
@@ -108,6 +109,12 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 ../utils/random.h:
 
 ../utils/gg_utils.h:
diff -ur gnugo/interface/.deps/play_test.Po 
gnugo-tt/interface/.deps/play_test.Po
--- gnugo/interface/.deps/play_test.Po  Sun Jun 29 21:54:09 2003
+++ gnugo-tt/interface/.deps/play_test.Po       Sat Jul  5 14:01:39 2003
@@ -15,7 +15,8 @@
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/string.h /usr/include/bits/string.h \
   /usr/include/bits/string2.h /usr/include/ctype.h interface.h \
-  ../utils/gg_utils.h ../engine/liberty.h ../engine/hash.h
+  ../utils/gg_utils.h ../engine/liberty.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h
 
 ../engine/gnugo.h:
 
@@ -98,3 +99,9 @@
 ../engine/liberty.h:
 
 ../engine/hash.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
Binary files gnugo/interface/gnugo and gnugo-tt/interface/gnugo differ
Binary files gnugo/interface/main.o and gnugo-tt/interface/main.o differ
Binary files gnugo/interface/play_ascii.o and gnugo-tt/interface/play_ascii.o 
differ
Binary files gnugo/interface/play_gtp.o and gnugo-tt/interface/play_gtp.o differ
Binary files gnugo/interface/play_solo.o and gnugo-tt/interface/play_solo.o 
differ
Binary files gnugo/interface/play_test.o and gnugo-tt/interface/play_test.o 
differ
diff -ur gnugo/patterns/.deps/aa_attackpat.Po 
gnugo-tt/patterns/.deps/aa_attackpat.Po
--- gnugo/patterns/.deps/aa_attackpat.Po        Sun Jun 29 21:53:39 2003
+++ gnugo-tt/patterns/.deps/aa_attackpat.Po     Sat Jul  5 14:00:37 2003
@@ -11,6 +11,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h dfa.h /usr/include/stdlib.h /usr/include/sys/types.h \
   /usr/include/endian.h /usr/include/bits/endian.h \
   /usr/include/sys/sysmacros.h /usr/include/alloca.h /usr/include/errno.h \
@@ -76,6 +77,12 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
 
 dfa.h:
diff -ur gnugo/patterns/.deps/apatterns.Po gnugo-tt/patterns/.deps/apatterns.Po
--- gnugo/patterns/.deps/apatterns.Po   Sun Jun 29 21:53:28 2003
+++ gnugo-tt/patterns/.deps/apatterns.Po        Sat Jul  5 14:00:24 2003
@@ -10,6 +10,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h
 
 /usr/include/stdio.h:
@@ -70,4 +71,10 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
diff -ur gnugo/patterns/.deps/barriers.Po gnugo-tt/patterns/.deps/barriers.Po
--- gnugo/patterns/.deps/barriers.Po    Sun Jun 29 21:53:30 2003
+++ gnugo-tt/patterns/.deps/barriers.Po Sat Jul  5 14:00:29 2003
@@ -10,6 +10,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h
 
 /usr/include/stdio.h:
@@ -70,4 +71,10 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
diff -ur gnugo/patterns/.deps/conn.Po gnugo-tt/patterns/.deps/conn.Po
--- gnugo/patterns/.deps/conn.Po        Sun Jun 29 21:53:12 2003
+++ gnugo-tt/patterns/.deps/conn.Po     Sat Jul  5 14:00:03 2003
@@ -10,6 +10,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h
 
 /usr/include/stdio.h:
@@ -70,4 +71,10 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
diff -ur gnugo/patterns/.deps/connections.Po 
gnugo-tt/patterns/.deps/connections.Po
--- gnugo/patterns/.deps/connections.Po Sun Jun 29 21:52:58 2003
+++ gnugo-tt/patterns/.deps/connections.Po      Sat Jul  5 13:59:56 2003
@@ -10,6 +10,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h
 
 /usr/include/stdio.h:
@@ -70,4 +71,10 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
diff -ur gnugo/patterns/.deps/dfa.Po gnugo-tt/patterns/.deps/dfa.Po
--- gnugo/patterns/.deps/dfa.Po Sun Jun 29 21:53:05 2003
+++ gnugo-tt/patterns/.deps/dfa.Po      Sat Jul  5 14:00:01 2003
@@ -10,7 +10,8 @@
   ../sgf/sgftree.h ../sgf/sgf_properties.h ../engine/clock.h \
   /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \
   /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h ../engine/hash.h patterns.h dfa.h \
+  /usr/include/bits/sigset.h ../engine/hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h ../engine/cache.h patterns.h dfa.h \
   /usr/include/stdlib.h /usr/include/sys/types.h /usr/include/endian.h \
   /usr/include/bits/endian.h /usr/include/sys/sysmacros.h \
   /usr/include/alloca.h /usr/include/errno.h /usr/include/bits/errno.h \
@@ -78,6 +79,12 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
 
 dfa.h:
diff -ur gnugo/patterns/.deps/dpatterns.Po gnugo-tt/patterns/.deps/dpatterns.Po
--- gnugo/patterns/.deps/dpatterns.Po   Sun Jun 29 21:53:29 2003
+++ gnugo-tt/patterns/.deps/dpatterns.Po        Sat Jul  5 14:00:24 2003
@@ -10,6 +10,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h
 
 /usr/include/stdio.h:
@@ -70,4 +71,10 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
diff -ur gnugo/patterns/.deps/endgame.Po gnugo-tt/patterns/.deps/endgame.Po
--- gnugo/patterns/.deps/endgame.Po     Sun Jun 29 21:53:36 2003
+++ gnugo-tt/patterns/.deps/endgame.Po  Sat Jul  5 14:00:35 2003
@@ -10,6 +10,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h
 
 /usr/include/stdio.h:
@@ -70,4 +71,10 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
diff -ur gnugo/patterns/.deps/eyes.Po gnugo-tt/patterns/.deps/eyes.Po
--- gnugo/patterns/.deps/eyes.Po        Sun Jun 29 21:54:00 2003
+++ gnugo-tt/patterns/.deps/eyes.Po     Sat Jul  5 14:00:27 2003
@@ -9,7 +9,8 @@
   ../engine/liberty.h ../engine/gnugo.h ../config.h ../sgf/sgftree.h \
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
-  /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h
+  /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h
 
 /usr/include/stdio.h:
 
@@ -70,3 +71,9 @@
 /usr/include/bits/sigset.h:
 
 ../engine/hash.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
diff -ur gnugo/patterns/.deps/fuseki13.Po gnugo-tt/patterns/.deps/fuseki13.Po
--- gnugo/patterns/.deps/fuseki13.Po    Sun Jun 29 21:53:52 2003
+++ gnugo-tt/patterns/.deps/fuseki13.Po Sat Jul  5 14:01:12 2003
@@ -10,6 +10,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h
 
 /usr/include/stdio.h:
@@ -70,4 +71,10 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
diff -ur gnugo/patterns/.deps/fuseki19.Po gnugo-tt/patterns/.deps/fuseki19.Po
--- gnugo/patterns/.deps/fuseki19.Po    Sun Jun 29 21:53:55 2003
+++ gnugo-tt/patterns/.deps/fuseki19.Po Sat Jul  5 14:01:15 2003
@@ -10,6 +10,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h
 
 /usr/include/stdio.h:
@@ -70,4 +71,10 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
diff -ur gnugo/patterns/.deps/fuseki9.Po gnugo-tt/patterns/.deps/fuseki9.Po
--- gnugo/patterns/.deps/fuseki9.Po     Sun Jun 29 21:53:50 2003
+++ gnugo-tt/patterns/.deps/fuseki9.Po  Sat Jul  5 14:01:10 2003
@@ -10,6 +10,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h
 
 /usr/include/stdio.h:
@@ -70,4 +71,10 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
diff -ur gnugo/patterns/.deps/fusekipat.Po gnugo-tt/patterns/.deps/fusekipat.Po
--- gnugo/patterns/.deps/fusekipat.Po   Sun Jun 29 21:53:48 2003
+++ gnugo-tt/patterns/.deps/fusekipat.Po        Sat Jul  5 14:01:08 2003
@@ -10,6 +10,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h
 
 /usr/include/stdio.h:
@@ -70,4 +71,10 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
diff -ur gnugo/patterns/.deps/handipat.Po gnugo-tt/patterns/.deps/handipat.Po
--- gnugo/patterns/.deps/handipat.Po    Sun Jun 29 21:53:59 2003
+++ gnugo-tt/patterns/.deps/handipat.Po Sat Jul  5 14:01:24 2003
@@ -10,6 +10,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h
 
 /usr/include/stdio.h:
@@ -70,4 +71,10 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
diff -ur gnugo/patterns/.deps/helpers.Po gnugo-tt/patterns/.deps/helpers.Po
--- gnugo/patterns/.deps/helpers.Po     Sun Jun 29 21:52:58 2003
+++ gnugo-tt/patterns/.deps/helpers.Po  Sat Jul  5 13:59:56 2003
@@ -10,6 +10,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h
 
 /usr/include/stdio.h:
@@ -70,4 +71,10 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
diff -ur gnugo/patterns/.deps/influence.Po gnugo-tt/patterns/.deps/influence.Po
--- gnugo/patterns/.deps/influence.Po   Sun Jun 29 21:53:29 2003
+++ gnugo-tt/patterns/.deps/influence.Po        Sat Jul  5 14:00:28 2003
@@ -10,6 +10,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h
 
 /usr/include/stdio.h:
@@ -70,4 +71,10 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
diff -ur gnugo/patterns/.deps/joseki.Po gnugo-tt/patterns/.deps/joseki.Po
--- gnugo/patterns/.deps/joseki.Po      Sun Jun 29 21:53:27 2003
+++ gnugo-tt/patterns/.deps/joseki.Po   Sat Jul  5 14:01:16 2003
@@ -14,7 +14,8 @@
   /usr/include/string.h /usr/include/bits/string.h \
   /usr/include/bits/string2.h /usr/include/ctype.h ../sgf/sgftree.h \
   ../sgf/sgf_properties.h ../engine/liberty.h ../engine/gnugo.h \
-  ../config.h ../engine/clock.h /usr/include/sys/time.h ../engine/hash.h
+  ../config.h ../engine/clock.h /usr/include/sys/time.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h
 
 /usr/include/stdio.h:
 
@@ -93,3 +94,9 @@
 /usr/include/sys/time.h:
 
 ../engine/hash.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
diff -ur gnugo/patterns/.deps/josekidb.Po gnugo-tt/patterns/.deps/josekidb.Po
--- gnugo/patterns/.deps/josekidb.Po    Sat Jul  5 13:54:43 2003
+++ gnugo-tt/patterns/.deps/josekidb.Po Sat Jul  5 14:01:18 2003
@@ -10,6 +10,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h
 
 /usr/include/stdio.h:
@@ -70,4 +71,10 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
diff -ur gnugo/patterns/.deps/mkeyes.Po gnugo-tt/patterns/.deps/mkeyes.Po
--- gnugo/patterns/.deps/mkeyes.Po      Sun Jun 29 21:53:21 2003
+++ gnugo-tt/patterns/.deps/mkeyes.Po   Sat Jul  5 14:00:25 2003
@@ -15,7 +15,8 @@
   /usr/include/bits/string2.h /usr/include/ctype.h /usr/include/assert.h \
   eyes.h ../engine/liberty.h ../engine/gnugo.h ../config.h \
   ../sgf/sgftree.h ../sgf/sgf_properties.h ../engine/clock.h \
-  /usr/include/sys/time.h ../engine/hash.h
+  /usr/include/sys/time.h ../engine/hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h ../engine/cache.h
 
 /usr/include/stdio.h:
 
@@ -98,3 +99,9 @@
 /usr/include/sys/time.h:
 
 ../engine/hash.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
diff -ur gnugo/patterns/.deps/mkpat.Po gnugo-tt/patterns/.deps/mkpat.Po
--- gnugo/patterns/.deps/mkpat.Po       Sun Jun 29 21:53:00 2003
+++ gnugo-tt/patterns/.deps/mkpat.Po    Sat Jul  5 13:59:57 2003
@@ -15,7 +15,8 @@
   /usr/include/bits/string2.h /usr/include/ctype.h /usr/include/assert.h \
   ../engine/liberty.h ../engine/gnugo.h ../sgf/sgftree.h \
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
-  ../engine/hash.h patterns.h ../utils/gg-getopt.h ../utils/gg_utils.h \
+  ../engine/hash.h /usr/include/stdint.h /usr/include/bits/wordsize.h \
+  ../engine/cache.h patterns.h ../utils/gg-getopt.h ../utils/gg_utils.h \
   dfa.h /usr/include/errno.h /usr/include/bits/errno.h \
   /usr/include/linux/errno.h /usr/include/asm/errno.h
 
@@ -99,6 +100,12 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
 
 ../utils/gg-getopt.h:
diff -ur gnugo/patterns/.deps/oraclepat.Po gnugo-tt/patterns/.deps/oraclepat.Po
--- gnugo/patterns/.deps/oraclepat.Po   Sun Jun 29 21:54:00 2003
+++ gnugo-tt/patterns/.deps/oraclepat.Po        Sat Jul  5 14:01:24 2003
@@ -10,6 +10,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h
 
 /usr/include/stdio.h:
@@ -70,4 +71,10 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
diff -ur gnugo/patterns/.deps/owl_attackpat.Po 
gnugo-tt/patterns/.deps/owl_attackpat.Po
--- gnugo/patterns/.deps/owl_attackpat.Po       Sat Jul  5 13:54:24 2003
+++ gnugo-tt/patterns/.deps/owl_attackpat.Po    Sat Jul  5 14:00:40 2003
@@ -11,6 +11,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h dfa.h /usr/include/stdlib.h /usr/include/sys/types.h \
   /usr/include/endian.h /usr/include/bits/endian.h \
   /usr/include/sys/sysmacros.h /usr/include/alloca.h /usr/include/errno.h \
@@ -76,6 +77,12 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
 
 dfa.h:
diff -ur gnugo/patterns/.deps/owl_defendpat.Po 
gnugo-tt/patterns/.deps/owl_defendpat.Po
--- gnugo/patterns/.deps/owl_defendpat.Po       Sat Jul  5 13:54:32 2003
+++ gnugo-tt/patterns/.deps/owl_defendpat.Po    Sat Jul  5 14:00:52 2003
@@ -11,6 +11,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h dfa.h /usr/include/stdlib.h /usr/include/sys/types.h \
   /usr/include/endian.h /usr/include/bits/endian.h \
   /usr/include/sys/sysmacros.h /usr/include/alloca.h /usr/include/errno.h \
@@ -76,6 +77,12 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
 
 dfa.h:
diff -ur gnugo/patterns/.deps/owl_vital_apat.Po 
gnugo-tt/patterns/.deps/owl_vital_apat.Po
--- gnugo/patterns/.deps/owl_vital_apat.Po      Sun Jun 29 21:53:43 2003
+++ gnugo-tt/patterns/.deps/owl_vital_apat.Po   Sat Jul  5 14:00:49 2003
@@ -11,6 +11,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h dfa.h /usr/include/stdlib.h /usr/include/sys/types.h \
   /usr/include/endian.h /usr/include/bits/endian.h \
   /usr/include/sys/sysmacros.h /usr/include/alloca.h /usr/include/errno.h \
@@ -76,6 +77,12 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
 
 dfa.h:
diff -ur gnugo/patterns/.deps/patterns.Po gnugo-tt/patterns/.deps/patterns.Po
--- gnugo/patterns/.deps/patterns.Po    Sat Jul  5 13:54:06 2003
+++ gnugo-tt/patterns/.deps/patterns.Po Sat Jul  5 14:00:06 2003
@@ -10,6 +10,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h
 
 /usr/include/stdio.h:
@@ -70,4 +71,10 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
diff -ur gnugo/patterns/.deps/read_attack.Po 
gnugo-tt/patterns/.deps/read_attack.Po
--- gnugo/patterns/.deps/read_attack.Po Sun Jun 29 21:53:57 2003
+++ gnugo-tt/patterns/.deps/read_attack.Po      Sat Jul  5 14:01:22 2003
@@ -10,6 +10,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h
 
 /usr/include/stdio.h:
@@ -70,4 +71,10 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
diff -ur gnugo/patterns/.deps/read_defend.Po 
gnugo-tt/patterns/.deps/read_defend.Po
--- gnugo/patterns/.deps/read_defend.Po Sun Jun 29 21:53:58 2003
+++ gnugo-tt/patterns/.deps/read_defend.Po      Sat Jul  5 14:01:23 2003
@@ -10,6 +10,7 @@
   ../sgf/sgf_properties.h ../engine/clock.h /usr/include/sys/time.h \
   /usr/include/time.h /usr/include/bits/time.h /usr/include/sys/select.h \
   /usr/include/bits/select.h /usr/include/bits/sigset.h ../engine/hash.h \
+  /usr/include/stdint.h /usr/include/bits/wordsize.h ../engine/cache.h \
   patterns.h
 
 /usr/include/stdio.h:
@@ -70,4 +71,10 @@
 
 ../engine/hash.h:
 
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
+
 patterns.h:
diff -ur gnugo/patterns/.deps/transform.Po gnugo-tt/patterns/.deps/transform.Po
--- gnugo/patterns/.deps/transform.Po   Sun Jun 29 21:53:04 2003
+++ gnugo-tt/patterns/.deps/transform.Po        Sat Jul  5 14:00:00 2003
@@ -10,7 +10,8 @@
   ../sgf/sgftree.h ../sgf/sgf_properties.h ../engine/clock.h \
   /usr/include/sys/time.h /usr/include/time.h /usr/include/bits/time.h \
   /usr/include/sys/select.h /usr/include/bits/select.h \
-  /usr/include/bits/sigset.h ../engine/hash.h
+  /usr/include/bits/sigset.h ../engine/hash.h /usr/include/stdint.h \
+  /usr/include/bits/wordsize.h ../engine/cache.h
 
 ../engine/liberty.h:
 
@@ -69,3 +70,9 @@
 /usr/include/bits/sigset.h:
 
 ../engine/hash.h:
+
+/usr/include/stdint.h:
+
+/usr/include/bits/wordsize.h:
+
+../engine/cache.h:
Binary files gnugo/patterns/aa_attackpat.o and gnugo-tt/patterns/aa_attackpat.o 
differ
Binary files gnugo/patterns/apatterns.o and gnugo-tt/patterns/apatterns.o differ
Binary files gnugo/patterns/barriers.o and gnugo-tt/patterns/barriers.o differ
Binary files gnugo/patterns/conn.o and gnugo-tt/patterns/conn.o differ
Binary files gnugo/patterns/connections.o and gnugo-tt/patterns/connections.o 
differ
Binary files gnugo/patterns/dfa.o and gnugo-tt/patterns/dfa.o differ
Binary files gnugo/patterns/dpatterns.o and gnugo-tt/patterns/dpatterns.o differ
Binary files gnugo/patterns/endgame.o and gnugo-tt/patterns/endgame.o differ
Binary files gnugo/patterns/eyes.o and gnugo-tt/patterns/eyes.o differ
Binary files gnugo/patterns/fuseki13.o and gnugo-tt/patterns/fuseki13.o differ
Binary files gnugo/patterns/fuseki19.o and gnugo-tt/patterns/fuseki19.o differ
Binary files gnugo/patterns/fuseki9.o and gnugo-tt/patterns/fuseki9.o differ
Binary files gnugo/patterns/fusekipat.o and gnugo-tt/patterns/fusekipat.o differ
Binary files gnugo/patterns/handipat.o and gnugo-tt/patterns/handipat.o differ
Binary files gnugo/patterns/helpers.o and gnugo-tt/patterns/helpers.o differ
Binary files gnugo/patterns/influence.o and gnugo-tt/patterns/influence.o differ
Binary files gnugo/patterns/joseki and gnugo-tt/patterns/joseki differ
Binary files gnugo/patterns/joseki.o and gnugo-tt/patterns/joseki.o differ
Binary files gnugo/patterns/josekidb.o and gnugo-tt/patterns/josekidb.o differ
Binary files gnugo/patterns/libdfa.a and gnugo-tt/patterns/libdfa.a differ
Binary files gnugo/patterns/libpatterns.a and gnugo-tt/patterns/libpatterns.a 
differ
Binary files gnugo/patterns/mkeyes and gnugo-tt/patterns/mkeyes differ
Binary files gnugo/patterns/mkeyes.o and gnugo-tt/patterns/mkeyes.o differ
Binary files gnugo/patterns/mkpat and gnugo-tt/patterns/mkpat differ
Binary files gnugo/patterns/mkpat.o and gnugo-tt/patterns/mkpat.o differ
Binary files gnugo/patterns/oraclepat.o and gnugo-tt/patterns/oraclepat.o differ
Binary files gnugo/patterns/owl_attackpat.o and 
gnugo-tt/patterns/owl_attackpat.o differ
Binary files gnugo/patterns/owl_defendpat.o and 
gnugo-tt/patterns/owl_defendpat.o differ
Binary files gnugo/patterns/owl_vital_apat.o and 
gnugo-tt/patterns/owl_vital_apat.o differ
Binary files gnugo/patterns/patterns.o and gnugo-tt/patterns/patterns.o differ
Binary files gnugo/patterns/read_attack.o and gnugo-tt/patterns/read_attack.o 
differ
Binary files gnugo/patterns/read_defend.o and gnugo-tt/patterns/read_defend.o 
differ
Binary files gnugo/patterns/transform.o and gnugo-tt/patterns/transform.o differ
diff -ur gnugo/regression/ALL.out gnugo-tt/regression/ALL.out
--- gnugo/regression/ALL.out    Sat Jul  5 18:51:09 2003
+++ gnugo-tt/regression/ALL.out Sat Jul  5 18:48:59 2003
@@ -2,7 +2,9 @@
 ./regress.sh . owl.tst 
 ./regress.sh . owl_rot.tst 
 ./regress.sh . ld_owl.tst 
+194 unexpected FAIL: Correct '3 B1', got '1 A5'
 ./regress.sh . optics.tst 
+1201 unexpected FAIL: Correct '1 2 T8 T8', got '0 0'
 ./regress.sh . filllib.tst 
 ./regress.sh . atari_atari.tst 
 ./regress.sh . connection.tst 
@@ -15,6 +17,7 @@
 ./regress.sh . heikki.tst 
 ./regress.sh . neurogo.tst 
 ./regress.sh . arb.tst 
+203 unexpected FAIL: Correct 'T7', got 'N3'
 ./regress.sh . rosebud.tst 
 ./regress.sh . golife.tst 
 ./regress.sh . arion.tst 
@@ -23,8 +26,10 @@
 ./regress.sh . dniwog.tst 
 ./regress.sh . lazarus.tst 
 ./regress.sh . trevorb.tst 
+120 unexpected PASS!
 ./regress.sh . strategy2.tst 
 ./regress.sh . nicklas1.tst 
+1406 unexpected PASS!
 ./regress.sh . nicklas2.tst 
 ./regress.sh . nicklas3.tst 
 ./regress.sh . nicklas4.tst 
@@ -35,6 +40,7 @@
 ./regress.sh . tactics.tst 
 ./regress.sh . buzco.tst 
 ./regress.sh . nngs.tst 
+1060 unexpected PASS!
 ./regress.sh . trevorc.tst 
 ./regress.sh . strategy3.tst 
 ./regress.sh . capture.tst 
@@ -43,5 +49,8 @@
 ./regress.sh . vie.tst 
 ./regress.sh . arend.tst 
 ./regress.sh . 13x13.tst 
+31 unexpected PASS!
+53 unexpected PASS!
+65 unexpected PASS!
 ./regress.sh . semeai.tst 
 ./regress.sh . trevord.tst 




reply via email to

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