X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=4eb842a0e3e7d9eda96a7bf1e7a1ff1c599bb013;hp=eb686f7938837d23acb86e0812ea52e1f442d72d;hb=941f4e1643edbdf28118a47d0277747bb358d3ad;hpb=dcdac83187f44b14893ea261abd647c829d32c2b diff --git a/src/movepick.cpp b/src/movepick.cpp index eb686f79..4eb842a0 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -45,9 +45,7 @@ namespace { int MainSearchPhaseIndex; int EvasionsPhaseIndex; int QsearchWithChecksPhaseIndex; - int QsearchNoCapturesPhaseIndex; int QsearchWithoutChecksPhaseIndex; - int NoMovesPhaseIndex; } @@ -77,11 +75,6 @@ MovePicker::MovePicker(const Position& p, bool pv, Move ttm, numOfMoves = 0; numOfBadCaptures = 0; - // With EvalInfo we are able to know how many captures are possible before - // generating them. So avoid generating in case we know are zero. - Color us = pos.side_to_move(); - Color them = opposite_color(us); - if (p.is_check()) phaseIndex = EvasionsPhaseIndex; else if (depth > Depth(0)) @@ -91,6 +84,8 @@ MovePicker::MovePicker(const Position& p, bool pv, Move ttm, else phaseIndex = QsearchWithoutChecksPhaseIndex; + Color us = pos.side_to_move(); + dc = p.discovered_check_candidates(us); pinned = p.pinned_pieces(us); @@ -520,17 +515,9 @@ void MovePicker::init_phase_table() { PhaseTable[i++] = PH_QCHECKS; PhaseTable[i++] = PH_STOP; - // Quiescence search with checks only and no captures - QsearchNoCapturesPhaseIndex = i - 1; - PhaseTable[i++] = PH_QCHECKS; - PhaseTable[i++] = PH_STOP; - // Quiescence search without checks QsearchWithoutChecksPhaseIndex = i - 1; PhaseTable[i++] = PH_QCAPTURES; PhaseTable[i++] = PH_STOP; - // Do not generate any move - NoMovesPhaseIndex = i - 1; - PhaseTable[i++] = PH_STOP; }