Computer Chess Club Archives


Search

Terms

Messages

Subject: I need your opinion about this hash entry structure

Author: Federico Corigliano

Date: 18:52:56 01/02/04


My current hash entry uses a struct and needs 40 bits. I calculated that I can
optimize the size using two unsigned 64 bits integers with the following
distribution:

struct hashEntry {
    uint64  a;
    uint64  b;
};

Name       Bits    Description                       Access
--------------------------------------------------------------------------------
Hash key   64      Hash key signature                (entry.a)
Depth      10      Position's search depth*          (entry.b >> 54)
Score      16      Position's score (-32767...32767) (entry.b >> 38) & 0xffff
Move       32      Position's best move              (entry.b >> 6) & 0xffffffff
Age        3       Position's age                    (entry.b >> 3) & 0x7
Threat     1       Threat's extension flag           (entry.b >> 2) & 0x1
Type       2       Upper, lower, exact or none       (entry.b & 0x3)
---------------
Total:     128 (16 bytes)

* I use a value of 16 for a full ply, so the max search depth is 63, pretty
sufficient.

There is a high possibility of errors, because I don't implemented yet.
I need your opinion about it, and if is needed to optimize it, how to do it.

Thanks in advance
Federico



This page took 0.06 seconds to execute

Last modified: Thu, 07 Jul 11 08:48:38 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.