mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Retire Rml full PV search at depth == 1
Now that Rml ordering is based on normal MovePicker logic, apart for the ttMove that is given, we can avoid to score all the root moves at depth 1. We only need it for easy move detection logic, but in this case we just need to score the first two best moves and not all the Rml set. No regression after 6400 games Mod vs Orig 1052 1012 4336 ELO +2 (+- 4.9) Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
e5ffe9959c
commit
bc6a6e04a0
1 changed files with 5 additions and 4 deletions
|
@ -534,8 +534,10 @@ namespace {
|
|||
|
||||
Rml.bestMoveChanges = 0;
|
||||
|
||||
// MultiPV iteration loop
|
||||
for (MultiPVIteration = 0; MultiPVIteration < Min(MultiPV, (int)Rml.size()); MultiPVIteration++)
|
||||
// MultiPV iteration loop. At depth 1 perform at least 2 iterations to
|
||||
// get a score of the second best move for easy move detection.
|
||||
int e = Min(Max(MultiPV, 2 * int(depth == 1)), (int)Rml.size());
|
||||
for (MultiPVIteration = 0; MultiPVIteration < e; MultiPVIteration++)
|
||||
{
|
||||
// Calculate dynamic aspiration window based on previous iterations
|
||||
if (depth >= 5 && abs(Rml[MultiPVIteration].prevScore) < VALUE_KNOWN_WIN)
|
||||
|
@ -1000,8 +1002,7 @@ split_point_start: // At split points actual search starts from here
|
|||
<< " currmovenumber " << moveCount + MultiPVIteration << endl;
|
||||
}
|
||||
|
||||
// At Root and at first iteration do a PV search on all the moves to score root moves
|
||||
isPvMove = (PvNode && moveCount <= (RootNode && depth <= ONE_PLY ? MAX_MOVES : 1));
|
||||
isPvMove = (PvNode && moveCount == 1);
|
||||
givesCheck = pos.move_gives_check(move, ci);
|
||||
captureOrPromotion = pos.move_is_capture_or_promotion(move);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue