mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08: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:
@@ -110,13 +110,7 @@ void TranspositionTable::store(const Position &pos, Value v, Depth d,
|
|||||||
tte = replace = first_entry(pos);
|
tte = replace = first_entry(pos);
|
||||||
for (int i = 0; i < 4; i++, tte++)
|
for (int i = 0; i < 4; i++, tte++)
|
||||||
{
|
{
|
||||||
if (!tte->key()) // still empty
|
if (!tte->key() || tte->key() == pos.get_key()) // empty or overwrite old
|
||||||
{
|
|
||||||
*tte = TTEntry(pos.get_key(), v, type, d, m, generation);
|
|
||||||
writes++;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else if (tte->key() == pos.get_key()) // overwrite old
|
|
||||||
{
|
{
|
||||||
if (m == MOVE_NONE)
|
if (m == MOVE_NONE)
|
||||||
m = tte->move();
|
m = tte->move();
|
||||||
|
|||||||
Reference in New Issue
Block a user