fixed bug in main.cpp where UCILoop didnt work + rounding nps on print
This commit is contained in:
1 parent
c1e048c0c6
commit
40bf1753f0
3 files changed
+6
-4
No files matched your search
@@ -71,7 +71,7 @@ void RunBenchmark() {
|
||||
double elapsed_seconds = std::chrono::duration_cast<
|
||||
std::chrono::duration<double>>(finish - start).count();
|
||||
|
||||
std::cout << nodes << " nodes " << nodes/elapsed_seconds << " nps\n";
|
||||
std::cout << nodes << " nodes " << int(nodes/elapsed_seconds) << " nps\n";
|
||||
nodes = 0;
|
||||
benchStarted = false;
|
||||
}
|
||||
+4
-2
@@ -11,8 +11,10 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
Board board;
|
||||
|
||||
if (std::string(argv[1]) == "bench") {
|
||||
RunBenchmark();
|
||||
if (argc > 1) {
|
||||
if (std::string(argv[1]) == "bench") {
|
||||
RunBenchmark();
|
||||
}
|
||||
} else {
|
||||
UCILoop(board);
|
||||
}
|
||||
|
||||
+1
-1
@@ -218,7 +218,7 @@ void SearchPosition(Board &board, SearchParams ¶ms) {
|
||||
double elapsed = std::chrono::duration_cast<
|
||||
std::chrono::duration<double>>(currTime - timeStart).count();
|
||||
|
||||
std::cout << "info " << nodes << " nodes " << nodes/elapsed << " nps\n";
|
||||
std::cout << "info " << nodes << " nodes " << int(nodes/elapsed) << " nps\n";
|
||||
std::cout << "bestmove " << squareCoords[results.bestMove.MoveFrom()]
|
||||
<< squareCoords[results.bestMove.MoveTo()] << '\n';
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user