Computer Chess Club Archives


Search

Terms

Messages

Subject: What is "CheckSum" in Hashing

Author: Cheok Yan Cheng

Date: 06:56:50 06/21/01


The below is a part of article picked from :
http://www.ics.uci.edu/~eppstein/180a/970424.html
------------------------------------------------------------
struct {
    long checksum;      // or long long might be even better
    int depth;
    enum { exact, lower_bound, upper_bound } entry_type;
    double eval;
} hashtable[HASH_TABLE_SIZE];

For each position you search, compute a "hash value" x indexing into the hash
table and another "hash value" y for checking whether you've found the right
position.

Before searching a position, lookup hashtable[x]. If
hashtable[x].checksum == y, hashtable[x].entry_type == exact, and
hashtable[x].depth is at least the depth you are currently searching,
return the eval stored there.
------------------------------------------------------------

For "hash value" x, I understand that it is generated using XOR from the table :
64_bit_random_number[PIECE_TYPE][PIECE_LOCATION].

1. For the "hash value" y that used for checksum, how should we generated it?
2. What is checksum for ?

thanks



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

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