Skip to content

Commit 82b092c

Browse files
VizvezdenecDisservin
authored andcommitted
Adjust statscore for captures
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
1 parent 49138b8 commit 82b092c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/search.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,9 +1181,14 @@ Value Search::Worker::search(
11811181
else if (move == ttData.move)
11821182
r -= 1879;
11831183

1184-
ss->statScore = 2 * thisThread->mainHistory[us][move.from_to()]
1185-
+ (*contHist[0])[movedPiece][move.to_sq()]
1186-
+ (*contHist[1])[movedPiece][move.to_sq()] - 3996;
1184+
if (capture)
1185+
ss->statScore =
1186+
thisThread->captureHistory[movedPiece][move.to_sq()][type_of(pos.captured_piece())]
1187+
- 13000;
1188+
else
1189+
ss->statScore = 2 * thisThread->mainHistory[us][move.from_to()]
1190+
+ (*contHist[0])[movedPiece][move.to_sq()]
1191+
+ (*contHist[1])[movedPiece][move.to_sq()] - 3996;
11871192

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

0 commit comments

Comments
 (0)