For Friday Read chapter 8 Homework: –Chapter 7, exercises 2 and 10 Program 1, Milestone 2 due.

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

First-Order Logic.
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.
Knowledge Representation Methods
Propositional Calculus A propositional calculus formula is composed of atomic propositions, which area simply statements that are either true or false.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
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.
CS 561, Session Midterm format Date: 10/10/2002 from 11:00am – 12:20 pm Location: THH 101 Credits: 35% of overall grade Approx. 4 problems, several.
Knowledge Representation using First-Order Logic (Part II) Reading: Chapter 8, First lecture slides read: Second lecture slides read:
Propositional Calculus Knowledge based agent Knowledge is contained in agents in the form of sentences in a knowledge representation language stored in.
FIRST-ORDER LOGIC FOL or FOPC
Let remember from the previous lesson what is Knowledge representation
Predicate Calculus.
1 Knowledge Representation and Reasoning. 2 Knowledge Representation & Reasoning How knowledge about the world can be represented How knowledge about.
Propositional Logic Agenda: Other forms of inference in propositional logic Basics of First Order Logic (FOL) Vision Final Homework now posted on web site.
FIRST ORDER LOGIC Levent Tolga EREN.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
1 CS 2710, ISSP 2610 Chapter 8, Part 2 First Order Predicate Calculus FOPC.
Discussion #141/20 Discussion #14 Predicate Calculus.
First Order Logic Chapter 7. PL is a Weak Representational Language §Propositional Logic (PL) is not a very expressive language because: §Hard to identify.
CSE PredLogic 1 Knowledge Representation with Logic: First Order Predicate Calculus Outline –Introduction to First Order Predicate Calculus (FOPC)
Atomic Sentences Chapter 1 Language, Proof and Logic.
For Wednesday No reading Homework –Chapter 8, exercises 9 and 10.
First Order Predicate Calculus Chapter 7. Propositional logic v. FOPC §Propositional calculus deals only with facts l P : I-love-all-dogs l facts are.
Chapter 1, Part II: Predicate Logic With Question/Answer Animations.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
Pattern-directed inference systems
1 Last time: Logic and Reasoning Knowledge Base (KB): contains a set of sentences expressed using a knowledge representation language TELL: operator to.
1 CMSC 471 Fall 2002 Class #10/12–Wednesday, October 2 / Wednesday, October 9.
First-Order Logic Introduction Syntax and Semantics Using First-Order Logic Summary.
Propositional Calculus Knowledge based agent Knowledge is contained in agents in the form of sentences in a knowledge representation language stored in.
1 Predicate (Relational) Logic 1. Introduction The propositional logic is not powerful enough to express certain types of relationship between propositions.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 8.
For Monday Read chapter 8 Homework: –Chapter 7, exercises 1, 8, and 9 May be done in pairs.
For Friday Read chapter 8 Homework: –Chapter 7, exercise 1.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 12 Friday, 17 September.
Word Problem Consider the following problem: To register, you will need either a yellow card or a note from the Dean. To obtain a note from the Dean you.
Artificial Intelligence Chapter 15 The Predicate Calculus Artificial Intelligence Chapter 15 The Predicate Calculus Biointelligence Lab School of Computer.
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.
CS-554 Part-3: First-Order Logic
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
Propositional Logic Predicate Logic
For Wednesday Read chapter 9, sections 1-4 Homework: –Chapter 8, exercise 6 May be done in groups.
1 CSC384: Intro to Artificial Intelligence Lecture 5.  Knowledge Representation.
1 Propositional logic (cont…) 命題論理 Syntax&Semantics of first-order logic 構文論と意味論 Deducing hidden properties Describing actions Propositional logic (cont…)
11 Artificial Intelligence CS 165A Tuesday, October 30, 2007  Knowledge and reasoning (Ch 7) Propositional logic  First-order logic (Ch 8) 1.
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 Reading: C. 8 and C. 9 Pente specifications handed back at end of class.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
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.
First-Order Logic Chapter 8. Problem of Propositional Logic  Propositional logic has very limited expressive power –E.g., cannot say "pits cause breezes.
For Wednesday Finish chapter 8 Homework: –Chapter 8, exercise 6 May be done in pairs.
1 CS 2710, ISSP 2610 Chapter 8, Part 1 First Order Predicate Calculus FOPC.
Propositional Logic. Assignment Write any five rules each from two games which you like by using propositional logic notations.
Artificial Intelligence Logical Agents Chapter 7.
Knowledge Representation using First-Order Logic
Predicate Calculus Discussion #14 Chapter 2, Section 1 1/20.
Discussion #14 Predicate Calculus
CS201: Data Structures and Discrete Mathematics I
Predicate Calculus Discussion #14 Chapter 2, Section 1.
Artificial Intelligence Chapter 15. The Predicate Calculus
Chapter 8, Part 1 First Order Predicate Calculus FOPC
Relational Logic Computational Logic Lecture 5
Chapter 1: Propositional and First-Order Logic
CS201: Data Structures and Discrete Mathematics I
Predicate Calculus. Predicate Calculus Topics Predicates Variables and instantiation Quantifiers Logical expressions Bound and free variables.
Introduction to Computational Linguistics
Chapter 8, Part 1 First Order Predicate Calculus FOPC
Presentation transcript:

For Friday Read chapter 8 Homework: –Chapter 7, exercises 2 and 10 Program 1, Milestone 2 due

Program 1 Any questions?

Propositional Inference Rules Modus Ponens or Implication Elimination And-Elimination Unit Resolution Resolution

Simpler Inference Horn clauses Forward-chaining Backward-chaining

