- ttMove = ttm && pos.pseudo_legal(ttm) ? ttm : MOVE_NONE;
- stage += (ttMove == MOVE_NONE);
-}
-
-MovePicker::MovePicker(const Position& p, Move ttm, Value th)
- : pos(p), threshold(th) {
-
- assert(!pos.checkers());
-
- stage = PROBCUT;
-
- // In ProbCut we generate captures with SEE higher than or equal to the given threshold
- ttMove = ttm
- && pos.pseudo_legal(ttm)
- && pos.capture(ttm)
- && pos.see_ge(ttm, threshold)? ttm : MOVE_NONE;
-
- stage += (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.