X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=056dc250377a9ecf8ae63ab3270247f3cc331da3;hb=e88ef801af3ac5400c1b82d009666fb082c24a16;hp=93867f0f0b20859f97598d094a54dedbb0d5f171;hpb=074c7a3c30dce46b65bc7deb15619a6a33ecf4a8;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 93867f0f..056dc250 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -600,11 +600,9 @@ namespace { && abs(beta) < VALUE_MATE_IN_MAX_PLY && !pos.pawn_on_7th(pos.side_to_move())) { - Value rbeta = beta - razor_margin(depth); - Value v = qsearch(pos, ss, rbeta-1, rbeta, DEPTH_ZERO); - if (v < rbeta) - // Logically we should return (v + razor_margin(depth)), but - // surprisingly this performed slightly weaker in tests. + Value ralpha = alpha - razor_margin(depth); + Value v = qsearch(pos, ss, ralpha, ralpha+1, DEPTH_ZERO); + if (v <= ralpha) return v; } @@ -632,7 +630,7 @@ namespace { // Null move dynamic reduction based on depth and value Depth R = 3 * ONE_PLY - + depth / (2 * ONE_PLY) + + depth / 4 + int(eval - beta) / PawnValueMg * ONE_PLY; pos.do_null_move(st);