X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fevaluate.cpp;h=9868d54e5170a7de0feb3cb98afa44103993c580;hb=6d665b7f78d03ef7c15d7964b28dccd6b6826adf;hp=77821a3ad3dde342e5981638dab3862cf6680110;hpb=b1929960f9b73cb8fcc86fdbdf7a8d2d1de4fc53;p=stockfish diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 77821a3a..9868d54e 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -142,9 +142,9 @@ namespace { { S(0, 0), S(15, 39), S(15, 39), S(15, 39), S(15, 39), S( 0, 0) } // QUEEN }; - // ThreatedByPawnPenalty[PieceType] contains a penalty according to which + // ThreatenedByPawnPenalty[PieceType] contains a penalty according to which // piece type is attacked by an enemy pawn. - const Score ThreatedByPawnPenalty[] = { + const Score ThreatenedByPawnPenalty[] = { S(0, 0), S(0, 0), S(56, 70), S(56, 70), S(76, 99), S(86, 118) }; @@ -524,7 +524,7 @@ namespace { // Decrease score if we are attacked by an enemy pawn. Remaining part // of threat evaluation must be done later when we have full attack info. if (bit_is_set(ei.attackedBy[Them][PAWN], s)) - score -= ThreatedByPawnPenalty[Piece]; + score -= ThreatenedByPawnPenalty[Piece]; // Bishop and knight outposts squares if ((Piece == BISHOP || Piece == KNIGHT) && pos.square_is_weak(s, Us)) @@ -924,7 +924,7 @@ namespace { // Opponent king cannot block because path is defended and position // is not in check. So only friendly pieces can be blockers. assert(!pos.in_check()); - assert(queeningPath & pos.occupied_squares() == queeningPath & pos.pieces_of_color(c)); + assert((queeningPath & pos.occupied_squares()) == (queeningPath & pos.pieces_of_color(c))); // Add moves needed to free the path from friendly pieces and retest condition movesToGo += count_1s(queeningPath & pos.pieces_of_color(c));