Skip to content

Commit

Permalink
Simplify statscore at captures
Browse files Browse the repository at this point in the history
Simplify statscores for captures, setting them to 0

A recent tweak of Vizvezdenec finds substantial elo gain from giving
captures a separate statscore, which is used mainly for reductions. The
idea is that the old combination of quiet histories was inappropriate
and that a value based on the capture history is more suitable. This
simplification sets the statscore for captures to 0, suggesting that the
elo gain came from rectifying the quiet history/capture mismatch.
  • Loading branch information
Ergodice authored and PikaCat-OuO committed Nov 23, 2024
1 parent f2434f6 commit b92b749
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ Value Search::Worker::search(

// Dive into quiescence search when the depth reaches zero
if (depth <= 0)
return qsearch < PvNode ? PV : NonPV > (pos, ss, alpha, beta);
return qsearch<PvNode ? PV : NonPV>(pos, ss, alpha, beta);

// Limit the depth if extensions made it too large
depth = std::min(depth, MAX_PLY - 1);
Expand Down Expand Up @@ -1089,9 +1089,7 @@ Value Search::Worker::search(
r -= 2775;

if (capture)
ss->statScore =
thisThread->captureHistory[movedPiece][move.to_sq()][type_of(pos.captured_piece())]
- 5454;
ss->statScore = 0;
else
ss->statScore = 2 * thisThread->mainHistory[us][move.from_to()]
+ (*contHist[0])[movedPiece][move.to_sq()]
Expand Down

0 comments on commit b92b749

Please sign in to comment.