Building an Agent with Propositional Logic Propositional logic has some nice properties –Easily understood –Easily computed Can we build a viable wumpus world agent with propositional logic???

The Problem Propositional Logic only deals with facts. We cannot easily represent general rules that apply to any square. We cannot express information about squares and relate (we can’t easily keep track of which squares we have visited)

More Precisely In propositional logic, each possible atomic fact requires a separate unique propositional symbol. If there are n people and m locations, representing the fact that some person moved from one location to another requires nm 2 separate symbols.

First Order Logic Predicate logic includes a richer ontology: –objects (terms) –properties (unary predicates on terms) –relations (n­ary predicates on terms) –functions (mappings from terms to other terms) Allows more flexible and compact representation of knowledge Move(x, y, z) for person x moved from location y to z.

Syntax for First­Order Logic Sentence  AtomicSentence | Sentence Connective Sentence | Quantifier Variable Sentence | ¬Sentence | (Sentence) AtomicSentence  Predicate(Term, Term,...) | Term=Term Term  Function(Term,Term,...) | Constant | Variable Connective   Quanitfier   Constant  A | John | Car1 Variable  x | y | z |... Predicate  Brother | Owns |... Function  father­of | plus |...

Terms Objects are represented by terms: –Constants: Block1, John –Function symbols: father­of, successor, plus An n­ary function maps a tuple of n terms to another term: father­of(John), succesor(0), plus(plus(1,1),2) Terms are simply names for objects. Logical functions are not procedural as in programming languages. They do not need to be defined, and do not really return a value. Functions allow for the representation of an infinite number of terms.

Predicates Propositions are represented by a predicate applied to a tuple of terms. A predicate represents a property of or relation between terms that can be true or false: –Brother(John, Fred), Left­of(Square1, Square2) –GreaterThan(plus(1,1), plus(0,1)) In a given interpretation, an n­ary predicate can defined as a function from tuples of n terms to {True, False} or equivalently, a set tuples that satisfy the predicate: –{,,,...}

Sentences in First­Order Logic An atomic sentence is simply a predicate applied to a set of terms. –Owns(John,Car1) –Sold(John,Car1,Fred) Semantics is True or False depending on the interpretation, i.e. is the predicate true of these arguments. The standard propositional connectives (   ) can be used to construct complex sentences: –Owns(John,Car1)  Owns(Fred, Car1) –Sold(John,Car1,Fred)  ¬Owns(John, Car1) Semantics same as in propositional logic.

Quantifiers Allow statements about entire collections of objects Universal quantifier:  x –Asserts that a sentence is true for all values of variable x  x Loves(x, FOPC)  x Whale(x)  Mammal(x)  x  y Dog(y)  Loves(x,y))   z Cat(z)  Hates(x,z)) Existential quantifier:  –Asserts that a sentence is true for at least one value of a variable x  x Loves(x, FOPC)  x(Cat(x)  Color(x,Black)  Owns(Mary,x))  x(  y Dog(y)  Loves(x,y))  (  z Cat(z)  Hates(x,z))

Use of Quantifiers Universal quantification naturally uses implication: –  x Whale(x)  Mammal(x) Says that everything in the universe is both a whale and a mammal. Existential quantification naturally uses conjunction: –  x Owns(Mary,x)  Cat(x) Says either there is something in the universe that Mary does not own or there exists a cat in the universe. –  x Owns(Mary,x)  Cat(x) Says all Mary owns is cats (i.e. everthing Mary owns is a cat). Also true if Mary owns nothing. –  x Cat(x)  Owns(Mary,x) Says that Mary owns all the cats in the universe. Also true if there are no cats in the universe.

Nesting Quantifiers The order of quantifiers of the same type doesn't matter: –  x  y(Parent(x,y)  Male(y)  Son(y,x)) –  x  y(Loves(x,y)  Loves(y,x)) The order of mixed quantifiers does matter: –  x  y(Loves(x,y)) Says everybody loves somebody, i.e. everyone has someone whom they love. –  y  x(Loves(x,y)) Says there is someone who is loved by everyone in the universe. –  y  x(Loves(x,y)) Says everyone has someone who loves them. –  x  y(Loves(x,y)) Says there is someone who loves everyone in the universe.

Variable Scope The scope of a variable is the sentence to which the quantifier syntactically applies. As in a block structured programming language, a variable in a logical expression refers to the closest quantifier within whose scope it appears. –  x (Cat(x)   x(Black (x))) The x in Black(x) is universally quantified Says cats exist and everything is black In a well­formed formula (wff) all variables should be properly introduced: –  xP(y) not well­formed A ground expression contains no variables.

Relations Between Quantifiers Universal and existential quantification are logically related to each other: –  x ¬Love(x,Saddam)  ¬  x Loves(x,Saddam) –  x Love(x,Princess­Di)  ¬  x ¬Loves(x,Princess­Di) General Identities –  x ¬P  ¬  x P – ¬  x P   x ¬P –  x P  ¬  x ¬P –  x P  ¬  x ¬P –  x P(x)  Q(x)   x P(x)   x Q(x) –  x P(x)  Q(x)   x P(x)   x Q(x)

Equality Can include equality as a primitive predicate in the logic, or require it to be introduced and axiomitized as the identity relation. Useful in representing certain types of knowledge: –  x  y(Owns(Mary, x)  Cat(x)  Owns(Mary,y)  Cat(y) –  ¬(x=y)) –Mary owns two cats. Inequality needed to ensure x and y are distinct. –  x  y married(x, y)  z(married(x,z)  y=z) –Everyone is married to exactly one person. Second conjunct is needed to guarantee there is only one unique spouse.