Merge pull request #112 from rektdie/qs-fp

added qs fp | bench 6299890
This commit was merged in pull request #112.
This commit is contained in:
rektdie authored and GitHub committed 2025-09-21 01:23:34 +02:00
commit 4a050aeddb
1 file changed
+10
+10
View File
@@ -312,6 +312,8 @@ static SearchResults Quiescence(Board& board, int alpha, int beta, int ply, Sear
alpha = bestScore;
}
const int fpScore = bestScore + 100;
MOVEGEN::GenerateMoves<Noisy>(board);
SortMoves(board, ply, ctx);
@@ -319,6 +321,14 @@ static SearchResults Quiescence(Board& board, int alpha, int beta, int ply, Sear
SearchResults results;
for (int i = 0; i < board.currentMoveIndex; i++) {
// QS FP
if (!board.InCheck() && board.moveList[i].IsCapture() &&
fpScore <= alpha && !SEE(board, board.moveList[i], 1)) {
bestScore = std::max(bestScore, fpScore);
continue;
}
Board copy = board;
int isLegal = copy.MakeMove(board.moveList[i]);
if (!isLegal) continue;