mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Fix syzygy en passant issue
v = value without ep capture being considered v1 = value of the ep capture The correct logic is: if without e.p. capture we are losing, and the value of e.p is either draw, or win or "loss, but 50 move rule saves us", then we should use the value of ep capture. Credit and thanks to syzygy1 and lantonov ! No functional change (except with syzygy bases) Resolves #415 Resolves #394
This commit is contained in:
parent
84a641b8bb
commit
46b5a5f0db
1 changed files with 1 additions and 1 deletions
|
@ -624,7 +624,7 @@ int Tablebases::probe_dtz(Position& pos, int *success)
|
|||
if (v1 >= 0)
|
||||
v = v1;
|
||||
} else if (v < 0) {
|
||||
if (v1 >= 0 || v1 < 100)
|
||||
if (v1 >= 0 || v1 < -100)
|
||||
v = v1;
|
||||
} else if (v > 100) {
|
||||
if (v1 > 0)
|
||||
|
|
Loading…
Add table
Reference in a new issue