diff --git a/src/movepick.cpp b/src/movepick.cpp index 587c6d79..188d6bd8 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -88,8 +88,8 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const ButterflyHist /// MovePicker constructor for ProbCut: we generate captures with SEE greater /// than or equal to the given threshold. -MovePicker::MovePicker(const Position& p, Move ttm, Value th, Depth d, const CapturePieceToHistory* cph) - : pos(p), captureHistory(cph), ttMove(ttm), threshold(th), depth(d) +MovePicker::MovePicker(const Position& p, Move ttm, Value th, const CapturePieceToHistory* cph) + : pos(p), captureHistory(cph), ttMove(ttm), threshold(th) { assert(!pos.checkers()); @@ -191,7 +191,7 @@ top: endMoves = generate(pos, cur); score(); - partial_insertion_sort(cur, endMoves, -3000 * depth); + partial_insertion_sort(cur, endMoves, std::numeric_limits::min()); ++stage; goto top; diff --git a/src/movepick.h b/src/movepick.h index 55fcc644..e4c4a5bf 100644 --- a/src/movepick.h +++ b/src/movepick.h @@ -128,7 +128,7 @@ public: const CapturePieceToHistory*, const PieceToHistory**, Square); - MovePicker(const Position&, Move, Value, Depth, const CapturePieceToHistory*); + MovePicker(const Position&, Move, Value, const CapturePieceToHistory*); Move next_move(bool skipQuiets = false); Bitboard threatenedPieces; diff --git a/src/search.cpp b/src/search.cpp index abb51190..c8163d1f 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -855,7 +855,7 @@ namespace { { assert(probCutBeta < VALUE_INFINITE); - MovePicker mp(pos, ttMove, probCutBeta - ss->staticEval, depth - 3, &captureHistory); + MovePicker mp(pos, ttMove, probCutBeta - ss->staticEval, &captureHistory); while ((move = mp.next_move()) != MOVE_NONE) if (move != excludedMove && pos.legal(move))