Skip to content

Commit 169737a

Browse files
daniel-monroevondele
authored andcommitted
Simplify dual bonuses
Merge dual capture/quiet bonuses into one Passed simplification STC LLR: 2.93 (-2.94,2.94) <-1.75,0.25> Total: 223200 W: 57868 L: 57854 D: 107478 Ptnml(0-2): 689, 26441, 57296, 26515, 659 https://tests.stockfishchess.org/tests/view/6898d28e0049e8ccef9d6384 Passed simplification LTC LLR: 2.95 (-2.94,2.94) <-1.75,0.25> Total: 147270 W: 37750 L: 37659 D: 71861 Ptnml(0-2): 84, 15869, 41633, 15970, 79 https://tests.stockfishchess.org/tests/view/68990fe30049e8ccef9d643c closes official-stockfish#6226 Bench: 2996176
1 parent c9c0024 commit 169737a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/search.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1816,14 +1816,13 @@ void update_all_stats(const Position& pos,
18161816
Piece movedPiece = pos.moved_piece(bestMove);
18171817
PieceType capturedPiece;
18181818

1819-
int quietBonus = std::min(170 * depth - 87, 1598) + 332 * (bestMove == ttMove);
1819+
int bonus = std::min(170 * depth - 87, 1598) + 332 * (bestMove == ttMove);
18201820
int quietMalus = std::min(743 * depth - 180, 2287) - 33 * quietsSearched.size();
1821-
int captureBonus = std::min(124 * depth - 62, 1245) + 336 * (bestMove == ttMove);
18221821
int captureMalus = std::min(708 * depth - 148, 2287) - 29 * capturesSearched.size();
18231822

18241823
if (!pos.capture_stage(bestMove))
18251824
{
1826-
update_quiet_histories(pos, ss, workerThread, bestMove, quietBonus * 978 / 1024);
1825+
update_quiet_histories(pos, ss, workerThread, bestMove, bonus * 978 / 1024);
18271826

18281827
// Decrease stats for all non-best quiet moves
18291828
for (Move move : quietsSearched)
@@ -1833,7 +1832,7 @@ void update_all_stats(const Position& pos,
18331832
{
18341833
// Increase stats for the best move in case it was a capture move
18351834
capturedPiece = type_of(pos.piece_on(bestMove.to_sq()));
1836-
captureHistory[movedPiece][bestMove.to_sq()][capturedPiece] << captureBonus * 1288 / 1024;
1835+
captureHistory[movedPiece][bestMove.to_sq()][capturedPiece] << bonus;
18371836
}
18381837

18391838
// Extra penalty for a quiet early move that was not a TT move in

0 commit comments

Comments
 (0)