T0nyX1ang / noqx

Extended logic puzzle solver of noq.
https://noqx.tonyxiang.site/
Apache License 2.0
5 stars 0 forks source link

[Bug] Moon-or-Sun gets multiple solutions in single symboled areas #80

Closed T0nyX1ang closed 1 week ago

T0nyX1ang commented 1 week ago

Please give the link to the puzzle which causes the bug:

Please give expected behavior if possible:

T0nyX1ang commented 1 week ago

This issue can be fixed by including an extra rule here:

    extra = "area_pass_moon(A) :- area(A, R, C), moon(R, C), moon_sun(R, C).\n"
    extra += "area_pass_sun(A) :- area(A, R, C), sun(R, C), moon_sun(R, C).\n"
    extra += ":- area(A, _, _), not area_pass_moon(A), not area_pass_sun(A).\n"

Resolved with commit 6a4d649.