From 08d66733dc623d1e708af74e9e9631f35662813d Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Fri, 23 Oct 2020 12:04:43 +0200 Subject: [PATCH] Evaluate horde imbalance horde STC LLR: 2.96 (-2.94,2.94) [0.00,10.00] Total: 570 W: 337 L: 227 D: 6 http://www.variantfishtest.org:6543/tests/view/5f91bada6e23db221d9e933c horde LTC LLR: 2.96 (-2.94,2.94) [0.00,10.00] Total: 592 W: 347 L: 237 D: 8 http://www.variantfishtest.org:6543/tests/view/5f91cf096e23db221d9e9340 --- src/evaluate.cpp | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 1884e03..9ebb9fc 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -1147,6 +1147,16 @@ namespace { } else if (pos.extinction_value() == VALUE_MATE) score += make_score(pos.non_pawn_material(Us), pos.non_pawn_material(Us)) / pos.count(Us); + else if (pos.count(Us) == pos.count(Us)) + { + // Pawns easy to stop/capture + int l = 0, m = 0, r = popcount(pos.pieces(Us, PAWN) & file_bb(FILE_A)); + for (File f = FILE_A; f <= pos.max_file(); ++f) + { + l = m; m = r; r = popcount(pos.pieces(Us, PAWN) & shift(file_bb(f))); + score -= make_score(30, 30) * m / (1 + l * r); + } + } } // Connect-n -- 1.7.0.4