Notes 8: Predicate logic and inference

Slides:



Advertisements
Similar presentations
Knowledge Representation using First-Order Logic
Advertisements

First-Order Logic Chapter 8.
Knowledge Representation using First-Order Logic CS 271: Fall 2007 Instructor: Padhraic Smyth.
First-Order Logic.
Predicate Logic Second Term Fourth Year (10 CS) 1.
10 주 강의 First-order Logic. Limitation of propositional logic A very limited ontology  to need to the representation power  first-order logic.
First-Order Logic Chapter 8.
Knowledge Representation using First-Order Logic
First-Order Logic. Limitations of propositional logic Suppose you want to say “All humans are mortal” –In propositional logic, you would need ~6.7 billion.
Logic. Propositional Logic Logic as a Knowledge Representation Language A Logic is a formal language, with precisely defined syntax and semantics, which.
9/28/98 Prof. Richard Fikes First-Order Logic Knowledge Interchange Format (KIF) Computer Science Department Stanford University CS222 Fall 1998.
Knowledge Representation using First-Order Logic (Part II) Reading: Chapter 8, First lecture slides read: Second lecture slides read:
FIRST-ORDER LOGIC FOL or FOPC
First-Order Logic Chapter 8. Problem of Propositional Logic  Propositional logic has very limited expressive power –E.g., cannot say "pits cause breezes.
Knowledge Representation using First-Order Logic (Part III) This lecture: R&N Chapters 8, 9 Next lecture: Chapter 13; Chapter (Please read lecture.
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
Predicate Calculus.
CE An introduction to Artificial Intelligence CE Chapter 8: First Order Logic Ramin Halavati In which we notice that.
First-Order Logic Knowledge Representation Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read:
FIRST ORDER LOGIC Levent Tolga EREN.
Artificial Intelligence Building Knowledge Base Chapter 8.
AIC1 Logic Propositional Logic (Calculus) First Order Logic Based on Russell and Norvig slides.
First-Order Logic Chapter 8.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
1 First-Order Logic Chapter 8. 2 Why FOL? –How do you say “All students are smart?” –Some students work hard –Hardworking students have good marks –If.
ARTIFICIAL INTELLIGENCE Lecture 3 Predicate Calculus.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Predicate Logic.
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
Knowledge Representation using First-Order Logic 부산대학교 전자전기컴퓨터공학과 인공지능연구실 김민호
Limitation of propositional logic  Propositional logic has very limited expressive power –(unlike natural language) –E.g., cannot say "pits cause breezes.
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
CS 666 AI P. T. Chung First-Order Logic First-Order Logic Chapter 8.
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
Artificial Intelligence First-Order Logic (FOL). Outline of this Chapter The need for FOL? What is a FOL? Syntax and semantics of FOL Using FOL.
First-Order Logic Chapter 8 (not 8.1). Outline Why FOL? Why FOL? Syntax and semantics of FOL Syntax and semantics of FOL Using FOL Using FOL Wumpus world.
First-Order Logic. Outline Why FOL? Syntax and semantics of FOL Using FOL Knowledge engineering in FOL.
First-Order Logic Chapter 8. Outline Why FOL? Syntax and semantics of FOL Using FOL Wumpus world in FOL Knowledge engineering in FOL.
5/16/2005EE562 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 12, 5/16/2005 University of Washington, Department of Electrical Engineering Spring.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
1 First Order Logic CS 171/271 (Chapter 8) Some text and images in these slides were drawn from Russel & Norvig’s published material.
LOGIC Heng Ji Feb 19, Logic Knowledge-based agents Knowledge base (KB) = set of sentences in a formal language Declarative approach.
First-Order Logic Chapter 8. Problem of Propositional Logic  Propositional logic has very limited expressive power –E.g., cannot say "pits cause breezes.
Knowledge Representation using First-Order Logic (Part II) Reading: R&N Chapters 8, 9.
CPSC 420 – Artificial Intelligence Texas A & M University Lecture 7 Lecturer: Laurie webster II, M.S.S.E., M.S.E.e., M.S.BME, Ph.D., P.E.
© Copyright 2008 STI INNSBRUCK Intelligent Systems – Predicate Logic Florian Fischer Partially based on CS188,
First-Order Logic Knowledge Representation
First-Order Logic Chapter 8.
First-Order Logic.
Knowledge Representation using First-Order Logic
First-Order Logic Chapter 8.
Artificial Intelligence First Order Logic
First-Order Logic Knowledge Representation
Artificial Intelligence 1: First-Order Logic
Semantics In propositional logic, we associate atoms with propositions about the world. We specify the semantics of our logic, giving it a “meaning”. Such.
First-Order Logic Knowledge Representation
First-Order Logic Knowledge Representation
First-Order Logic Chapter 8.
First-Order Logic Chapter 8.
Artificial Intelligence: Agents and First-Order Logic
Introduction to Artificial Intelligence
Artificial Intelligence Chapter 15. The Predicate Calculus
First-Order Logic Chapter 8.
Knowledge Representation using First-Order Logic (Part III)
First-Order Logic Knowledge Representation
Knowledge Representation using First-Order Logic
Notes 8: Predicate logic and inference
First-Order Logic Chapter 8.
First-Order Logic Chapter 8.
First-Order Logic Chapter 8.
Presentation transcript:

Notes 8: Predicate logic and inference ICS 271 Fall 2006

Outline New ontology New Syntax New semantics objects,relations,properties,functions. New Syntax Constants, predicates,properties,functions New semantics meaning of new syntax Inference rules for Predicate Logic (FOL) Resolution Forward-chaining, Backword-chaining unification Readings: Nillson’s Chapters 15-16, Russel and Norvig Chapter 8, chapter 9

Propositional logic is not expressive Needs to refer to objects in the world, Needs to express general rules On(x,y) à ~ clear(y) All man are mortal Everyone who passed age 21 can drink One student in this class got perfect score Etc…. First order logic, also called Predicate calculus allows more expressiveness

Semantics: Worlds The world consists of objects that has properties. There are relations and functions between these objects Objects in the world, individuals: people, houses, numbers, colors, baseball games, wars, centuries Clock A, John, 7, the-house in the corner, Tel-Aviv Functions on individuals: father-of, best friend, third inning of, one more than Relations: brother-of, bigger than, inside, part-of, has color, occurred after Properties (a relation of arity 1): red, round, bogus, prime, multistoried, beautiful

Semantics: Interpretation An interpretation of a wff is an assignment that maps object constants to objects in the worlds, n-ary function symbols to n-ary functions in the world, n-ary relation symbols to n-ary relations in the world Given an interpretation, an atom has the value “true” in case it denotes a relation that holds for those individuals denoted in the terms. Otherwise it has the value “false” Example: A,B,C,floor, On, Clear World: On(A,B) is false, Clear(B) is true, On(C,F1) is true…

Semantics: Models An interpretation satisfies a wff (sentence) if the wff has the value “true” under the interpretation. An interpretation that satisfies a wff is a model of that wff Any wff that has the value “true” under all interpretations is valid Any wff that does not have a model is inconsistent or unsatisfiable If a wff w has a value true under all the models of a set of sentences KB then KB logically entails w

Example of models The formulas: On(A,F1)  Clear(B) Clear(B) and Clear(C)  On(A,F1) Clear(B) or Clear(A) Clear(B) Clear(C) Possible interpretations which are models: On = {<B,A>,<A,floor>,<C,Floor>} Clear = {<C>,<B>}

Quantification Universal and existential quantifiers allow expressing general rules with variables Universal quantification All cats are mammals It is equivalent to the conjunction of all the sentences obtained by substitution the name of an object for the variable x. Syntax: if w is a wff then (forall x) w is a wff.

Quantification: Existential Existential quantification : an existentially quantified sentence is true in case one of the disjunct is true Equivalent to disjunction: We can mix existential and universal quantification.

Using FOL The kinship domain: Brothers are siblings object are people Properties include gender and they are related by relations such as parenthood, brotherhood,marriage predicates: Male, Female (unary) Parent,Sibling,Daughter,Son... Function:Mother Father Brothers are siblings x,y Brother(x,y)  Sibling(x,y) One's mother is one's female parent m,c Mother(c) = m  (Female(m)  Parent(m,c)) “Sibling” is symmetric x,y Sibling(x,y)  Sibling(y,x)

Using FOL Objects are sets The set domain: s Set(s)  (s = {} )  (x,s2 Set(s2)  s = {x|s2}) x,s {x|s} = {} x,s x  s  s = {x|s} (the only members of a set are the elements that were adjoint into it) x,s x  s  [ y,s2} (s = {y|s2}  (x = y  x  s2))] s1,s2 s1  s2  (x x  s1  x  s2) s1,s2 (s1 = s2)  (s1  s2  s2  s1) x,s1,s2 x  (s1  s2)  (x  s1  x  s2) x,s1,s2 x  (s1  s2)  (x  s1  x  s2) Objects are sets Predicates: unary predicate “set:, binary predicate membership (x is a member of set), “subset” (s1 is a subset of s2) Functions: intersections, union, adjoining an eleiment to a set.

