-
Notifications
You must be signed in to change notification settings - Fork 298
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
base: next
Are you sure you want to change the base?
Conversation
lc0/src/chess/uciloop.cc
Outdated
@@ -133,11 +133,12 @@ bool UciLoop::DispatchCommand( | |||
} else if (command == "go") { | |||
GoParams go_params; | |||
if (ContainsKey(params, "infinite")) { | |||
if (!GetOrEmpty(params, "infinite").empty()) { |
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.
Why remove that?
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.
Yeah, will return back.
lc0/src/mcts/search.cc
Outdated
if (!limits_.searchmoves.empty() && | ||
std::find(limits_.searchmoves.begin(), | ||
limits_.searchmoves.end(), | ||
iter->GetMove(root_color).as_string()) == |
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'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.
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.
Ok.
Oh, I noticed another problem. Probably need to filter moves when output best move also. |
Implementation through strings works fine. |
Example:
go infinite searchmoves a2a3 b2b3