Tweak shelter bonus for nCheck
authorFabian Fichter <ianfab@users.noreply.github.com>
Sat, 7 Mar 2020 10:35:54 +0000 (11:35 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sat, 7 Mar 2020 10:35:54 +0000 (11:35 +0100)
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

index a0d1ad9..b28d8ad 100644 (file)
@@ -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);