-
Notifications
You must be signed in to change notification settings - Fork 575
go perft command #2091
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
go perft command #2091
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Perft(ChessBoard(current_position_.fen), *params.perft, true); | ||
const auto time = std::chrono::duration_cast<std::chrono::milliseconds>( | ||
std::chrono::steady_clock::now() - start); | ||
CERR; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The standalone 'CERR;' statement appears redundant and may be unintentional; consider removing it or clarifying its purpose with a comment.
CERR; |
Copilot uses AI. Check for mistakes.
auto new_board = board; | ||
new_board.ApplyMove(move); | ||
|
||
new_board.Mirror(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review the call to 'new_board.Mirror()' to ensure it aligns with the intended perft calculation, as altering board orientation may affect the expected move count.
new_board.Mirror(); |
Copilot uses AI. Check for mistakes.
@@ -47,6 +47,7 @@ struct GoParams { | |||
std::optional<int> depth; | |||
std::optional<int> mate; | |||
std::optional<int> nodes; | |||
std::optional<int> perft; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make more sense to have just perft
command rather than go perft
, and then route to a separate function rather than to EngineClassic?
Especially with many search algorithms, bringing perft closer to search complicates more than help.
Even if we'd keep go perft
instead of perft
, I'd prefer Uci layer to call completely different function rather than something in the Engine class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is go perft
because it is modeled after the stockfish version. Regarding the rest, I wasn't planning on getting this merged. If you think it is worth having then I'll do my best.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it makes sense to have it, but probably not through uci but from the command line ./lc0 perft
similarly to bench
and backendbench
.
No description provided.