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:
parent
96314cc971
commit
6a6a7d2b22
1 changed files with 2 additions and 2 deletions
|
@ -656,7 +656,7 @@ int map_score(DTZEntry* entry, File f, int value, WDLScore wdl)
|
||||||
|| wdl == WDLCursedLoss)
|
|| wdl == WDLCursedLoss)
|
||||||
value *= 2;
|
value *= 2;
|
||||||
|
|
||||||
return value;
|
return value + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compute a unique index out of a position and use it to probe the TB file. To
|
// 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)
|
|| *result == WIN_PAWN_MOVE)
|
||||||
return wdl == WDLWin ? 1 : 101; // DTZ scores for immediate win or cursed win
|
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)
|
if (*result != CHANGE_STM)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue