Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ac3 in csp.py #256

Closed
Closed
@onursurme

Description

@onursurme

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions