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.

Passed STC (against a slightly older version of Viz's patch)
https://tests.stockfishchess.org/tests/view/673ac6e286d5ee47d953f0ec
LR: 2.96 (-2.94,2.94) <-1.75,0.25>
Total: 57312 W: 14872 L: 14672 D: 27768
Ptnml(0-2): 152, 6761, 14649, 6923, 171

Passed LTC (against Viz's newest patch)
https://tests.stockfishchess.org/tests/view/673cd00686d5ee47d953f2db
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 88236 W: 22510 L: 22358 D: 43368
Ptnml(0-2): 70, 9530, 24745, 9724, 49

closes #5691

Bench: 959947
  • Loading branch information
Ergodice authored and Disservin committed Nov 22, 2024
1 parent 4fcd78c commit fb6be17
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 @@ -538,7 +538,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 @@ -1181,9 +1181,7 @@ Value Search::Worker::search(
r -= 1879;

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 fb6be17

Please sign in to comment.