From 9d9a65f6949c3579dc928e2ad6a28672b18d8665 Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Sat, 7 Mar 2020 11:35:54 +0100 Subject: [PATCH] Tweak shelter bonus for nCheck 3check STC LLR: 2.96 (-2.94,2.94) [0.00,10.00] Total: 1845 W: 924 L: 801 D: 120 http://www.variantfishtest.org:6543/tests/view/5e6258ac6e23db46beba4f4c 3check LTC LLR: 2.96 (-2.94,2.94) [0.00,10.00] Total: 2573 W: 1251 L: 1119 D: 203 http://www.variantfishtest.org:6543/tests/view/5e6281ff6e23db46beba4f55 --- src/pawns.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/pawns.cpp b/src/pawns.cpp index a0d1ad9..b28d8ad 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -226,7 +226,8 @@ Score Entry::evaluate_shelter(const Position& pos, Square ksq) { int theirRank = b ? relative_rank(Us, frontmost_sq(Them, b), pos.max_rank()) : 0; int d = std::min(std::min(f, File(pos.max_file() - f)), FILE_D); - bonus += make_score(ShelterStrength[d][ourRank], 0) * (1 + (pos.captures_to_hand() && ourRank <= RANK_2)); + bonus += make_score(ShelterStrength[d][ourRank], 0) * (1 + (pos.captures_to_hand() && ourRank <= RANK_2) + + (pos.check_counting() && d == 0 && ourRank == RANK_2)); if (ourRank && (ourRank == theirRank - 1)) bonus -= BlockedStorm * int(theirRank == RANK_3); -- 1.7.0.4