]> git.sesse.net Git - stockfish/blobdiff - src/movepick.cpp
Improve ordering of good captures using rank term
[stockfish] / src / movepick.cpp
index 9656e5e64ddfd912aa694fcffef4c4edc271916e..3fe09bb7391260bdf94f6eee465c86dee3f82374 100644 (file)
@@ -147,8 +147,9 @@ void MovePicker::score<CAPTURES>() {
   // badCaptures[] array, but instead of doing it now we delay until the move
   // has been picked up in pick_move_from_list(). This way we save some SEE
   // calls in case we get a cutoff.
-  for (auto& m : *this)
-      m.value =  Value(int(pos.piece_on(to_sq(m))));
+  for (auto& m : *this){
+      m.value = PieceValue[MG][pos.piece_on(to_sq(m))] - 200*relative_rank(pos.side_to_move(), to_sq(m));
+  }
 }
 
 template<>