Refine scale factor of opposite colored bishops endgames.
authorVizvezdenec <Vizvezdenec@gmail.com>
Sat, 2 May 2020 13:45:20 +0000 (16:45 +0300)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Sat, 2 May 2020 15:30:22 +0000 (17:30 +0200)
This patch makes it dependant on the count of passed pawns of
the strong side instead of 22/64 in every case.

passed STC
https://tests.stockfishchess.org/tests/view/5ead60966ffeed51f6e32591
LLR: 2.96 (-2.94,2.94) {-0.50,1.50}
Total: 50336 W: 9473 L: 9241 D: 31622
Ptnml(0-2): 570, 5371, 13098, 5515, 614

passed LTC
https://tests.stockfishchess.org/tests/view/5ead6d3b6ffeed51f6e325b0
LLR: 2.94 (-2.94,2.94) {0.25,1.75}
Total: 21952 W: 2810 L: 2603 D: 16539
Ptnml(0-2): 101, 1791, 7005, 1958, 121

closes https://github.com/official-stockfish/Stockfish/pull/2658

bench 4247490

src/evaluate.cpp

index 874faa6b3330c692bfe5ac3696c3716d3dc92ec7..67e0592105516cae1d2988d4f1e328a8b1bea161 100644 (file)
@@ -768,7 +768,7 @@ namespace {
         {
             if (   pos.non_pawn_material(WHITE) == BishopValueMg
                 && pos.non_pawn_material(BLACK) == BishopValueMg)
-                sf = 22;
+                sf = 18 + 4 * popcount(pe->passed_pawns(strongSide));
             else
                 sf = 22 + 3 * pos.count<ALL_PIECES>(strongSide);
         }