X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=725ea49ce05ba1d6981ca15f460afae8535169c0;hp=0a7d0af9ae5b68af2f2519870b3579de9368d2fb;hb=5446e6f408f2ed7fa281dbe0097c46674d193260;hpb=79c97625a42c131708af953839900aff31102454 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 0a7d0af9..725ea49c 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -213,7 +213,7 @@ namespace { // kingRing[color] are the squares adjacent to the king, plus (only for a // king on its first rank) the squares two ranks in front. For instance, // if black's king is on g8, kingRing[BLACK] is f8, h8, f7, g7, h7, f6, g6 - // and h6. It is set to 0 when king safety evaluation is skipped. + // and h6. Bitboard kingRing[COLOR_NB]; // kingAttackersCount[color] is the number of pieces of the given color @@ -505,7 +505,7 @@ namespace { Score score = SCORE_ZERO; // Non-pawn enemies - nonPawnEnemies = pos.pieces(Them) & ~pos.pieces(Them, PAWN); + nonPawnEnemies = pos.pieces(Them) & ~pos.pieces(PAWN); // Squares strongly protected by the enemy, either because they defend the // square with a pawn, or because they defend the square twice and we don't. @@ -717,8 +717,8 @@ namespace { behind |= (Us == WHITE ? behind >> 16 : behind << 16); int bonus = popcount(safe) + popcount(behind & safe); - int weight = pos.count(Us) - - 2 * popcount(pe->semiopenFiles[WHITE] & pe->semiopenFiles[BLACK]); + int weight = pos.count(Us) + - 2 * popcount(pe->semiopenFiles[WHITE] & pe->semiopenFiles[BLACK]); Score score = make_score(bonus * weight * weight / 16, 0);