mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Add extra bonus to pawn history for a move that caused a fail low
Basically the same idea as it is for continuation/main history, but it has some tweaks. 1) it has * 2 multiplier for bonus instead of full/half bonus - for whatever reason this seems to work better; 2) attempts with this type of big bonuses scaled somewhat poorly (or were unlucky at longer time controls), but after measuring the fact that average value of pawn history in LMR after adding this bonuses increased by substantial number (for multiplier 1,5 it increased by smth like 400~ from 8192 cap) attempts were made to make default pawn history negative to compensate it - and version with multiplier 2 and initial fill value -900 passed. Passed STC: https://tests.stockfishchess.org/tests/view/66424815f9f4e8fc783cba59 LLR: 2.93 (-2.94,2.94) <0.00,2.00> Total: 115008 W: 30001 L: 29564 D: 55443 Ptnml(0-2): 432, 13629, 28903, 14150, 390 Passed LTC: https://tests.stockfishchess.org/tests/view/6642f5437134c82f3f7a3ffa LLR: 2.94 (-2.94,2.94) <0.50,2.50> Total: 56448 W: 14432 L: 14067 D: 27949 Ptnml(0-2): 36, 6268, 15254, 6627, 39 Bench: 1857237
This commit is contained in:
parent
fa114266fa
commit
9e45644c50
1 changed files with 6 additions and 1 deletions
|
@ -496,7 +496,7 @@ void Search::Worker::clear() {
|
|||
counterMoves.fill(Move::none());
|
||||
mainHistory.fill(0);
|
||||
captureHistory.fill(0);
|
||||
pawnHistory.fill(0);
|
||||
pawnHistory.fill(-900);
|
||||
correctionHistory.fill(0);
|
||||
|
||||
for (bool inCheck : {false, true})
|
||||
|
@ -1335,6 +1335,11 @@ moves_loop: // When in check, search starts here
|
|||
stat_bonus(depth) * bonus);
|
||||
thisThread->mainHistory[~us][((ss - 1)->currentMove).from_to()]
|
||||
<< stat_bonus(depth) * bonus / 2;
|
||||
|
||||
|
||||
if (type_of(pos.piece_on(prevSq)) != PAWN && ((ss - 1)->currentMove).type_of() != PROMOTION)
|
||||
thisThread->pawnHistory[pawn_structure_index(pos)][pos.piece_on(prevSq)][prevSq]
|
||||
<< stat_bonus(depth) * bonus * 2;
|
||||
}
|
||||
|
||||
if (PvNode)
|
||||
|
|
Loading…
Add table
Reference in a new issue