X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmovepick.cpp;h=cea4efb4bebd1a00deb723e4920d7306db09aa42;hb=d9e3be4790bb04820d80dacfedd162b4b03971f2;hp=797f5e9497ab14e6d142a0bad75b560914f6018a;hpb=e1ed67aacbe7fb4b462b9141d3137bed0a3ea70b;p=stockfish diff --git a/src/movepick.cpp b/src/movepick.cpp index 797f5e94..cea4efb4 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -63,9 +63,8 @@ namespace { /// search captures, promotions and some checks) and about how important good /// move ordering is at the current node. -MovePicker::MovePicker(const Position& p, bool pv, Move ttm, Depth d, SearchStack* ss) : pos(p) { - - pvNode = pv; +MovePicker::MovePicker(const Position& p, Move ttm, Depth d, + const History& h, SearchStack* ss) : pos(p), H(h) { ttMove = ttm; if (ss) { @@ -75,17 +74,14 @@ MovePicker::MovePicker(const Position& p, bool pv, Move ttm, Depth d, SearchStac } else mateKiller = killer1 = killer2 = MOVE_NONE; - depth = d; - movesPicked = 0; - numOfMoves = 0; - numOfBadCaptures = 0; - checkKillers = checkLegal = false; + movesPicked = numOfMoves = numOfBadCaptures = 0; + checkKillers = checkLegal = finished = false; if (p.is_check()) phaseIndex = EvasionsPhaseIndex; - else if (depth > Depth(0)) + else if (d > Depth(0)) phaseIndex = MainSearchPhaseIndex; - else if (depth == Depth(0)) + else if (d == Depth(0)) phaseIndex = QsearchWithChecksPhaseIndex; else phaseIndex = QsearchWithoutChecksPhaseIndex; @@ -251,7 +247,7 @@ void MovePicker::score_captures() { seeValue = pos.see(m); if (seeValue >= 0) { - if (move_promotion(m)) + if (move_is_promotion(m)) moves[i].score = QueenValueMidgame; else moves[i].score = int(pos.midgame_value_of_piece_on(move_to(m))) @@ -311,7 +307,7 @@ void MovePicker::score_qcaptures() { for (int i = 0; i < numOfMoves; i++) { Move m = moves[i].move; - if (move_promotion(m)) + if (move_is_promotion(m)) moves[i].score = QueenValueMidgame; else moves[i].score = int(pos.midgame_value_of_piece_on(move_to(m)))