projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
d250938
)
Evaluate virtual mate threats in bughouse
author
Fabian Fichter
<ianfab@users.noreply.github.com>
Sat, 14 Mar 2020 19:45:13 +0000 (20:45 +0100)
committer
Fabian Fichter
<ianfab@users.noreply.github.com>
Sat, 14 Mar 2020 19:45:13 +0000 (20:45 +0100)
bughouse
Total: 500 W: 276 L: 219 D: 5
src/evaluate.cpp
patch
|
blob
|
history
diff --git
a/src/evaluate.cpp
b/src/evaluate.cpp
index
8982ec1
..
1b3f1df
100644
(file)
--- a/
src/evaluate.cpp
+++ b/
src/evaluate.cpp
@@
-540,7
+540,12
@@
namespace {
{
for (PieceType pt : pos.piece_types())
if (!pos.count_in_hand(Them, pt) && (attacks_bb(Us, pt, ksq, pos.pieces()) & safe & pos.drop_region(Them, pt) & ~pos.pieces()))
+ {
kingDanger += OtherSafeCheck * 500 / (500 + PieceValue[MG][pt]);
+ // Presumably a mate threat
+ if (!(attackedBy[Us][KING] & ~(attackedBy[Them][ALL_PIECES] | pos.pieces(Us))))
+ kingDanger += 2000;
+ }
}
if (pos.check_counting())