1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00

Fix hashfull info

Do not count has a replacement when a TT entry is
written in an empty slot.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2008-11-11 18:26:15 +01:00
parent 2d4e2bc62a
commit 4df8651c82

View file

@ -110,13 +110,7 @@ void TranspositionTable::store(const Position &pos, Value v, Depth d,
tte = replace = first_entry(pos);
for (int i = 0; i < 4; i++, tte++)
{
if (!tte->key()) // still empty
{
*tte = TTEntry(pos.get_key(), v, type, d, m, generation);
writes++;
return;
}
else if (tte->key() == pos.get_key()) // overwrite old
if (!tte->key() || tte->key() == pos.get_key()) // empty or overwrite old
{
if (m == MOVE_NONE)
m = tte->move();