projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
2790463
)
Skip king protector bonus when there is no king
author
Fabian Fichter
<ianfab@users.noreply.github.com>
Fri, 8 Feb 2019 18:07:49 +0000 (19:07 +0100)
committer
Fabian Fichter
<ianfab@users.noreply.github.com>
Fri, 8 Feb 2019 18:07:49 +0000 (19:07 +0100)
src/evaluate.cpp
patch
|
blob
|
history
diff --git
a/src/evaluate.cpp
b/src/evaluate.cpp
index
f61f9af
..
e5863ad
100644
(file)
--- a/
src/evaluate.cpp
+++ b/
src/evaluate.cpp
@@
-387,6
+387,7
@@
namespace {
score += MinorBehindPawn;
// Penalty if the piece is far from the king
+ if (pos.count<KING>(Us))
score -= KingProtector[Pt == BISHOP] * distance(s, pos.square<KING>(Us));
if (Pt == BISHOP)