Skip to content
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

Add searchmoves functionality #677

Open
wants to merge 6 commits into
base: next
Choose a base branch
from
Open

Conversation

SashaMN
Copy link

@SashaMN SashaMN commented May 27, 2018

Example: go infinite searchmoves a2a3 b2b3

@@ -133,11 +133,12 @@ bool UciLoop::DispatchCommand(
} else if (command == "go") {
GoParams go_params;
if (ContainsKey(params, "infinite")) {
if (!GetOrEmpty(params, "infinite").empty()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove that?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, will return back.

if (!limits_.searchmoves.empty() &&
std::find(limits_.searchmoves.begin(),
limits_.searchmoves.end(),
iter->GetMove(root_color).as_string()) ==
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to do vice versa, convert searchmoves from string to Move (somewhere before getting into Search class) and then compare.
For example, promotions can be encoded both as "e7e8q" and "e7e8Q", and I'm not sure how knight promotion works too.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

@SashaMN
Copy link
Author

SashaMN commented May 27, 2018

Oh, I noticed another problem. Probably need to filter moves when output best move also.

@SashaMN
Copy link
Author

SashaMN commented May 28, 2018

Implementation through strings works fine.
But with move comparison directly it sometimes produces incorrect uci info. It happens probably only after castling moves, and I think it's somehow related to #658. Need more time to investigate this more in detail.

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