Fail soft #13

Merged
rektdie merged 7 commits from fail_soft into legalMovegen 2025-03-09 09:35:27 +01:00
Showing only changes of commit f29a0761a9 - Show all commits
+9 -3
View File
@@ -96,11 +96,15 @@ static SearchResults Quiescence(Board board, int alpha, int beta) {
int staticScore = Evaluate(board); int staticScore = Evaluate(board);
if (staticScore >= beta) { int bestScore = staticScore;
return staticScore;
if (bestScore>= beta) {
return bestScore;
} }
int bestScore = staticScore; if (alpha < bestScore) {
alpha = bestScore;
}
GenerateMoves(board, board.sideToMove); GenerateMoves(board, board.sideToMove);
@@ -118,6 +122,8 @@ static SearchResults Quiescence(Board board, int alpha, int beta) {
return score; return score;
} }
bestScore = std::max(score, bestScore);
if (score > alpha) { if (score > alpha) {
alpha = score; alpha = score;
results.bestMove = board.moveList[i]; results.bestMove = board.moveList[i];