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

Make probe_dtz_table() return correct dtz

This commit is contained in:
Marco Costalba 2016-05-21 19:55:32 +02:00
parent 96314cc971
commit 6a6a7d2b22

View file

@ -656,7 +656,7 @@ int map_score(DTZEntry* entry, File f, int value, WDLScore wdl)
|| wdl == WDLCursedLoss)
value *= 2;
return value;
return value + 1;
}
// Compute a unique index out of a position and use it to probe the TB file. To
@ -1465,7 +1465,7 @@ int Tablebases::probe_dtz(Position& pos, ProbeState* result)
|| *result == WIN_PAWN_MOVE)
return wdl == WDLWin ? 1 : 101; // DTZ scores for immediate win or cursed win
int dtz = 1 + probe_dtz_table(pos, wdl, result); // Probe the table!
int dtz = probe_dtz_table(pos, wdl, result); // Probe the table!
if (*result != CHANGE_STM)
{