From 4bbb86d5554af59df228c9b44a03a62efc7aed13 Mon Sep 17 00:00:00 2001 From: Fabian Fichter Date: Fri, 18 Dec 2020 10:10:52 +0100 Subject: [PATCH] Simplify horde breakthrough bonus horde STC LLR: 2.96 (-2.94,2.94) [-10.00,5.00] Total: 564 W: 312 L: 248 D: 4 http://www.variantfishtest.org:6543/tests/view/5fdbea7c6e23db221d9e957a horde LTC LLR: 2.97 (-2.94,2.94) [-10.00,5.00] Total: 363 W: 211 L: 146 D: 6 http://www.variantfishtest.org:6543/tests/view/5fdbf10b6e23db221d9e9582 --- src/evaluate.cpp | 9 ++------- 1 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index d5a13e2..7b129a2 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -1188,13 +1188,8 @@ namespace { if (breakthroughs) dist = attackedBy[Us][QUEEN] & breakthroughs ? 0 : 1; else for (File f = FILE_A; f <= pos.max_file(); ++f) - { - int pawns = popcount(pos.pieces(Them, PAWN) & file_bb(f)); - int pawnsl = std::min(popcount(pos.pieces(Them, PAWN) & shift(file_bb(f))), pawns); - int pawnsr = std::min(popcount(pos.pieces(Them, PAWN) & shift(file_bb(f))), pawns); - dist = std::min(dist, pawnsl + pawnsr); - } - score += make_score(60, 60) * pos.count(Them) / (1 + dist) / (pos.pieces(Us, QUEEN) ? 2 : 4); + dist = std::min(dist, popcount(pos.pieces(PAWN) & file_bb(f))); + score += make_score(70, 70) * pos.count(Them) / (1 + dist * (dist + 1)) / (pos.pieces(Us, QUEEN) ? 2 : 4); } } -- 1.7.0.4