From 77a2d322259b790d2dfba2d7aa97c625aa4b04d3 Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Sat, 1 Sep 2018 11:22:40 +0200 Subject: [PATCH] Tweak shelter strength for drop variants STC crazyhouse LLR: 2.95 (-2.94,2.94) [0.00,10.00] Total: 7305 W: 3696 L: 3490 D: 119 http://35.161.250.236:6543/tests/view/5b8a5c546e23db0fbab0dd0f --- src/pawns.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/pawns.cpp b/src/pawns.cpp index 032e177..5ee3165 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -227,7 +227,8 @@ Value 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(f, ~f); - safety += ShelterStrength[d][ourRank]; + // higher weight for pawns on second rank and missing shelter in drop variants + safety += ShelterStrength[d][ourRank] * (1 + (pos.captures_to_hand() && ourRank <= RANK_2)); safety -= (ourRank && (ourRank == theirRank - 1)) ? BlockedStorm[theirRank] : UnblockedStorm[d][theirRank]; } -- 1.7.0.4