X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fendgame.cpp;h=53c9ec8364c4b6a010ff96fec56e1ebc6ac2a814;hp=748b05ffdd840c20275b3f0984ca684fdd64d9cd;hb=9690cd6295fbed93ee434e7b2e16181e475755ac;hpb=e7c1c8c1abd85a71fd8190e0c1af49214625904b diff --git a/src/endgame.cpp b/src/endgame.cpp index 748b05ff..53c9ec83 100644 --- a/src/endgame.cpp +++ b/src/endgame.cpp @@ -58,9 +58,6 @@ namespace { inline int push_close(Square s1, Square s2) { return 140 - 20 * distance(s1, s2); } inline int push_away(Square s1, Square s2) { return 120 - push_close(s1, s2); } - // Pawn Rank based scaling factors used in KRPPKRP endgame - constexpr int KRPPKRPScaleFactors[RANK_NB] = { 0, 9, 10, 14, 21, 44, 0, 0 }; - #ifndef NDEBUG bool verify_material(const Position& pos, Color c, Value npm, int pawnsCnt) { return pos.non_pawn_material(c) == npm && pos.count(c) == pawnsCnt; @@ -587,7 +584,7 @@ ScaleFactor Endgame::operator()(const Position& pos) const { && relative_rank(strongSide, bksq) > r) { assert(r > RANK_1 && r < RANK_7); - return ScaleFactor(KRPPKRPScaleFactors[r]); + return ScaleFactor(7 * r); } return SCALE_FACTOR_NONE; }