Revert malus and associated coefficient parameters resulting from using only quiet moves

Following #6226 and #6256, this patch ultimately corresponds to the revert of #6200.
Parameters were tuned on 60k LTC games.

STC (10+0.1 th1) was accepted:
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 167488 W: 43573 L: 43063 D: 80852
Ptnml(0-2): 506, 19644, 43004, 20014, 576
https://tests.stockfishchess.org/tests/view/68f526a4637acd2a11e721c2

LTC (60+0.6 th1) was accepted:
LLR: 2.99 (-2.94,2.94) <0.50,2.50>
Total: 61068 W: 15882 L: 15510 D: 29676
Ptnml(0-2): 31, 6578, 16949, 6940, 36
https://tests.stockfishchess.org/tests/view/68fa1968637acd2a11e72a0a

Non-regression VLTC (180+1.8 th1) was accepted:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 50380 W: 13087 L: 12905 D: 24388
Ptnml(0-2): 5, 5018, 14962, 5200, 5
https://tests.stockfishchess.org/tests/view/68fdc6e5637acd2a11e72f33

closes https://github.com/official-stockfish/Stockfish/pull/6378

Bench: 2530552
This commit is contained in:
shaowyx
2025-11-01 10:48:40 +01:00
committed by Joost VandeVondele
parent 6764561916
commit a49b52cf69
+12 -10
View File
@@ -137,7 +137,8 @@ void update_all_stats(const Position& pos,
SearchedList& quietsSearched,
SearchedList& capturesSearched,
Depth depth,
Move TTMove);
Move TTMove,
int moveCount);
} // namespace
@@ -1391,7 +1392,7 @@ moves_loop: // When in check, search starts here
else if (bestMove)
{
update_all_stats(pos, ss, *this, bestMove, prevSq, quietsSearched, capturesSearched, depth,
ttData.move);
ttData.move, moveCount);
if (!PvNode)
ttMoveHistory << (bestMove == ttData.move ? 809 : -865);
}
@@ -1801,41 +1802,42 @@ void update_all_stats(const Position& pos,
SearchedList& quietsSearched,
SearchedList& capturesSearched,
Depth depth,
Move ttMove) {
Move ttMove,
int moveCount) {
CapturePieceToHistory& captureHistory = workerThread.captureHistory;
Piece movedPiece = pos.moved_piece(bestMove);
PieceType capturedPiece;
int bonus = std::min(151 * depth - 91, 1730) + 302 * (bestMove == ttMove);
int malus = std::min(951 * depth - 156, 2468) - 30 * quietsSearched.size();
int bonus = std::min(121 * depth - 77, 1633) + 375 * (bestMove == ttMove);
int malus = std::min(825 * depth - 196, 2159) - 16 * moveCount;
if (!pos.capture_stage(bestMove))
{
update_quiet_histories(pos, ss, workerThread, bestMove, bonus * 957 / 1024);
update_quiet_histories(pos, ss, workerThread, bestMove, bonus * 881 / 1024);
// Decrease stats for all non-best quiet moves
for (Move move : quietsSearched)
update_quiet_histories(pos, ss, workerThread, move, -malus);
update_quiet_histories(pos, ss, workerThread, move, -malus * 1083 / 1024);
}
else
{
// Increase stats for the best move in case it was a capture move
capturedPiece = type_of(pos.piece_on(bestMove.to_sq()));
captureHistory[movedPiece][bestMove.to_sq()][capturedPiece] << bonus;
captureHistory[movedPiece][bestMove.to_sq()][capturedPiece] << bonus * 1482 / 1024;
}
// Extra penalty for a quiet early move that was not a TT move in
// previous ply when it gets refuted.
if (prevSq != SQ_NONE && ((ss - 1)->moveCount == 1 + (ss - 1)->ttHit) && !pos.captured_piece())
update_continuation_histories(ss - 1, pos.piece_on(prevSq), prevSq, -malus * 503 / 1024);
update_continuation_histories(ss - 1, pos.piece_on(prevSq), prevSq, -malus * 614 / 1024);
// Decrease stats for all non-best capture moves
for (Move move : capturesSearched)
{
movedPiece = pos.moved_piece(move);
capturedPiece = type_of(pos.piece_on(move.to_sq()));
captureHistory[movedPiece][move.to_sq()][capturedPiece] << -malus * 1157 / 1024;
captureHistory[movedPiece][move.to_sq()][capturedPiece] << -malus * 1397 / 1024;
}
}