1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00

Refactor quiet moves pruning in qsearch

Make it formula more in line with what we use in search - current formula is more or less the one we used years ago for search but since then it was remade, this patch remakes qsearch formula to almost exactly the same as we use in search - with sum of conthist 0, 1 and pawn structure history.

Passed STC:
https://tests.stockfishchess.org/tests/view/6639c8421343f0cb16716206
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 84992 W: 22414 L: 22019 D: 40559
Ptnml(0-2): 358, 9992, 21440, 10309, 397

Passed LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 119136 W: 30407 L: 29916 D: 58813
Ptnml(0-2): 46, 13192, 32622, 13641, 67

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

Bench: 2138659
This commit is contained in:
Michael Chaly 2024-05-08 21:59:03 +03:00 committed by Joost VandeVondele
parent 3bdfa0fb4a
commit d1b8d8bab3

View file

@ -1570,8 +1570,9 @@ Value Search::Worker::qsearch(Position& pos, Stack* ss, Value alpha, Value beta,
break;
// Continuation history based pruning (~3 Elo)
if (!capture && (*contHist[0])[pos.moved_piece(move)][move.to_sq()] < 0
&& (*contHist[1])[pos.moved_piece(move)][move.to_sq()] < 0)
if (!capture && (*contHist[0])[pos.moved_piece(move)][move.to_sq()]
+ (*contHist[1])[pos.moved_piece(move)][move.to_sq()]
+ thisThread->pawnHistory[pawn_structure_index(pos)][pos.moved_piece(move)][move.to_sq()] <= 4000)
continue;
// Do not search moves with bad enough SEE values (~5 Elo)