Notes on Assignment 3 Foundations of Artificial Intelligence.

Slides:



Advertisements
Similar presentations
Inference in First-Order Logic
Advertisements

Artificial Intelligence 8. The Resolution Method
After the Practical on Clausal Form and Resolution Question 5 Proving the query of Question 4.
Some Prolog Prolog is a logic programming language
Russell and Norvig Chapter 7
Inference Rules Universal Instantiation Existential Generalization
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 06 : First Order Logic Resolution Prove.
Standard Logical Equivalences
Artificial Intelligence Inference in first-order logic Fall 2008 professor: Luigi Ceccaroni.
For Friday No reading Homework: –Chapter 9, exercise 4 (This is VERY short – do it while you’re running your tests) Make sure you keep variables and constants.
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Logic.
First-Order Logic (FOL) aka. predicate calculus. First-Order Logic (FOL) Syntax User defines these primitives: –Constant symbols (i.e., the "individuals"
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
RESOLUTION: A COMPLETE INFERENCE PROCEDURE. I Then we certainly want to be able to conclude S(A); S(A) is true if S(A) or R(A) is true, and one of those.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
CPSC 322 Introduction to Artificial Intelligence September 20, 2004.
1 Automated Reasoning Introduction to Weak Methods in Theorem Proving 13.1The General Problem Solver and Difference Tables 13.2Resolution Theorem.
3 Logic Translate the following four English sentences to first order logic (FOL). [4p] 1. Anyone passing his history exams and winning the lottery is.
Computing & Information Sciences Kansas State University Lecture 11 of 42 CIS 530 / 730 Artificial Intelligence Lecture 11 of 42 William H. Hsu Department.
Knowledge Representation I (Propositional Logic) CSE 473.
Knoweldge Representation & Reasoning
Inference in First-Order Logic
Chapter 3 Propositional Logic
Prop logic First order predicate logic (FOPC) Prob. Prop. logic Objects, relations Degree of belief First order Prob. logic Objects, relations.
Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus.
CS1502 Formal Methods in Computer Science Lecture Notes 10 Resolution and Horn Sentences.
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
INFERENCE IN FIRST-ORDER LOGIC IES 503 ARTIFICIAL INTELLIGENCE İPEK SÜĞÜT.
Inference is a process of building a proof of a sentence, or put it differently inference is an implementation of the entailment relation between sentences.
Propositional Resolution Computational LogicLecture 4 Michael Genesereth Spring 2005.
For Wednesday Read chapter 10 Prolog Handout 4. Exam 1 Monday Take home due at the exam.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 19, 2012.
Logical Inference 2 rule based reasoning
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
Homework #3-1: predicate logic (20%)
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
S P Vimal, Department of CSIS, BITS, Pilani
First Order Predicate Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Computing & Information Sciences Kansas State University Lecture 13 of 42 CIS 530 / 730 Artificial Intelligence Lecture 13 of 42 William H. Hsu Department.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 17, 2012.
Computing & Information Sciences Kansas State University Lecture 14 of 42 CIS 530 / 730 Artificial Intelligence Lecture 14 of 42 William H. Hsu Department.
Computing & Information Sciences Kansas State University Monday, 25 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 14 of 42 Monday, 25 September.
CPSC 386 Artificial Intelligence Ellen Walker Hiram College
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 15 of 41 Friday 24 September.
For Wednesday Finish reading chapter 10 – can skip chapter 8 No written homework.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 05 : Knowledge Base & First Order Logic.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part B Propositional Logic.
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
1 Outline Quantifiers and predicates Translation of English sentences Predicate formulas with single variable Predicate formulas involving multiple variables.
Logical Agents Chapter 7 Part I. 2 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
For Wednesday No reading Homework: –Chapter 8, exercise 24.
CS 416 Artificial Intelligence Lecture 13 First-Order Logic Chapter 9 Lecture 13 First-Order Logic Chapter 9.
Artificial Intelligence
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
ECE457 Applied Artificial Intelligence Fall 2007 Lecture #6
EA C461 Artificial Intelligence
Biointelligence Lab School of Computer Sci. & Eng.
Artificial Intelligence: Agents and Propositional Logic.
CS 416 Artificial Intelligence
Biointelligence Lab School of Computer Sci. & Eng.
CSNB234 ARTIFICIAL INTELLIGENCE
Quiz Nov Logic.
Quiz Nov Logic.
Presentation transcript:

Notes on Assignment 3 Foundations of Artificial Intelligence

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

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

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

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

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)

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

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)

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)

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