]> git.sesse.net Git - stockfish/commitdiff
small ttCapture simplification.
authorJoost VandeVondele <Joost.VandeVondele@gmail.com>
Tue, 2 Oct 2018 14:34:40 +0000 (16:34 +0200)
committerStéphane Nicolet <cassio@free.fr>
Sun, 14 Oct 2018 18:10:47 +0000 (20:10 +0200)
ttCapture can be assigned to only once outside of the main loop. The patch seems
functional at higher depths (seems possible in the case of non-legal TTmoves that
are captures).

passed STC
LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 23189 W: 5098 L: 4980 D: 13111
http://tests.stockfishchess.org/tests/view/5bb3822c0ebc592439f6d966

passed LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 10336 W: 1665 L: 1529 D: 7142
http://tests.stockfishchess.org/tests/view/5bb39a190ebc592439f6db8a

unchanged bench: 4312846

src/search.cpp

index b5ce0c1899d843d84502c85b9cab32d164761d6d..54839f536b7ad9452c5f7a93c53c51338c36e6f1 100644 (file)
@@ -863,7 +863,7 @@ moves_loop: // When in check, search starts from here
     value = bestValue; // Workaround a bogus 'uninitialized' warning under gcc
 
     skipQuiets = false;
-    ttCapture = false;
+    ttCapture = ttMove && pos.capture_or_promotion(ttMove);
     pvExact = PvNode && ttHit && tte->bound() == BOUND_EXACT;
 
     // Step 12. Loop through all pseudo-legal moves until no moves remain
@@ -982,9 +982,6 @@ moves_loop: // When in check, search starts from here
           continue;
       }
 
-      if (move == ttMove && captureOrPromotion)
-          ttCapture = true;
-
       // Update the current move (this must be done after singular extension search)
       ss->currentMove = move;
       ss->continuationHistory = &thisThread->continuationHistory[movedPiece][to_sq(move)];