final touches | bench 684523

This commit is contained in:
rektdie committed 2025-03-27 00:12:08 +01:00
1 parent 249806f51c
commit 0181e53e74
2 files changed
+12 -9

No files matched your search

+3
View File
@@ -4,3 +4,6 @@ obj/
# Ignore executable files # Ignore executable files
*.exe *.exe
Eleanor Eleanor
# Other
.vscode
+9 -9
View File
@@ -274,15 +274,15 @@ SearchResults PVS(Board board, int depth, int alpha, int beta, int ply) {
// Fail high (beta cutoff) // Fail high (beta cutoff)
if (score >= beta) { if (score >= beta) {
if (searchStopped) return 0;
if (!currMove.IsCapture()) { if (!currMove.IsCapture()) {
killerMoves[1][ply] = killerMoves[0][ply]; killerMoves[1][ply] = killerMoves[0][ply];
killerMoves[0][ply] = currMove; killerMoves[0][ply] = currMove;
if (searchStopped) return 0;
history.Update(board.sideToMove, currMove, depth * depth); history.Update(board.sideToMove, currMove, depth * depth);
} }
if (searchStopped) return 0;
TT.WriteEntry(board.hashKey, depth, score, CutNode, Move()); TT.WriteEntry(board.hashKey, depth, score, CutNode, Move());
return score; return score;
} }
@@ -351,6 +351,13 @@ static SearchResults ID(Board &board, SearchParams params) {
beta = currentResults.score + delta; beta = currentResults.score + delta;
delta = 50; delta = 50;
if (searchStopped) {
break;
} else {
if (currentResults.bestMove) {
safeResults = currentResults;
}
std::cout << "info "; std::cout << "info ";
std::cout << "depth " << depth; std::cout << "depth " << depth;
std::cout << " score cp " << safeResults.score; std::cout << " score cp " << safeResults.score;
@@ -360,13 +367,6 @@ static SearchResults ID(Board &board, SearchParams params) {
pvLine.Print(0); pvLine.Print(0);
std::cout << std::endl; std::cout << std::endl;
if (searchStopped) {
break;
} else {
if (currentResults.bestMove) {
safeResults = currentResults;
}
if (sw.GetElapsedMS() >= softTime) { if (sw.GetElapsedMS() >= softTime) {
StopSearch(); StopSearch();
break; break;