- stage = PROBCUT;
-
- // In ProbCut we generate captures with SEE higher than the given threshold
- ttMove = ttm
- && pos.pseudo_legal(ttm)
- && pos.capture(ttm)
- && pos.see(ttm) > threshold ? ttm : MOVE_NONE;
-
- endMoves += (ttMove != MOVE_NONE);
-}
-
-
-/// score() assigns a numerical value to each move in a move list. The moves with
-/// highest values will be picked first.
-template<>
-void MovePicker::score<CAPTURES>() {
- // Winning and equal captures in the main search are ordered by MVV, preferring
- // captures near our home rank. Surprisingly, this appears to perform slightly
- // better than SEE-based move ordering: exchanging big pieces before capturing
- // a hanging piece probably helps to reduce the subtree size.
- // In the main search we want to push captures with negative SEE values to the
- // badCaptures[] array, but instead of doing it now we delay until the move
- // has been picked up, saving some SEE calls in case we get a cutoff.
- for (auto& m : *this)
- m.value = PieceValue[MG][pos.piece_on(to_sq(m))]
- - Value(200 * relative_rank(pos.side_to_move(), to_sq(m)));
+ stage = PROBCUT_TT + !(ttm && pos.capture(ttm)
+ && pos.pseudo_legal(ttm)
+ && pos.see_ge(ttm, threshold));