mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Introduce post-lmr extensions
This idea is somewhat similar to extentions in LMR but has a different flavour. If result of LMR was really good - thus exceeded alpha by some pretty big given margin, we can extend move after LMR in full depth search with 0 window. The idea is that this move is probably a fail high with somewhat of a big probability so extending it makes a lot of sense passed STC https://tests.stockfishchess.org/tests/view/61ad45ea56fcf33bce7d74b7 LLR: 2.94 (-2.94,2.94) <0.00,2.50> Total: 59680 W: 15531 L: 15215 D: 28934 Ptnml(0-2): 193, 6711, 15734, 6991, 211 passed LTC https://tests.stockfishchess.org/tests/view/61ad9ff356fcf33bce7d8646 LLR: 2.95 (-2.94,2.94) <0.50,3.00> Total: 59104 W: 15321 L: 14992 D: 28791 Ptnml(0-2): 53, 6023, 17065, 6364, 47 closes https://github.com/official-stockfish/Stockfish/pull/3838 bench 4881329
This commit is contained in:
parent
4766dfc395
commit
c228f3196a
1 changed files with 4 additions and 1 deletions
|
@ -1165,6 +1165,8 @@ moves_loop: // When in check, search starts here
|
|||
// Step 15. Make the move
|
||||
pos.do_move(move, st, givesCheck);
|
||||
|
||||
bool doDeeperSearch = false;
|
||||
|
||||
// Step 16. Late moves reduction / extension (LMR, ~200 Elo)
|
||||
// We use various heuristics for the sons of a node after the first son has
|
||||
// been searched. In general we would like to reduce them, but there are many
|
||||
|
@ -1237,6 +1239,7 @@ moves_loop: // When in check, search starts here
|
|||
|
||||
// If the son is reduced and fails high it will be re-searched at full depth
|
||||
doFullDepthSearch = value > alpha && d < newDepth;
|
||||
doDeeperSearch = value > alpha + 88;
|
||||
didLMR = true;
|
||||
}
|
||||
else
|
||||
|
@ -1248,7 +1251,7 @@ moves_loop: // When in check, search starts here
|
|||
// Step 17. Full depth search when LMR is skipped or fails high
|
||||
if (doFullDepthSearch)
|
||||
{
|
||||
value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, newDepth, !cutNode);
|
||||
value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, newDepth + doDeeperSearch, !cutNode);
|
||||
|
||||
// If the move passed LMR update its stats
|
||||
if (didLMR && !captureOrPromotion)
|
||||
|
|
Loading…
Add table
Reference in a new issue