Rewrite extinction evaluation
authorFabian Fichter <ianfab@users.noreply.github.com>
Fri, 27 Mar 2020 18:21:56 +0000 (19:21 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Fri, 27 Mar 2020 18:21:56 +0000 (19:21 +0100)
kinglet STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 265 W: 159 L: 67 D: 39
http://www.variantfishtest.org:6543/tests/view/5e7ba5f96e23db4f73614a6a

kinglet LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 292 W: 172 L: 79 D: 41
http://www.variantfishtest.org:6543/tests/view/5e7ce6916e23db4f73614a89

extinction STC
LLR: 2.95 (-2.94,2.94) [-10.00,5.00]
Total: 1777 W: 834 L: 784 D: 159
http://www.variantfishtest.org:6543/tests/view/5e7ce71b6e23db4f73614a92

extinction LTC
LLR: 2.98 (-2.94,2.94) [-10.00,5.00]
Total: 791 W: 376 L: 320 D: 95
http://www.variantfishtest.org:6543/tests/view/5e7ce9c96e23db4f73614a9b

src/evaluate.cpp

index 3e5a885..d6e5078 100644 (file)
@@ -931,7 +931,9 @@ namespace {
             {
                 int denom = std::max(pos.count(Us, pt) - pos.extinction_piece_count(), 1);
                 if (pos.count(Them, pt) >= pos.extinction_opponent_piece_count() || pos.two_boards())
-                    score += make_score(1100, 1100) / denom * (pos.extinction_value() / VALUE_MATE);
+                    score += make_score(1000000 / (500 + PieceValue[MG][pt]),
+                                        1000000 / (500 + PieceValue[EG][pt])) / (denom * denom)
+                            * (pos.extinction_value() / VALUE_MATE);
             }
             else if (pos.extinction_value() == VALUE_MATE && !pos.count<KING>(Us))
                 score += make_score(5000, pos.non_pawn_material(Us)) / pos.count<ALL_PIECES>(Us);