From 89147e5cf13fb813d1f60d43251ad8247311dbf1 Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Sat, 14 Mar 2020 20:45:13 +0100 Subject: [PATCH] Evaluate virtual mate threats in bughouse bughouse Total: 500 W: 276 L: 219 D: 5 --- src/evaluate.cpp | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) 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()) -- 1.7.0.4