-
Notifications
You must be signed in to change notification settings - Fork 556
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
Engine doesn't search past drawn position with tree reuse #188
Comments
Does it need to search past 3-fold repetition? |
As an analysis tool it should be able to. I recall working on the Search code that implements this ability, but it bases its check on the identity of |
Here's the relevant check: https://github.com/LeelaChessZero/lc0/blob/master/src/mcts/search.cc#L666 |
It makes sense if the root node is a draw that it keeps searching, but it shouldn't normally search past a terminal draw that's a leaf on the search tree, should it? Seems like that would mess up training and match play. Or are you suggesting a flag or input that tells search to ignore draws? |
If the But now that I say that, I'm actually not sure now how this bug exists, it should already cover the case crem posted. Plenty of time later though. |
Somewhat of a long shot, but might have something to do with this: Line 104 in 2321011
The parentheses after the word last, ie last.GetBoard() vs history_.Last().GetBoard or Last().GetBoard() |
This issue is only reproducible when tree is reused. The fix would be to reset terminal flag for root node in the beginning of the search, and reset |
I did this a long time ago for the two-folds in my fork - i just uncertain root before search (if it became certain) . I do not set N to zero, but i recalc N for root (as in my world a node can become certain after it already accumulated a number of visits). In your case resetting Q and N is probably enough. |
It seems that it's a duplicate of #237 |
Example:
(this game: https://lichess.org/V4XJWHhj)
The text was updated successfully, but these errors were encountered: