]> git.sesse.net Git - stockfish/commitdiff
Simplify check extension
authorUnai Corzo <corzounai@gmail.com>
Sat, 1 May 2021 08:18:57 +0000 (10:18 +0200)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Sun, 2 May 2021 15:48:57 +0000 (17:48 +0200)
Simplify check extension, as it seems not to bring any strength and thus is no longer needed.

STC https://tests.stockfishchess.org/tests/view/608c18e995e7f1852abd2b81
LLR: 2.94 (-2.94,2.94) <-2.50,0.50>
Total: 54544 W: 4891 L: 4815 D: 44838
Ptnml(0-2): 186, 3889, 19081, 3895, 221

LTC https://tests.stockfishchess.org/tests/view/608c6ab195e7f1852abd2bc6
LLR: 2.95 (-2.94,2.94) <-2.50,0.50>
Total: 51008 W: 1845 L: 1794 D: 47369
Ptnml(0-2): 31, 1591, 22206, 1648, 28

closes https://github.com/official-stockfish/Stockfish/pull/3452

bench: 3993071

src/position.h
src/search.cpp

index d470ef908e13a40b2196ece8fa2f1a05b169a01a..c226373b1f7cd3d1125b8434c4ad78e699e4e98d 100644 (file)
@@ -115,7 +115,6 @@ public:
   Bitboard blockers_for_king(Color c) const;
   Bitboard check_squares(PieceType pt) const;
   Bitboard pinners(Color c) const;
-  bool is_discovered_check_on_king(Color c, Move m) const;
 
   // Attacks to/from a given square
   Bitboard attackers_to(Square s) const;
@@ -301,10 +300,6 @@ inline Bitboard Position::check_squares(PieceType pt) const {
   return st->checkSquares[pt];
 }
 
-inline bool Position::is_discovered_check_on_king(Color c, Move m) const {
-  return st->blockersForKing[c] & from_sq(m);
-}
-
 inline bool Position::pawn_passed(Color c, Square s) const {
   return !(pieces(~c, PAWN) & passed_pawn_span(c, s));
 }
index 5542fc87366a0923a5f2122ad91144c0def70a1f..fd833b812d9935c5fcdec4ab105b8cce5a689034 100644 (file)
@@ -1155,11 +1155,6 @@ moves_loop: // When in check, search starts from here
           }
       }
 
-      // Check extension (~2 Elo)
-      else if (    givesCheck
-               && (pos.is_discovered_check_on_king(~us, move) || pos.see_ge(move)))
-          extension = 1;
-
       // Add extension to new depth
       newDepth += extension;