]> git.sesse.net Git - stockfish/blobdiff - src/movepick.cpp
Fix comments. Bench: 5109559.
[stockfish] / src / movepick.cpp
index 06935b0d9d13c321db0e6d373f8308bcddd7bf7b..33c65670ffe10afd9c738b1ddf5ac4e9f95f687c 100644 (file)
@@ -123,7 +123,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Value th, const CapturePiece
 
 /// score() assigns a numerical value to each move in a list, used for sorting.
 /// Captures are ordered by Most Valuable Victim (MVV), preferring captures
-/// near our home rank. Quiets are ordered using the histories.
+/// with a good history. Quiets are ordered using the histories.
 template<GenType Type>
 void MovePicker::score() {
 
@@ -182,6 +182,11 @@ Move MovePicker::next_move(bool skipQuiets) {
               if (pos.see_ge(move))
                   return move;
 
+              if (   type_of(pos.piece_on(to_sq(move))) == KNIGHT
+                  && type_of(pos.moved_piece(move)) == BISHOP
+                  && (cur-1)->value > 1090)
+                  return move;
+
               // Losing capture, move it to the beginning of the array
               *endBadCaptures++ = move;
           }