PowerPoint Presentation
Introduction to AI
-Tutorial NAF for NMR-
Francesca Toni
SLDNF
Apply SLDNF to compute all possible answers for p(X) given S:
p(X) ← q(X), not r(X), not s(X)
q(1) ←
q(2) ←
q(3) ←
r(2) ←
r(X) ← not t(X)
s(X) ← u(X)
t(1) ←
t(3) ← t(3)
SLDNF and safe selection of sub-goals
Given S={p(X) ← q(X,Y), not r(Y), q(2,3) ←, r(4) ←} and
P=p(X)
1. Apply SLDNF with a safe selection of sub-goals to
compute an answer for P, giving the answer explicitly
2. Explain why a non-safe selection of sub-goals might
give an incorrect answer to P
NAF semantics
S={ p(X) ← q(X), not r(X), not s(X), q(1) ←, q(2) ←, q(3) ←, r(2) ←, r(X) ← not
t(X), s(X) ← u(X), t(1), t(3) ← t(3)}
1) What is the completion of S?
2) Determine whether
Comp(S) ╞ p(1) , Comp(S) ╞¬ p(1)
Comp(S) ╞ p(2) , Comp(S) ╞¬ p(2)
Comp(S) ╞ p(3) , Comp(S) ╞¬ p(3)
3) Determine all stable models of S