Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Hash table insert

Author: Jeff GAZET

Date: 03:48:16 05/09/04

Go up one level in this thread


>>Hi,
>>
>>in theory, when adding informations into the transposition table :
>>If the hash is found in the TT, we update informations if TTDepth<=depth.
>>If the hash is not found, we add the new entry.
>>
>>So this could be written like this :
>>
>>if(target->zkey==g_hash && target->depth<=depth)
>>	{
>>	//target->zkey = g_hash;
>>	target->eval = eval;
>>	target->flags = hashflag;
>>	target->depth = depth;
>>	target->m = m;
>>	}
>>
>>// New entry
>>else
>>	{
>>	target->zkey = g_hash;
>>	target->eval = eval;
>>	target->flags = hashflag;
>>	target->depth = depth;
>>	target->m = m;
>>	}
>>
>>My question is that in both cases, the same thing is done ! :-)
>>And this must be wrong.

>You should add the new entry only if its depth is >= the depth of the previous
>entry that you are about to overwrite.
>Rémi

But if this is a new entry, there isn't any previous one ?



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.