Skip to content

Commit 3cfaef7

Browse files
locutus2Disservin
authored andcommitted
Tweak static eval history update
Modify the applied static eval bonus for main and pawn history with different factors for positive and negative values. Passed STC: https://tests.stockfishchess.org/tests/view/659132e179aa8af82b957bb0 LLR: 2.93 (-2.94,2.94) <0.00,2.00> Total: 12512 W: 3308 L: 3027 D: 6177 Ptnml(0-2): 32, 1372, 3189, 1609, 54 Passed LTC: https://tests.stockfishchess.org/tests/view/65913e3d79aa8af82b957cd2 LLR: 2.94 (-2.94,2.94) <0.50,2.50> Total: 35946 W: 9128 L: 8809 D: 18009 Ptnml(0-2): 19, 3879, 9862, 4190, 23 closes #4952 Bench: 1392883
1 parent b4d995d commit 3cfaef7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/search.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,7 @@ Value search(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth, boo
772772
if (is_ok((ss - 1)->currentMove) && !(ss - 1)->inCheck && !priorCapture)
773773
{
774774
int bonus = std::clamp(-13 * int((ss - 1)->staticEval + ss->staticEval), -1652, 1546);
775+
bonus = bonus > 0 ? 2 * bonus : bonus / 2;
775776
thisThread->mainHistory[~us][from_to((ss - 1)->currentMove)] << bonus;
776777
if (type_of(pos.piece_on(prevSq)) != PAWN && type_of((ss - 1)->currentMove) != PROMOTION)
777778
thisThread->pawnHistory[pawn_structure_index(pos)][pos.piece_on(prevSq)][prevSq]

0 commit comments

Comments
 (0)