resetting pvLine at new search | bench 4118297

This commit is contained in:
rektdie committed 2025-03-10 14:03:29 +01:00
1 parent 6d6fababdb
commit 30aaea5e03
2 files changed
+6

No files matched your search

+1
View File
@@ -318,6 +318,7 @@ static SearchResults ID(Board &board, SearchParams params) {
void SearchPosition(Board &board, SearchParams params) { void SearchPosition(Board &board, SearchParams params) {
searchStopped = false; searchStopped = false;
nodes = 0; nodes = 0;
pvLine.Clear();
auto currTime = std::chrono::high_resolution_clock::now(); auto currTime = std::chrono::high_resolution_clock::now();
SearchResults results = ID(board, params); SearchResults results = ID(board, params);
+5
View File
@@ -54,6 +54,11 @@ public:
std::cout << ' '; std::cout << ' ';
} }
} }
void Clear() {
length[maxDepth] = {};
table[maxDepth][maxDepth] = {};
}
}; };
SearchResults PVS(Board board, int depth, int alpha, int beta); SearchResults PVS(Board board, int depth, int alpha, int beta);