X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=80bec8746f8bd8edd7bd6db869c9c5b31b439e90;hp=d291e46b6c8c21c7816952adf89c311874cbcbc5;hb=ee8cdb172173a5af199299320d8f385f63efd1f2;hpb=918533dc06f8d5f9458e731d38ebdac1b96ef9eb diff --git a/src/evaluate.cpp b/src/evaluate.cpp index d291e46b..80bec874 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -861,8 +861,7 @@ namespace { // value if the other side has a rook or queen. if (square_file(s) == FILE_A || square_file(s) == FILE_H) { - if ( pos.non_pawn_material(Them) <= KnightValueMidgame - && pos.piece_count(Them, KNIGHT) <= 1) + if (pos.non_pawn_material(Them) <= KnightValueMidgame) ebonus += ebonus / 4; else if (pos.pieces(ROOK, QUEEN, Them)) ebonus -= ebonus / 4; @@ -895,7 +894,7 @@ namespace { Square s = pop_1st_bit(&b); Square queeningSquare = relative_square(c, make_square(square_file(s), RANK_8)); int d = square_distance(s, queeningSquare) - - (relative_rank(c, s) == RANK_2) // Double pawn push + - int(relative_rank(c, s) == RANK_2) // Double pawn push - square_distance(pos.king_square(opposite_color(c)), queeningSquare) + int(c != pos.side_to_move());