projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
4a4c411
)
Fix endgame evaluation for KFsPs vs. K
author
Fabian Fichter
<ianfab@users.noreply.github.com>
Mon, 2 Dec 2019 20:48:39 +0000 (21:48 +0100)
committer
Fabian Fichter
<ianfab@users.noreply.github.com>
Mon, 2 Dec 2019 20:48:39 +0000 (21:48 +0100)
Example:
```
setoption name UCI_Variant value makruk
position fen 7k/8/5M2/5KMP/8/8/8/8 w - - 0 1
eval
```
src/endgame.cpp
patch
|
blob
|
history
diff --git
a/src/endgame.cpp
b/src/endgame.cpp
index
8af27b9
..
a62bfce
100644
(file)
--- a/
src/endgame.cpp
+++ b/
src/endgame.cpp
@@
-395,7
+395,7
@@
Value Endgame<KFsPsK>::operator()(const Position& pos) const {
Bitboard b = pos.pieces(strongSide, PAWN);
while (b && (!dark || !light))
{
- if (file_of(pop_lsb(&b)) % 2 == relative_rank(strongSide, pos.promotion_rank(), pos.max_rank()) % 2)
+ if (file_of(pop_lsb(&b)) % 2 != relative_rank(strongSide, pos.promotion_rank(), pos.max_rank()) % 2)
light = true;
else
dark = true;