Knowledge engineering in FOL Identify the task Assemble the relevant knowledge Decide on a vocabulary of predicates, functions, and constants Encode general knowledge about the domain Encode a description of the specific problem instance Pose queries to the inference procedure and get answers Debug the knowledge base

The electronic circuits domain One-bit full adder

The electronic circuits domain Identify the task Does the circuit actually add properly? (circuit verification) Assemble the relevant knowledge Composed of wires and gates; Types of gates (AND, OR, XOR, NOT) Irrelevant: size, shape, color, cost of gates Decide on a vocabulary Alternatives: Type(X1) = XOR Type(X1, XOR) XOR(X1)

The electronic circuits domain Encode general knowledge of the domain t1,t2 Connected(t1, t2)  Signal(t1) = Signal(t2) t Signal(t) = 1  Signal(t) = 0 1 ≠ 0 t1,t2 Connected(t1, t2)  Connected(t2, t1) g Type(g) = OR  Signal(Out(1,g)) = 1  n Signal(In(n,g)) = 1 g Type(g) = AND  Signal(Out(1,g)) = 0  n Signal(In(n,g)) = 0 g Type(g) = XOR  Signal(Out(1,g)) = 1  Signal(In(1,g)) ≠ Signal(In(2,g)) g Type(g) = NOT  Signal(Out(1,g)) ≠ Signal(In(1,g))

