Fail soft #13
+2
-5
@@ -95,15 +95,12 @@ static SearchResults Quiescence(Board board, int alpha, int beta) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int staticScore = Evaluate(board);
|
int staticScore = Evaluate(board);
|
||||||
int bestScore = alpha;
|
|
||||||
|
|
||||||
if (staticScore >= beta) {
|
if (staticScore >= beta) {
|
||||||
return staticScore;
|
return staticScore;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (staticScore > bestScore) {
|
int bestScore = staticScore;
|
||||||
bestScore = staticScore;
|
|
||||||
}
|
|
||||||
|
|
||||||
GenerateMoves(board, board.sideToMove);
|
GenerateMoves(board, board.sideToMove);
|
||||||
|
|
||||||
@@ -115,7 +112,7 @@ static SearchResults Quiescence(Board board, int alpha, int beta) {
|
|||||||
if (board.moveList[i].IsCapture()) {
|
if (board.moveList[i].IsCapture()) {
|
||||||
Board copy = board;
|
Board copy = board;
|
||||||
copy.MakeMove(board.moveList[i]);
|
copy.MakeMove(board.moveList[i]);
|
||||||
int score = -Quiescence(copy, -beta, -bestScore).score;
|
int score = -Quiescence(copy, -beta, -alpha).score;
|
||||||
|
|
||||||
if (score >= beta) {
|
if (score >= beta) {
|
||||||
return score;
|
return score;
|
||||||
|
|||||||
Reference in new issue
Block a user