X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=787004b4e7ac59b65f20b8764dae93358aaa5274;hp=d87c51272862dac0cea0f79a7caf8dc2e4062f7b;hb=f86d2aee29d9fd86a29e976698c76afc2a187903;hpb=67f91bc5eaed821f35f09c9490a80200e1ab6951 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index d87c5127..787004b4 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 = 12; - const int RookContactCheck = 8; - const int QueenCheck = 6; - const int RookCheck = 4; - const int BishopCheck = 1; - const int KnightCheck = 2; + const int QueenContactCheck = 24; + const int RookContactCheck = 16; + const int QueenCheck = 12; + const int RookCheck = 8; + const int BishopCheck = 2; + const int KnightCheck = 3; // KingExposed[Square] contains penalties based on the position of the // defending king, indexed by king's square (from white's point of view). @@ -508,7 +508,9 @@ Value do_evaluate(const Position& pos, Value& margin) { ei.kingAdjacentZoneAttacksCount[Us] += popcount(bb); } - int mob = popcount(b & mobilityArea); + int mob = Piece != QUEEN ? popcount(b & mobilityArea) + : popcount(b & mobilityArea); + mobility[Us] += MobilityBonus[Piece][mob]; // Decrease score if we are attacked by an enemy pawn. Remaining part @@ -876,9 +878,7 @@ Value do_evaluate(const Position& pos, Value& margin) { ebonus -= ebonus / 4; } - // Increase the bonus if we have more non-pawn pieces - if (pos.count( Us) - pos.count( Us) > - pos.count(Them) - pos.count(Them)) + if (pos.count(Us) < pos.count(Them)) ebonus += ebonus / 4; score += make_score(mbonus, ebonus);