Tweak shogi passed pawn eval
authorFabian Fichter <ianfab@users.noreply.github.com>
Sun, 27 Dec 2020 09:53:34 +0000 (10:53 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sun, 27 Dec 2020 09:53:34 +0000 (10:53 +0100)
shogi STC
LLR: -2.97 (-2.94,2.94) [0.00,10.00]
Total: 11164 W: 5584 L: 5526 D: 54
http://www.variantfishtest.org:6543/tests/view/5fe0e1e96e23db221d9e9647

shogi LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 17209 W: 8731 L: 8381 D: 97
http://www.variantfishtest.org:6543/tests/view/5fe454c96e23db221d9e96a2

src/evaluate.cpp

index 6880f69..67aafa0 100644 (file)
@@ -1050,9 +1050,9 @@ namespace {
                 continue;
 
             Square blockSq = s + Up;
-            int d = std::max(pos.promotion_rank() - relative_rank(Us, s, pos.max_rank()), 1);
+            int d = 2 * std::max(pos.promotion_rank() - relative_rank(Us, s, pos.max_rank()), 1);
             d += !!(attackedBy[Them][ALL_PIECES] & ~attackedBy2[Us] & blockSq);
-            score += make_score(PieceValue[MG][pt], PieceValue[EG][pt]) / (4 * d * d);
+            score += make_score(PieceValue[MG][pt], PieceValue[EG][pt]) / (d * d);
         }
     }