



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Class: Artificial Intelligence; Subject: Computer Science and Engineering; University: Arizona State University - Tempe; Term: Unknown 1989;
Typology: Study notes
1 / 5
This page cannot be seen from the preview
Don't miss anything!




Problem: Refuse admission to an applicant if he/she has not taken any honors course. refuse_admission(X). applicant(X). taken_honors_course(X,Y). refuse_admission(X) ← applicant(X), not taken_honors_course(X,Y). applicant (john). applicant (george). taken_honors_course(john, chemistry). taken_honors_course(george, physics). Side Note: If we go by mathematical semantics, variables can go anywhere, so there would be many instantiations. However, in “smodels” there is implicit typing. So in this example, chemistry and physics can only appear in the Y position in the “taken_honors_course(X,Y).” rule. The above rules lead to the following instantiations:
AnsProlog ¬ Note: The ¬ symbol is useful for writing programs. However, it is not needed. The program can always be written some other way. Consider: fly(X) ← bird(X), not abnormal(X). abnormal(X) ← penguin(X). bird(X) ← penguin(X). bird(tweety). tweety is a bird. Since we cannot prove that he is abnormal, it follows that tweety flies. However, suppose we observe that he does not fly. How can we represent this? We could add: abnormal(tweety). or ← fly(tweety). Unfortunately, this will eliminate models where tweety can fly. One solution would be to write the first rule of the program with the following two rules: fly(X) ← bird(X), ¬ fly(X). ¬ fly(X) ← abnormal(X). Then if we observe that tweety does not fly, we can simply add the fact: ¬ fly(tweety).
Problem: Cross the tracks if no train is coming. Solution using default negation : cross ← not train(X). This solution is dangerous, since it will lead to crossing the tracks if nothing is known about the train. If we instead use explicit negation , then we only cross if we know that there is no train:
Now consider the program ∏+: n_a ← b. b ←. The answer S+^ is {n_a, b}. Since S maps to S+, S is an answer set of ∏.
Consider the program ∏: a ← b. ¬a. b. We derive the set S: {a,¬a, b}, which is inconsistent. Therefore the answer set for ∏ is Lit {a,¬a, b, ¬b}. Notice that the answer set for ∏+: a ← b. n_a. b. is S+: {a, n_a, b}, which does not map to S.
Note: The following two programs are equivalent in terms of propositional logic, but they have different answer sets. ∏^1 ∏^2 ¬a ← ¬b. (equivalent to: b v ¬a) b. b ← a. (equivalent to: ¬a v b) b. Answer set: {¬b, ¬a} Answer set: {¬b }
Consider the following program. eligible(X) ← highGPA(X). eligible(X) ← special(X), fairGPA(X). ¬eligible(X) ← ¬special(X), ¬highGPA(X). interview(X) ← not eligible(X), not ¬eligible(X). fairGPA(john). ¬highGPA(john). Will this program grant john an interview? Assigned as take home exercise.
END OF CLASS