From: Fabian Fichter Date: Sun, 10 Mar 2019 15:25:37 +0000 (+0100) Subject: Bonus for extinction piece types X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=ad94871361b746e6eb22177aefa610047169284f;p=fairystockfish.git Bonus for extinction piece types kinglet STC LLR: 2.96 (-2.94,2.94) [0.00,10.00] Total: 117 W: 104 L: 9 D: 4 http://35.161.250.236:6543/tests/view/5c84ed3d6e23db76ed2525af giveaway STC LLR: 2.94 (-2.94,2.94) [-10.00,5.00] Total: 2220 W: 948 L: 905 D: 367 http://35.161.250.236:6543/tests/view/5c85020e6e23db76ed2525b2 extinction STC (failed) LLR: -2.98 (-2.94,2.94) [-10.00,5.00] Total: 939 W: 400 L: 471 D: 68 http://35.161.250.236:6543/tests/view/5c84ece66e23db76ed2525a8 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 9243055..afb8604 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -915,6 +915,16 @@ namespace { score += make_score(3000, 1000) / (remainingChecks * remainingChecks); } + // Extinction + if (pos.extinction_value() != VALUE_NONE) + { + for (PieceType pt : pos.extinction_piece_types()) + if (pt != ALL_PIECES) + score += make_score(1000, 1000) / pos.count(Us, pt) * (pos.extinction_value() / VALUE_MATE); + else if (pos.extinction_value() == VALUE_MATE && !pos.count(Us)) + score += make_score(5000, pos.non_pawn_material(Us)) / pos.count(Us); + } + // Connect-n if (pos.connect_n() > 0) {