-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
ac3 in csp.py #256
Comments
You appear to be right -- thank you! We're also missing a test that would provoke this bug. Would you like to make a pull request with a new test case, or should I? |
I'll try to create a test. I'll inform you about the result. Sent from Yahoo Mail on Android On Fri, 2 Sep, 2016 at 6:14, Darius Baconnotifications@github.com wrote: We're also missing a test that would provoke this bug. Would you like to make a pull request with a new test case, or should I? — |
Here is a test case which I think reveals the bug :
a must be bigger than b, so b can't be 5, and a must be 4. |
at line 171 in csp.py, in the function AC3, it is written as :
if Xk != Xi:
there is no need to exclude Xi because Xi already can't be a neighbour to itself.
but I guess it should be
if Xk != Xj:
because Xi is already revised with Xj, so there is no need to add Xi, Xj to the queue again.
we can also see this in the book at Figure6.3 as :
for each Xk in Xi.NEIGHBORS - {Xj} do
here again, Xj is excluded.
The text was updated successfully, but these errors were encountered: