Skip to content

Commit afaf3a0

Browse files
VizvezdenecDisservin
authored andcommitted
Refine statscore for captures
Continuation of previous attempts there. Now instead of using capture history with a static offset also add the value of the captured piece in the same way at it is used in movepicker. Passed STC: https://tests.stockfishchess.org/tests/view/674aa3d386d5ee47d95404aa LLR: 2.93 (-2.94,2.94) <0.00,2.00> Total: 116480 W: 30433 L: 29999 D: 56048 Ptnml(0-2): 361, 13720, 29662, 14118, 379 Passed LTC: https://tests.stockfishchess.org/tests/view/674c4b2d86d5ee47d954073f LLR: 2.94 (-2.94,2.94) <0.50,2.50> Total: 133542 W: 34365 L: 33847 D: 65330 Ptnml(0-2): 78, 14585, 36934, 15089, 85 closes #5706 Bench: 934447
1 parent e8d2ba1 commit afaf3a0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/search.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,10 @@ Value Search::Worker::search(
11801180
r -= 1879;
11811181

11821182
if (capture)
1183-
ss->statScore = 0;
1183+
ss->statScore =
1184+
7 * int(PieceValue[pos.captured_piece()])
1185+
+ thisThread->captureHistory[movedPiece][move.to_sq()][type_of(pos.captured_piece())]
1186+
- 5000;
11841187
else
11851188
ss->statScore = 2 * thisThread->mainHistory[us][move.from_to()]
11861189
+ (*contHist[0])[movedPiece][move.to_sq()]

0 commit comments

Comments
 (0)