Skip to content

Commit

Permalink
Fix error where time can be 0
Browse files Browse the repository at this point in the history
  • Loading branch information
colin authored and colin committed May 20, 2023
1 parent 67ea725 commit f580816
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/kingfish/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ int main() {
// BBS::printBitboard(BBS::rookAttacks(SQ_D4, block));
// return 0;
uciMainLoop();
}
}
4 changes: 2 additions & 2 deletions src/kingfish/uci.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ int uciMainLoop() {
std::cout
<< "info depth " << depth << " score cp " << score
<< " nodes " << searcher.nodes_searched << " nps "
<< (searcher.nodes_searched * 1000) / time
<< (searcher.nodes_searched * 1000) / std::max(time, 1)
<< " hashfull "
<< searcher.tp_score.getPermillFull() << " time "
<< time << " pv " << move_str << std::endl;
Expand Down Expand Up @@ -210,4 +210,4 @@ int uciMainLoop() {
}

return 0;
}
}
2 changes: 1 addition & 1 deletion src/kingfish/utils/generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ struct Generator {
coro_handle coro;
};

#endif
#endif

0 comments on commit f580816

Please sign in to comment.