X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=49620e4666d74b642328784074fa6a6cf819d2af;hp=558e7d1335476562a351f41e005cb80530ba882b;hb=5aeb907fa19afb22c92b3076d3ff73386cf7755c;hpb=0c68971c13f02dc0303716457fe96ed2f8c095e5 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 558e7d13..49620e46 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -200,12 +200,12 @@ namespace { const int KingAttackWeights[] = { 0, 0, 2, 2, 3, 5 }; // Bonuses for enemy's safe checks - const int QueenContactCheck = 6; - const int RookContactCheck = 4; - const int QueenCheck = 3; - const int RookCheck = 2; + const int QueenContactCheck = 12; + const int RookContactCheck = 8; + const int QueenCheck = 6; + const int RookCheck = 4; const int BishopCheck = 1; - const int KnightCheck = 1; + const int KnightCheck = 2; // KingExposed[Square] contains penalties based on the position of the // defending king, indexed by king's square (from white's point of view). @@ -699,7 +699,7 @@ Value do_evaluate(const Position& pos, Value& margin) { // number and types of the enemy's attacking pieces, the number of // attacked and undefended squares around our king, the square of the // king, and the quality of the pawn shelter. - attackUnits = std::min(25, (ei.kingAttackersCount[Them] * ei.kingAttackersWeight[Them]) / 2) + attackUnits = std::min(20, (ei.kingAttackersCount[Them] * ei.kingAttackersWeight[Them]) / 2) + 3 * (ei.kingAdjacentZoneAttacksCount[Them] + popcount(undefended)) + KingExposed[relative_square(Us, ksq)] - mg_value(score) / 32;