X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=64cdb325ebce53c3a785747767cf76109b5daa31;hb=1e586288ca4a0ae567c8d9b9b77e804f25fe6719;hp=b32016500fb8cccb476a4d2549b3348ebe791f9e;hpb=7ae3c05795e79c9bd945607cdcfb08198f4c4b45;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index b3201650..64cdb325 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -728,8 +728,7 @@ namespace { && ttMove == MOVE_NONE && eval + razor_margin[depth / ONE_PLY] <= alpha) { - if ( depth <= ONE_PLY - && eval + razor_margin[3 * ONE_PLY] <= alpha) + if (depth <= ONE_PLY) return qsearch(pos, ss, alpha, beta, DEPTH_ZERO); Value ralpha = alpha - razor_margin[depth / ONE_PLY]; @@ -920,7 +919,6 @@ moves_loop: // When in check search starts from here // Step 13. Pruning at shallow depth if ( !rootNode - && !inCheck && bestValue > VALUE_MATED_IN_MAX_PLY) { if ( !captureOrPromotion @@ -1122,6 +1120,9 @@ moves_loop: // When in check search starts from here // All legal moves have been searched and if there are no legal moves, it // must be a mate or a stalemate. If we are in a singular extension search then // return a fail low score. + + assert(moveCount || !inCheck || excludedMove || !MoveList(pos).size()); + if (!moveCount) bestValue = excludedMove ? alpha : inCheck ? mated_in(ss->ply) : DrawValue[pos.side_to_move()];