Skip to content

Commit

Permalink
Adjust statscore for captures
Browse files Browse the repository at this point in the history
Instead of using quiet histories use capture history with a different
offset.

Passed STC:
https://tests.stockfishchess.org/tests/view/6731d5cc86d5ee47d953e719
LLR: 2.96 (-2.94,2.94) <0.00,2.00>
Total: 428896 W: 111160 L: 110269 D: 207467
Ptnml(0-2): 1220, 50296, 110534, 51169, 1229

Passed LTC:
https://tests.stockfishchess.org/tests/view/6733d9fd86d5ee47d953e962
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 105882 W: 26918 L: 26458 D: 52506
Ptnml(0-2): 66, 11430, 29482, 11904, 59

closes #5679

Bench: 840721
  • Loading branch information
Vizvezdenec authored and Disservin committed Nov 13, 2024
1 parent 49138b8 commit 82b092c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1181,9 +1181,14 @@ Value Search::Worker::search(
else if (move == ttData.move)
r -= 1879;

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

// Decrease/increase reduction for moves with a good/bad history (~8 Elo)
r -= ss->statScore * 1287 / 16384;
Expand Down

0 comments on commit 82b092c

Please sign in to comment.