mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 01:03:09 +00:00
Simplify stats assignment for Pv nodes
This patch is a simplification of my recent elo gainer. Logically the Elo gainer didn't make much sense and this patch simplifies it into smth more logical. Instead of assigning negative bonuses to all non-first moves that enter PV nodes we assign positive bonuses in full depth search after LMR only for moves that will result in a fail high - thus not assigning positive bonuses for moves that will go to pv search - so doing "almost" the same as we do in master now for them. Logic differs for some other moves, though, but this removes some lines of code. Passed STC: https://tests.stockfishchess.org/tests/view/642cf5cf77ff3301150dc5ec LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 409320 W: 109124 L: 109308 D: 190888 Ptnml(0-2): 1149, 45385, 111751, 45251, 1124 Passed LTC: https://tests.stockfishchess.org/tests/view/642fe75d20eb941419bde200 LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 260336 W: 70280 L: 70303 D: 119753 Ptnml(0-2): 99, 25236, 79528, 25199, 106 closes https://github.com/official-stockfish/Stockfish/pull/4522 Bench: 4286815
This commit is contained in:
parent
9829bceda9
commit
acb0d204d5
1 changed files with 3 additions and 5 deletions
|
@ -1229,8 +1229,9 @@ moves_loop: // When in check, search starts here
|
||||||
if (newDepth > d)
|
if (newDepth > d)
|
||||||
value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, newDepth, !cutNode);
|
value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, newDepth, !cutNode);
|
||||||
|
|
||||||
int bonus = value > alpha ? stat_bonus(newDepth)
|
int bonus = value <= alpha ? -stat_bonus(newDepth)
|
||||||
: -stat_bonus(newDepth);
|
: value >= beta ? stat_bonus(newDepth)
|
||||||
|
: 0;
|
||||||
|
|
||||||
update_continuation_histories(ss, movedPiece, to_sq(move), bonus);
|
update_continuation_histories(ss, movedPiece, to_sq(move), bonus);
|
||||||
}
|
}
|
||||||
|
@ -1255,9 +1256,6 @@ moves_loop: // When in check, search starts here
|
||||||
(ss+1)->pv[0] = MOVE_NONE;
|
(ss+1)->pv[0] = MOVE_NONE;
|
||||||
|
|
||||||
value = -search<PV>(pos, ss+1, -beta, -alpha, newDepth, false);
|
value = -search<PV>(pos, ss+1, -beta, -alpha, newDepth, false);
|
||||||
|
|
||||||
if (moveCount > 1 && newDepth >= depth && !capture)
|
|
||||||
update_continuation_histories(ss, movedPiece, to_sq(move), -stat_bonus(newDepth));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 19. Undo move
|
// Step 19. Undo move
|
||||||
|
|
Loading…
Add table
Reference in a new issue