The electronic circuits domain Encode the specific problem instance Type(X1) = XOR Type(X2) = XOR Type(A1) = AND Type(A2) = AND Type(O1) = OR Connected(Out(1,X1),In(1,X2)) Connected(In(1,C1),In(1,X1)) Connected(Out(1,X1),In(2,A2)) Connected(In(1,C1),In(1,A1)) Connected(Out(1,A2),In(1,O1)) Connected(In(2,C1),In(2,X1)) Connected(Out(1,A1),In(2,O1)) Connected(In(2,C1),In(2,A1)) Connected(Out(1,X2),Out(1,C1)) Connected(In(3,C1),In(2,X2)) Connected(Out(1,O1),Out(2,C1)) Connected(In(3,C1),In(1,A2))

The electronic circuits domain Pose queries to the inference procedure What are the possible sets of values of all the terminals for the adder circuit? i1,i2,i3,o1,o2 Signal(In(1,C_1)) = i1  Signal(In(2,C1)) = i2  Signal(In(3,C1)) = i3  Signal(Out(1,C1)) = o1  Signal(Out(2,C1)) = o2 Debug the knowledge base May have omitted assertions like 1 ≠ 0

Summary First-order logic: objects and relations are semantic primitives syntax: constants, functions, predicates, equality, quantifiers Increased expressive power: sufficient to define wumpus world