X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=2161bf94c07ddf1ee53af1d0c9116a421698a4bc;hp=f70014e293d2ac9d88d5e3fe9d62f8102ea70e2c;hb=42a20920e5259dbe3efd9002fbc7176a9f071636;hpb=d07a8753983d0cbe7d81e61136b304e771b57ba7 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index f70014e2..2161bf94 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -27,7 +27,6 @@ #include "material.h" #include "pawns.h" #include "thread.h" -#include "uci.h" namespace { @@ -199,8 +198,6 @@ namespace { // scores, indexed by a calculated integer number. Score KingDanger[128]; - const int ScalePawnSpan[2] = { 38, 56 }; - // apply_weight() weighs score 'v' by weight 'w' trying to prevent overflow Score apply_weight(Score v, const Weight& w) { return make_score(mg_value(v) * w.mg / 256, eg_value(v) * w.eg / 256); @@ -784,7 +781,7 @@ namespace { else if ( abs(eg_value(score)) <= BishopValueEg && ei.pi->pawn_span(strongSide) <= 1 && !pos.pawn_passed(~strongSide, pos.king_square(~strongSide))) - sf = ScaleFactor(ScalePawnSpan[ei.pi->pawn_span(strongSide)]); + sf = ei.pi->pawn_span(strongSide) ? ScaleFactor(56) : ScaleFactor(38); } // Interpolate between a middlegame and a (scaled by 'sf') endgame score @@ -903,8 +900,7 @@ namespace Eval { } - /// init() computes evaluation weights from the corresponding UCI parameters - /// and setup king tables. + /// init() computes evaluation weights. void init() {