3
$\begingroup$

I have a question regarding Answer Set Programming on how to make an existing fact invalid, when there is already (also) a default statement present in the Knowledge Base.

For example, there are two persons seby and andy, one of them is able to drive at once. The scenario can be that seby can drive as seen in Line 3 but let's say, after his license is cancelled he cannot drive anymore, hence we now have Lines 4 to 7 and meanwhile andy learnt driving, as seen in Line 7. Line 6 shows only one person can drive at a time, besides showing seby and andy are not the same.

1 person(seby).
2 person(andy).
3 drives(seby).
4 drives(seby) :- person(seby), not ab(d(drives(seby))), not -drives(seby).
5 ab(d(drives(seby))).
6 -drives(P) :- drives(P0), person(P), P0 != P.
7 drives(andy).

In the above program, Lines 3 and 4 contradict with each other, and the Clingo solver (which I use) obviously outputs UNSATISFIABLE.

Having said all these, deleting Line 3 and getting the problem solved is not what I'm epecting. The intention behind asking this question is to know whether it is possible now to make Line 3 somehow invalid to let Line 4 do its duty.

However, Line 4 can also be written as:

4 drives(P) :- person(P), not ab(d(drives(P))), not -drives(P).

Thanks a lot in advance.

$\endgroup$
  • 1
    $\begingroup$ ,This is a cool question and also i would like you to post it here Cross Validated $\endgroup$ – quintumnia Aug 17 '17 at 13:23
  • 1
    $\begingroup$ @quintumnia: Thanks a lot for your idea. I've done it. $\endgroup$ – theRam Aug 17 '17 at 20:17
  • 1
    $\begingroup$ And if you find the answer over there, please come back over here and share the information ;) Welcome to AI! $\endgroup$ – DukeZhou Aug 17 '17 at 22:00
  • $\begingroup$ @DukeZhou ,Indeed. $\endgroup$ – quintumnia Aug 18 '17 at 4:45
  • $\begingroup$ @DukeZhou : ya sure but the people over there have put my question on hold stating it is off-topic. $\endgroup$ – theRam Aug 19 '17 at 21:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.