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.
  • Loading branch information
Vizvezdenec authored and PikaCat-OuO committed Nov 14, 2024
1 parent 936df37 commit 2cdfdcf
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 @@ -1089,9 +1089,14 @@ Value Search::Worker::search(
else if (move == ttData.move)
r -= 2;

ss->statScore = 2 * thisThread->mainHistory[us][move.from_to()]
+ (*contHist[0])[movedPiece][move.to_sq()]
+ (*contHist[1])[movedPiece][move.to_sq()] - 4241;
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()] - 4241;

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

0 comments on commit 2cdfdcf

Please sign in to comment.