Skip to content

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

go perft command #2091

wants to merge 4 commits into from

Conversation

borg323
Copy link
Member

@borg323 borg323 commented Dec 16, 2024

No description provided.

@borg323 borg323 added the not for merge Experimental code which is not intended to be merged into the master label Dec 16, 2024
@mooskagh mooskagh requested a review from Copilot April 4, 2025 08:29
Copy link

@Copilot Copilot AI left a 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;
Copy link
Preview

Copilot AI Apr 4, 2025

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.

Suggested change
CERR;

Copilot uses AI. Check for mistakes.

auto new_board = board;
new_board.ApplyMove(move);

new_board.Mirror();
Copy link
Preview

Copilot AI Apr 4, 2025

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.

Suggested change
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;
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member

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.

@borg323 borg323 marked this pull request as draft April 4, 2025 19:38
@borg323 borg323 removed the not for merge Experimental code which is not intended to be merged into the master label Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants