X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fmovepick.cpp;h=c187c3ad6ee8a914ea9eb0904e89cc8dbff47374;hp=1ec56c2f700a7c2a30bedd371af100fc6a29e9ec;hb=0d33466bcd84d9d58ea7049b224f375ba6a51221;hpb=1e586288ca4a0ae567c8d9b9b77e804f25fe6719 diff --git a/src/movepick.cpp b/src/movepick.cpp index 1ec56c2f..c187c3ad 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -115,7 +115,7 @@ MovePicker::MovePicker(const Position& p, Move ttm, Value th) ttMove = ttm && pos.pseudo_legal(ttm) && pos.capture(ttm) - && pos.see(ttm) > threshold ? ttm : MOVE_NONE; + && pos.see_ge(ttm, threshold + 1)? ttm : MOVE_NONE; stage += (ttMove == MOVE_NONE); } @@ -201,7 +201,7 @@ Move MovePicker::next_move() { move = pick_best(cur++, endMoves); if (move != ttMove) { - if (pos.see_sign(move) >= VALUE_ZERO) + if (pos.see_ge(move, VALUE_ZERO)) return move; // Losing capture, move it to the beginning of the array @@ -271,8 +271,7 @@ Move MovePicker::next_move() { case EVASIONS_INIT: cur = moves; endMoves = generate(pos, cur); - if (endMoves - cur - (ttMove != MOVE_NONE) > 1) - score(); + score(); ++stage; case ALL_EVASIONS: @@ -295,7 +294,7 @@ Move MovePicker::next_move() { { move = pick_best(cur++, endMoves); if ( move != ttMove - && pos.see(move) > threshold) + && pos.see_ge(move, threshold + 1)) return move; } break;