Computer Chess Club Archives


Search

Terms

Messages

Subject: Ttoo dull to hash correctly

Author: Matthias Gemuh

Date: 16:34:40 09/01/01



 I am too dull to hash correctly. I have 2 depth variables in HyLogicChess:
"depth" tells me how far I still have to go till Quiescence and "nPly" tells how
far from Root in AlphaBeta Search.
 Which of them do I store in Hash Table? Which comparisons do I make when
retrieving from table?
 Presently I store "depth" and retrieve as shown below, but retrieved values are
clearly wrong.

    // Retrieving data from Hash
    if ((HashTable->HashEntry[ChessPosition->HaskKey].nChecksum ==
ChessPosition->LockKey) && \
            (HashTable->HashEntry[ChessPosition->HaskKey].nDepth >= depth)) {
        switch (HashTable->HashEntry[ChessPosition->HaskKey].nScoreType) {

            case HashTable->HashEntry[ChessPosition->HaskKey].exact:
                    return(HashTable->HashEntry[ChessPosition->HaskKey].Score);

            case HashTable->HashEntry[ChessPosition->HaskKey].lower_bound:
                if (HashTable->HashEntry[ChessPosition->HaskKey].Score >= beta)
{
                    return(HashTable->HashEntry[ChessPosition->HaskKey].Score);
                } else break;

            case HashTable->HashEntry[ChessPosition->HaskKey].upper_bound:
                if (HashTable->HashEntry[ChessPosition->HaskKey].Score <= alpha)
{
                    return(HashTable->HashEntry[ChessPosition->HaskKey].Score);
                } else break;
        }
    }

 Regards,
 Matthias.




This page took 0.01 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.