X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=61e5527f42c61d638132201f0b2f2efd18bc999a;hp=8f3f65b165d2c8d65031aecf6046001623a54f92;hb=a21a110188eed1ff41f2a1535a93b48c654663de;hpb=811037c8457fc46dba267e70192d3cd38676249f diff --git a/src/movepick.cpp b/src/movepick.cpp index 8f3f65b1..61e5527f 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -56,7 +56,7 @@ namespace { /// move ordering is at the current node. MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h, - SearchStack* ss, Value beta) : pos(p), H(h) { + SearchStack* ss, Value beta) : pos(p), H(h), depth(d) { captureThreshold = 0; badCaptures = moves + MAX_MOVES; @@ -162,7 +162,8 @@ void MovePicker::go_next_phase() { case PH_NONCAPTURES_2: curMove = lastMove; lastMove = lastNonCapture; - insertion_sort(curMove, lastMove); + if (depth >= 3 * ONE_PLY) + insertion_sort(curMove, lastMove); return; case PH_BAD_CAPTURES: