Tt storing fix #34
No files matched your search
@@ -4,3 +4,6 @@ obj/
|
|||||||
# Ignore executable files
|
# Ignore executable files
|
||||||
*.exe
|
*.exe
|
||||||
Eleanor
|
Eleanor
|
||||||
|
|
||||||
|
# Other
|
||||||
|
.vscode
|
||||||
+11
-9
@@ -274,10 +274,12 @@ 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;
|
||||||
|
|
||||||
|
|
||||||
history.Update(board.sideToMove, currMove, depth * depth);
|
history.Update(board.sideToMove, currMove, depth * depth);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -303,8 +305,8 @@ SearchResults PVS(Board board, int depth, int alpha, int beta, int ply) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TT.WriteEntry(board.hashKey, depth, results.score, nodeType, results.bestMove);
|
|
||||||
if (searchStopped) return 0;
|
if (searchStopped) return 0;
|
||||||
|
TT.WriteEntry(board.hashKey, depth, results.score, nodeType, results.bestMove);
|
||||||
return results;
|
return results;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,17 +351,11 @@ static SearchResults ID(Board &board, SearchParams params) {
|
|||||||
beta = currentResults.score + delta;
|
beta = currentResults.score + delta;
|
||||||
delta = 50;
|
delta = 50;
|
||||||
|
|
||||||
if (currentResults.bestMove) {
|
|
||||||
safeResults = currentResults;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (searchStopped) {
|
if (searchStopped) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
if (sw.GetElapsedMS() >= softTime) {
|
if (currentResults.bestMove) {
|
||||||
StopSearch();
|
safeResults = currentResults;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "info ";
|
std::cout << "info ";
|
||||||
@@ -370,6 +366,12 @@ static SearchResults ID(Board &board, SearchParams params) {
|
|||||||
std::cout << " pv ";
|
std::cout << " pv ";
|
||||||
pvLine.Print(0);
|
pvLine.Print(0);
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
|
|
||||||
|
if (sw.GetElapsedMS() >= softTime) {
|
||||||
|
StopSearch();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return safeResults;
|
return safeResults;
|
||||||
|
|||||||
Reference in new issue
Block a user