Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: TranspositionTables and NULL-move

Author: Michel Langeveld

Date: 03:21:35 03/10/04

Go up one level in this thread


On March 10, 2004 at 06:09:55, Renze Steenhuisen wrote:

>What is a normal TT-hit-ratio?
>
>For NULL-move saving I get about:     30%
>While without NULL-move saving about: 10%
>
>Hmmm.... a bit low maybe?

In this tread you can read the hashhit ration of Nullmover.
http://www.talkchess.com/forums/1/message.html?353673

But it depends also how you measure.

I count something as a hashhit if I can
A return an exact score
B return an beta bound
C return an alpha bound
D use a move from the hashtable

So I don't count something as a hashhit if
A if the position is in the hash but does not have enough depth and because of a
alpha bound I can't use a move
B a position is an alpha bound and has enough depth but the alpha is too low and
no move is present
C a position is an beta bound and has enough depth but beta is too low and no
move is present

I am not sure if this calculating stuff is like others do it.

In other words:


scoreType probeHash(int depth, scoreType alpha, scoreType beta)
{
   //reset the value of the bestmove to indicate that we did not found something
   hashProbesCounter++;

   hashTableType *pHashRecord = &hashTable[p.dynHash & hashMask];

   do_null = true;

   if (pHashRecord->key != p.dynHash)
   {
       hash_move[ply] = 0;
   }
   else
   {
      hash_move[ply] = pHashRecord->bestmove;

      if (pHashRecord->depth >= depth)
      {
         switch(pHashRecord->flags)
         {
            case HASH_FLAGS_EXACT:
            {
               scoreType score = (scoreType)pHashRecord->value;

               if (score >=  9800) score -= ply;
               if (score <= -9800) score += ply;
               hashHitCounter++;

               return score;
            }

            //More used term is UPPER_BOUND for this
            case HASH_FLAGS_ALPHA:
               do_null = false;
               if (pHashRecord->value <= alpha)
               {
                  hashHitCounter++;

                  return pHashRecord->value;
               }

               break;

            //More used term is LOWER_BOUND for this
            case HASH_FLAGS_BETA:
               if (pHashRecord->value >= beta)
               {
                  hashHitCounter++;

                  return pHashRecord->value;
               }

               break;
         }
      }
   }

   //if we found a move only we count this as a hit.
   if (hash_move[ply] != 0)
	hashHitCounter++;

   return HASH_UNKNOWN_VALUE;
}




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