]> git.sesse.net Git - stockfish/commitdiff
Drop to qsearch at low depth in razoring
authorMichel Van den Bergh <michel.vandenbergh@uhasselt.be>
Tue, 13 May 2014 20:33:41 +0000 (22:33 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 13 May 2014 20:37:28 +0000 (22:37 +0200)
If razoring conditions are satisfied and
depth is low, then directly drop in qsearch.

Passed both STC
LLR: 2.98 (-2.94,2.94) [-1.50,4.50]
Total: 12914 W: 2345 L: 2208 D: 8361

And LTC
LLR: 2.95 (-2.94,2.94) [0.00,6.00]
Total: 50600 W: 7548 L: 7230 D: 35822

bench: 8739659

src/search.cpp

index 3d755586d9885c9ee2310307e0feffee808e3d20..aa63fcb4392d2fbe839b91b2c3bdfc1e764dd69d 100644 (file)
@@ -582,6 +582,10 @@ namespace {
         &&  abs(beta) < VALUE_MATE_IN_MAX_PLY
         && !pos.pawn_on_7th(pos.side_to_move()))
     {
         &&  abs(beta) < VALUE_MATE_IN_MAX_PLY
         && !pos.pawn_on_7th(pos.side_to_move()))
     {
+        if (   depth <= ONE_PLY
+            && eval + razor_margin(3 * ONE_PLY) <= alpha)
+            return qsearch<NonPV, false>(pos, ss, alpha, beta, DEPTH_ZERO);
+
         Value ralpha = alpha - razor_margin(depth);
         Value v = qsearch<NonPV, false>(pos, ss, ralpha, ralpha+1, DEPTH_ZERO);
         if (v <= ralpha)
         Value ralpha = alpha - razor_margin(depth);
         Value v = qsearch<NonPV, false>(pos, ss, ralpha, ralpha+1, DEPTH_ZERO);
         if (v <= ralpha)