-
Notifications
You must be signed in to change notification settings - Fork 20
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
Segmentation fault instead of playing blocking move #10
Comments
Are you able to reproduce this issue? Am I using your software correctly? Do you know of any workarounds? |
I ran it with
|
I think you might get rid of these if you use "wolve" instead of "MoHex". When board size is very small, only ICE is of interest. In these cases, wolve might be better as an entrance for calling ICEs. The "player" part of MoHex might not work well on small board sizes. |
I just did the same thing as before, replacing stdout:
default.log:
|
I just tried on my machine, worked fine for me..
|
I now suspect last commit from Nicolas introduced a bug (guess he should have been pushing to his nf branch)... |
Confirmed. It seems the issue is several commits back. The segfault occurs when I do |
Yes, I'm sorry, I was new to git at this time and when time came to push I realized I did it totally wrong... |
I found where the bug comes from. The problem is that, when fillin causes the game to be won without a virtual connection, we take no intersection in the first step, so that in the second step all the gardage moves (like "resign" or the moves outside of the actual board) remain. Then, if all the moves inside the board are inferior, they are all removed (it thinks that it is ok because the rest is not empty). But you end up with only garbage moves and it fails. I'm not sure how the bug has been caused by my changes. Maybe the fillins were considered to have a carrier in the previous version. Or maybe improving the pruning now lets me detect the whole board as inferior while it was not before. But anyway I guess that some edge cases could make the same problem occur for some well-chosen boards in the previous version. @cgao3 The problematic function is MostOverlappingMove, in EndgameUtil.cpp . There are several possible straightforward fixes, can I let you choose your favorite? |
@NicolasFabiano Sure, feel free to do so.. |
@cgao3 I can't contribute anymore to the git. Could you give me your new adress so I can send you the file? (the adress I have seems not to be up to date) |
Do want me to put it to Master branch or your |
The fix is for the master branch, given the bug occurs in it.
Actually, the nf branch does not really have any reason to exist any
more.
I apparently have not applied all to master, this should be done too.
The commits "tabs to space" and "Bug fix in precomputation" should be
merged.
I am a bit surprised by "Fix in misc-patterns.txt" : I remember doing it
later than other commits, but is way clearly way before Feb 3, 2022. But
I have had a look at it and this is indeed what I remember doing, it
should be merged too.
And there is a fourth commit, "standalone decomposition player, refined
by David Pankratz", which I have no idea what it is.
|
@NicolasFabiano maybe you should fork this repo and create a pull request with all of the commits needed to fix the main branch, so it’s easier for @cgao3 to review and merge the fixes |
I've pushed the fixed version of "EndgameUtil.cpp" to the |
Face the same problem. This one works for me. |
When there is no good move, it seems like MoHex should play the "least bad" or "most blocking" move. I've been getting an issue where it segfaults instead, which I expect is not the intended behavior.
Steps to reproduce:
shell.nix
file:The interactive Nix shell is then started with the
nix-shell
command.Expected behavior: generates and returns the "most blocking" move for white, most likely a3, b1, b3, or c1. Or, resigns.
Actual behavior: segmentation fault.
stdout:
stderr:
Exit status:
139
The text was updated successfully, but these errors were encountered: