X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=8c5ecc36847ac88e5be0b7be3b19650fb853aa65;hp=9d19ad75c7541dbb53836525c56bdf446783b025;hb=2f465927363e3e753dfb65d67f9b126afc34f4fa;hpb=a8f9c7a790883d2d31e108cd2739aefcfa5d919e diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 9d19ad75..8c5ecc36 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -163,7 +163,7 @@ namespace { const Score Unstoppable = S( 0, 20); const Score Hanging = S(31, 26); const Score PawnAttackThreat = S(20, 20); - const Score PawnSafePush = S( 5 , 5); + const Score PawnSafePush = S( 5, 5); // Penalty for a bishop on a1/h1 (a8/h8 for black) which is trapped by // a friendly pawn on b2/g2 (b7/g7 for black). This can obviously only @@ -414,10 +414,10 @@ namespace { // attacked and undefended squares around our king and the quality of // the pawn shelter (current 'score' value). attackUnits = std::min(74, ei.kingAttackersCount[Them] * ei.kingAttackersWeight[Them]) - + 8 * ei.kingAdjacentZoneAttacksCount[Them] + + 8 * ei.kingAdjacentZoneAttacksCount[Them] + 25 * popcount(undefended) - + 11 * (ei.pinnedPieces[Us] != 0) - - mg_value(score) * 31 / 256 + + 11 * (ei.pinnedPieces[Us] != 0) + - mg_value(score) / 8 - !pos.count(Them) * 60; // Analyse the enemy's safe queen contact checks. Firstly, find the @@ -555,7 +555,7 @@ namespace { b &= ~pos.pieces() & ~ei.attackedBy[Them][PAWN] & (ei.attackedBy[Us][ALL_PIECES] | ~ei.attackedBy[Them][ALL_PIECES]); - + if (b) score += popcount(b) * PawnSafePush; @@ -917,14 +917,14 @@ namespace Eval { void init() { - const int MaxSlope = 87; - const int Peak = 12800; + const int MaxSlope = 8700; + const int Peak = 1280000; int t = 0; for (int i = 0; i < 400; ++i) { - t = std::min(Peak, std::min(i * i * 27 / 100, t + MaxSlope)); - KingDanger[i] = apply_weight(make_score(t / 10, 0), Weights[KingSafety]); + t = std::min(Peak, std::min(i * i * 27, t + MaxSlope)); + KingDanger[i] = apply_weight(make_score(t / 1000, 0), Weights[KingSafety]); } }