From: Fabian Fichter Date: Sat, 14 Mar 2020 19:45:13 +0000 (+0100) Subject: Evaluate virtual mate threats in bughouse X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=89147e5cf13fb813d1f60d43251ad8247311dbf1;p=fairystockfish.git Evaluate virtual mate threats in bughouse bughouse Total: 500 W: 276 L: 219 D: 5 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 8982ec1..1b3f1df 100644 --- 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())