X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=539c486852ee278e0295deb7a53919a7fd634ac6;hp=e0bd2a674025d0795955310c60758127509b4867;hb=36c381154bcfb23b1ba9f1178c9eb9232099b821;hpb=333696318555004770f6d2acaae0eb743cc7e9de diff --git a/src/movepick.cpp b/src/movepick.cpp index e0bd2a67..539c4868 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -30,7 +30,7 @@ namespace { EVASION, EVASIONS_S2, QSEARCH_0, CAPTURES_S3, QUIET_CHECKS_S3, QSEARCH_1, CAPTURES_S4, - MULTICUT, CAPTURES_S5, + PROBCUT, CAPTURES_S5, RECAPTURE, CAPTURES_S6, STOP }; @@ -128,9 +128,9 @@ MovePicker::MovePicker(const Position& p, Move ttm, const HistoryStats& h, Piece assert(!pos.checkers()); - stage = MULTICUT; + stage = PROBCUT; - // In MultiCut we generate only captures that are better than the parent's + // In ProbCut we generate only captures that are better than the parent's // captured piece. captureThreshold = PieceValue[MG][pt]; ttMove = (ttm && pos.pseudo_legal(ttm) ? ttm : MOVE_NONE); @@ -193,12 +193,12 @@ void MovePicker::score() { // is not under attack, ordered by history value, then bad-captures and quiet // moves with a negative SEE. This last group is ordered by the SEE score. Move m; - int seeScore; + Value seeScore; for (ExtMove* it = moves; it != end; ++it) { m = it->move; - if ((seeScore = pos.see_sign(m)) < 0) + if ((seeScore = pos.see_sign(m)) < VALUE_ZERO) it->score = seeScore - HistoryStats::Max; // At the bottom else if (pos.capture(m)) @@ -281,7 +281,7 @@ void MovePicker::generate_next_stage() { end = generate(pos, moves); return; - case EVASION: case QSEARCH_0: case QSEARCH_1: case MULTICUT: case RECAPTURE: + case EVASION: case QSEARCH_0: case QSEARCH_1: case PROBCUT: case RECAPTURE: stage = STOP; case STOP: end = cur + 1; // Avoid another next_phase() call @@ -309,7 +309,7 @@ Move MovePicker::next_move() { switch (stage) { - case MAIN_SEARCH: case EVASION: case QSEARCH_0: case QSEARCH_1: case MULTICUT: + case MAIN_SEARCH: case EVASION: case QSEARCH_0: case QSEARCH_1: case PROBCUT: ++cur; return ttMove; @@ -317,7 +317,7 @@ Move MovePicker::next_move() { move = pick_best(cur++, end)->move; if (move != ttMove) { - if (pos.see_sign(move) >= 0) + if (pos.see_sign(move) >= VALUE_ZERO) return move; // Losing capture, move it to the tail of the array