From: SFisGOD Date: Tue, 18 Aug 2020 10:54:28 +0000 (+0800) Subject: Reintroduce last captures extension X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=2deb08a52946379d4cebb1082e5d740d1d027122 Reintroduce last captures extension STC: LLR: 2.93 (-2.94,2.94) {-0.50,1.50} Total: 34840 W: 3834 L: 3682 D: 27324 Ptnml(0-2): 153, 2767, 11455, 2865, 180 https://tests.stockfishchess.org/tests/view/5f3bb380b38d442594aabefc LTC: LLR: 2.95 (-2.94,2.94) {0.25,1.75} Total: 15832 W: 890 L: 776 D: 14166 Ptnml(0-2): 17, 669, 6429, 785, 16 https://tests.stockfishchess.org/tests/view/5f3c46a0a95672ddd56c632a closes https://github.com/official-stockfish/Stockfish/pull/3028 see also https://github.com/official-stockfish/Stockfish/pull/3020 Bench: 4348811 --- diff --git a/src/search.cpp b/src/search.cpp index 1d5bc5f7..7c839dfc 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1122,6 +1122,11 @@ moves_loop: // When in check, search starts from here && (pos.is_discovery_check_on_king(~us, move) || pos.see_ge(move))) extension = 1; + // Last captures extension + else if ( PieceValue[EG][pos.captured_piece()] > PawnValueEg + && pos.non_pawn_material() <= 2 * RookValueMg) + extension = 1; + // Castling extension if ( type_of(move) == CASTLING && popcount(pos.pieces(us) & ~pos.pieces(PAWN) & (to_sq(move) & KingSide ? KingSide : QueenSide)) <= 2)