X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fevaluate.cpp;h=8bbd0bff161b3917f6fae299f6f21fe7ff65d2af;hb=9749f1f14c956133c2f42f96592b46f4f2c2b7ec;hp=c5af2f89524e5f9c04b89bb5c1780d8caa105911;hpb=6fbe027da05d6de0b7f03e8696bbde2e33baad98;p=stockfish diff --git a/src/evaluate.cpp b/src/evaluate.cpp index c5af2f89..8bbd0bff 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -509,7 +509,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 += MobilityBonus[Piece][mob]; // Decrease score if we are attacked by an enemy pawn. Remaining part @@ -554,7 +556,7 @@ Value do_evaluate(const Position& pos, Value& margin) { if (ei.pi->semiopen(Us, file_of(s))) score += ei.pi->semiopen(Them, file_of(s)) ? RookOpenFile : RookSemiopenFile; - if (mob > 6 || ei.pi->semiopen(Us, file_of(s))) + if (mob > 3 || ei.pi->semiopen(Us, file_of(s))) continue; Square ksq = pos.king_square(Us); @@ -1142,7 +1144,7 @@ Value do_evaluate(const Position& pos, Value& margin) { stream.str(""); stream << std::showpoint << std::showpos << std::fixed << std::setprecision(2); - memset(scores, 0, 2 * (TOTAL + 1) * sizeof(Score)); + std::memset(scores, 0, 2 * (TOTAL + 1) * sizeof(Score)); Value margin; do_evaluate(pos, margin);