gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] Improvement of the hash table in GNU go


From: Gunnar Farneback
Subject: Re: [gnugo-devel] Improvement of the hash table in GNU go
Date: Thu, 06 Feb 2003 21:43:08 +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)

Inge wrote:
> What I propose is a very simple but powerful change: We introduce a
> new table of random number for each reading function that we want to
> cache the result of.  Then we use these tables to create a unique hash
> value for a combination of position and read function on a certain
> target.  That way we get a single type of entries and can get rid of a
> lot of the current complications.
> 
> Take for example attack().  If we call attack(A1), and want to find
> out if the result of this reading is in the table we do the following:

A simpler alternative would be to have only one board-sized array with
random numbers for each vertex and one random number for each routine,
then xor the routine and the vertex numbers. This also has the
advantage of more easily scaling to two vertices, which both semeai
and connection reading need.

The same can of course be done with komaster, kom_pos, and remaining
depth, which would comprise all current input data.

/Gunnar




reply via email to

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