Download presentation
Presentation is loading. Please wait.
Published byLisa Waters Modified over 9 years ago
1
Notes on Assignment 3 Foundations of Artificial Intelligence
2
2 English to FOPC (Similar to Assignment 3 - Problem 2) Not all students take both History and Biology ~ x student(x) => (takes(x, hist ) /\ takes(x, bio )) x student(x) /\ ~(takes(x, hist ) /\ takes(x, bio )) or alternatively Only one student failed History x student(x) /\ fails(x, hist ) /\ ( y student(y) /\ fails(y, hist ) => x = y
3
Foundations of Artificial Intelligence 3 Forward Chaining Proof – Example (Similar to Assingment 3 - Problem 1) KB1: (A \/ B) => E KB2: ~D \/ C KB3: D /\ C => A KB4: D Give a derivation (proof) for the sentence E. 1.DKB4 2.CStep 1, KB2, using Resolution rule 3.D /\ CStep 1, Step 2, using AND-Introduction 4.AStep 3, KB3, using Modus Ponens 5.A \/ BStep 4, using OR-Introduction (introducing B) 6.EStep 5, KB1, using Modus Ponens
4
Foundations of Artificial Intelligence 4 Similar to Assignment 3 - Problem 1 (resolution-refutation) Can we do this using resolution-refutation? First need to convert everything into clause form Next we need to negate the sentence to be proved and convert to clause form: KB1: (A \/ B) => E KB2: ~D \/ C KB3: D /\ C => A KB4: D KB1.1: ~A \/ E KB1.2: ~B \/ E KB2: ~D \/ C KB3: ~D \/ ~C \/ A KB4: D ~E E Initial subgoal for resolution
5
Foundations of Artificial Intelligence 5 Similar to Assignment 3 - Problem 1 (resolution-refutation) ~E Subgoal Resolve with KB3: ~D \/ ~C \/ A ~A KB1.1: ~A \/ E ~D \/ ~C KB4: D ~C KB1.1: ~A \/ E KB1.2: ~B \/ E KB2: ~D \/ C KB3: ~D \/ ~C \/ A KB4: D KB2: ~D \/ C ~D KB4: D X
6
Foundations of Artificial Intelligence 6 Resolution Example (Assignment 3 - Problem 3) John likes all kinds of food. Apples are food. Chicken is food. Anything anyone eats and isn't killed by is food. Bill eats peanuts and is still alive. Anyone who is killed by anything is not alive. Sue eats everything Bill eats. x food(x) => likes( john, x) food( apple ) food( chicken ) x y eats(x, y) /\ ~killed-by(x, y) => food(y) eats( bill, peanuts ) /\ alive( bill ) x y killed-by(x, y) => ~alive(x) x eats( bill, x) => eats( sue, x)
7
Foundations of Artificial Intelligence 7 Resolution Example (Assignment 2 - Problem 5) x food(x) => likes( john, x) food( apple ) food( chicken ) x y eats(x, y) /\ ~killed-by(x, y) => food(y) eats( bill, peanuts ) /\ alive( bill ) x y killed-by(x, y) => ~alive(x) x eats( bill, x) => eats( sue, x) 1. ~food(x) \/ likes( john, x) 2. food( apple ) 3. food( chicken ) 4. ~eats(x, y) \/ killed-by(x, y) \/ food(y) 5a. eats( bill, peanuts ) 5b. alive( bill ) 6. ~killed-by(x,y) \/ ~alive(x) 7. ~eats( bill, x) \/ eats( sue, x) 1. ~food(x) \/ likes( john, x) 2. food( apple ) 3. food( chicken ) 4. ~eats(x, y) \/ killed-by(x, y) \/ food(y) 5a. eats( bill, peanuts ) 5b. alive( bill ) 6. ~killed-by(x,y) \/ ~alive(x) 7. ~eats( bill, x) \/ eats( sue, x) Clausal Form
8
Foundations of Artificial Intelligence 8 Resolution Example (Assignment 2 - Problem 5) Prove that john likes peanuts : Prove that john likes peanuts : 1. ~food(x) \/ likes( john, x) 2. food( apple ) 3. food( chicken ) 4. ~eats(x, y) \/ killed-by(x, y) \/ food(y) 5a. eats( bill, peanuts ) 5b. alive( bill ) 6. ~killed-by(x,y) \/ ~alive(x) 7. ~eats( bill, x) \/ eats( sue, x) 1. ~food(x) \/ likes( john, x) 2. food( apple ) 3. food( chicken ) 4. ~eats(x, y) \/ killed-by(x, y) \/ food(y) 5a. eats( bill, peanuts ) 5b. alive( bill ) 6. ~killed-by(x,y) \/ ~alive(x) 7. ~eats( bill, x) \/ eats( sue, x)
9
Foundations of Artificial Intelligence 9 Resolution Example (Assignment 3 -Problem 3) What food does sue eat? ( i.e., x food(x) /\ eats( sue, x)? ) x food(x) /\ eats( sue, x) x food(x) /\ eats( sue, x)) food(x) \/ ~eats( sue, x)) negate Convert to clause form This can be resolved with candidate clauses 2, 3, and 4 This can be resolved with candidate clauses 2, 3, and 4 1. ~food(x) \/ likes( john, x) 2. food( apple ) 3. food( chicken ) 4. ~eats(x, y) \/ killed-by(x, y) \/ food(y) 5a. eats( bill, peanuts ) 5b. alive( bill ) 6. ~killed-by(x,y) \/ ~alive(x) 7. ~eats( bill, x) \/ eats( sue, x) 1. ~food(x) \/ likes( john, x) 2. food( apple ) 3. food( chicken ) 4. ~eats(x, y) \/ killed-by(x, y) \/ food(y) 5a. eats( bill, peanuts ) 5b. alive( bill ) 6. ~killed-by(x,y) \/ ~alive(x) 7. ~eats( bill, x) \/ eats( sue, x)
10
Foundations of Artificial Intelligence 10 English to FOPC (Similar to Assignment 3 - Problem 2) Not all students take both History and Biology ~ x student(x) => (takes(x, hist ) /\ takes(x, bio )) x student(x) /\ ~(takes(x, hist ) /\ takes(x, bio )) or alternatively Only one student failed History x student(x) /\ fails(x, hist ) /\ ( y student(y) /\ fails(y, hist ) => x = y
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.