Change advanced pawn push threshold
authorTopologist <thelisting@web.de>
Mon, 8 Mar 2021 18:46:41 +0000 (19:46 +0100)
committerStéphane Nicolet <cassio@free.fr>
Wed, 10 Mar 2021 11:32:53 +0000 (12:32 +0100)
A pawn push is now considered to be "advanced" if the relative destination
rank is > 6 (previously it was > 5). This affects the search heuristic.

Also remove an assert concerning en passant moves in qsearch().

STC:
LLR: 2.97 (-2.94,2.94) {-0.25,1.25}
Total: 46744 W: 4224 L: 4040 D: 38480
Ptnml(0-2): 165, 3206, 16451, 3380, 170
https://tests.stockfishchess.org/tests/view/604746082433018de7a3872e

LTC:
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 107840 W: 4198 L: 3892 D: 99750
Ptnml(0-2): 58, 3472, 46557, 3772, 61
https://tests.stockfishchess.org/tests/view/60475eae2433018de7a38737

Closes https://github.com/official-stockfish/Stockfish/pull/3389

Bench: 4796780

AUTHORS
src/position.h
src/search.cpp

diff --git a/AUTHORS b/AUTHORS
index 3ef7d1b13ecba5e09da82f5868e2a7c96a99ef88..662cc6ecef96cc0a7ff0bf6051f14f26c55386f4 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -168,6 +168,7 @@ Sergio Vieri (sergiovieri)
 sf-x
 Shane Booth (shane31)
 Shawn Varghese (xXH4CKST3RXx)
+Siad Daboul (Topologist)
 Stefan Geschwentner (locutus2)
 Stefano Cardanobile (Stefano80)
 Steinar Gunderson (sesse)
index 4ab3761fd4a8b824bafe9301db638290cefd379e..a7654aa1a547f9f4646157bf3a9cba1e4c5c6c72 100644 (file)
@@ -312,7 +312,7 @@ inline bool Position::pawn_passed(Color c, Square s) const {
 
 inline bool Position::advanced_pawn_push(Move m) const {
   return   type_of(moved_piece(m)) == PAWN
-        && relative_rank(sideToMove, to_sq(m)) > RANK_5;
+        && relative_rank(sideToMove, to_sq(m)) > RANK_6;
 }
 
 inline int Position::pawns_on_same_color_squares(Color c, Square s) const {
index 4e2ec095cb3c0912a2e2627c97337473f550c8c3..fa592a859947e09e1f30fcefb8bd276ccccec16f 100644 (file)
@@ -1575,15 +1575,13 @@ moves_loop: // When in check, search starts from here
 
       moveCount++;
 
-      // Futility pruning
+      // Futility pruning and moveCount pruning
       if (    bestValue > VALUE_TB_LOSS_IN_MAX_PLY
           && !givesCheck
           &&  futilityBase > -VALUE_KNOWN_WIN
           && !pos.advanced_pawn_push(move))
       {
-          assert(type_of(move) != EN_PASSANT); // Due to !pos.advanced_pawn_push
 
-          // moveCount pruning
           if (moveCount > 2)
               continue;