bugfix: used wrong index in malus | bench 3395979

This commit is contained in:
rektdie committed 2025-12-13 22:51:56 +01:00
1 parent 65f7b3f38a
commit 5bc4459111
1 file changed
+6 -2
+6 -2
View File
@@ -768,12 +768,16 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC
int movingPiece = board.GetPieceType(seenCaptures[moveIndex].MoveFrom());
int capturedPiece = board.GetPieceType(seenCaptures[moveIndex].MoveTo());
if (seenCaptures[seenCapturesCount].GetFlags() == epCapture) {
if (seenCaptures[moveIndex].GetFlags() == epCapture) {
capturedPiece = Pawn;
}
if (movingPiece == nullPieceType || capturedPiece == nullPieceType) {
std::cout << "asd\n";
}
ctx->capthist.Update(board.sideToMove, movingPiece, capturedPiece,
seenCaptures[seenCapturesCount].MoveTo(), -bonus);
seenCaptures[moveIndex].MoveTo(), -bonus);
}
if (!ctx->excluded)