X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=9b274d59ff6be53d8f5948ac85189df4416ccb21;hp=2e8eb665b9acd04573c9e438d77212f2888ccff6;hb=57b3ca916fdf12ad4ad3dfdcd215379e908b12be;hpb=200fc56e9ce2ce5b879b0cae8268703f041c40b2 diff --git a/src/movepick.cpp b/src/movepick.cpp index 2e8eb665..9b274d59 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -99,7 +99,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Depth d, const History& h, phasePtr = MainSearchPhaseTable; } - else if (d == DEPTH_ZERO) + else if (d >= DEPTH_QS_CHECKS) phasePtr = QsearchWithChecksPhaseTable; else { @@ -132,7 +132,7 @@ void MovePicker::go_next_phase() { return; case PH_GOOD_CAPTURES: - lastMove = generate_captures(pos, moves); + lastMove = generate(pos, moves); score_captures(); return; @@ -142,7 +142,7 @@ void MovePicker::go_next_phase() { return; case PH_NONCAPTURES: - lastMove = generate_noncaptures(pos, moves); + lastMove = generate(pos, moves); score_noncaptures(); sort_moves(moves, lastMove, &lastGoodNonCapture); return; @@ -156,17 +156,17 @@ void MovePicker::go_next_phase() { case PH_EVASIONS: assert(pos.is_check()); - lastMove = generate_evasions(pos, moves); + lastMove = generate(pos, moves); score_evasions(); return; case PH_QCAPTURES: - lastMove = generate_captures(pos, moves); + lastMove = generate(pos, moves); score_captures(); return; case PH_QCHECKS: - lastMove = generate_non_capture_checks(pos, moves); + lastMove = generate(pos, moves); return; case PH_STOP: @@ -313,7 +313,7 @@ Move MovePicker::get_next_move() { // Sort negative scored moves only when we get there if (curMove == lastGoodNonCapture) - insertion_sort(lastGoodNonCapture, lastMove); + insertion_sort(lastGoodNonCapture, lastMove); move = (curMove++)->move; if ( move != ttMoves[0].move