Introduction to AI & AI Principles (Semester 1) WEEK 8 Introduction to AI & AI Principles (Semester 1) WEEK 8 (2008/09) John Barnden Professor of Artificial.

Slides:



Advertisements
Similar presentations
Nested Quantifiers Section 1.4.
Advertisements

Artificial Intelligence
1 Knowledge Representation Introduction KR and Logic.
First Order Logic Logic is a mathematical attempt to formalize the way we think. First-order predicate calculus was created in an attempt to mechanize.
First-Order Logic.
Computer Science CPSC 322 Lecture 25 Top Down Proof Procedure (Ch 5.2.2)
Inference Rules Universal Instantiation Existential Generalization
Deduction In addition to being able to represent facts, or real- world statements, as formulas, we want to be able to manipulate facts, e.g., derive new.
L41 Lecture 2: Predicates and Quantifiers.. L42 Agenda Predicates and Quantifiers –Existential Quantifier  –Universal Quantifier 
F22H1 Logic and Proof Week 7 Clausal Form and Resolution.
Knowledge Representation Methods
Introduction to AI & AI Principles (Semester 1) WEEK 6 – Tuesday Introduction to AI & AI Principles (Semester 1) WEEK 6 – Tuesday (2008/09) John Barnden.
Formal Aspects of Computer Science - Week 5 Logic and Reasoning Lee McCluskey, room 2/07
Logic 3 Tautological Implications and Tautological Equivalences
CPSC 322, Lecture 20Slide 1 Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Computer Science cpsc322, Lecture 20 (Textbook.
Introduction to AI & AI Principles (Semester 1) WEEK 10 – Tuesday/Wednesday Introduction to AI & AI Principles (Semester 1) WEEK 10 – Tuesday/Wednesday.
Introduction to AI & AI Principles (Semester 1) WEEK 11 (Wed) – Wrap-Up (2008/09) John Barnden Professor of Artificial Intelligence School of Computer.
Introduction to AI & AI Principles (Semester 1) WEEK 8 (07/08) [Barnden’s slides only] John Barnden Professor of Artificial Intelligence School of Computer.
Introduction to AI & AI Principles (Semester 1) WEEK 9 - Wednesday Introduction to AI & AI Principles (Semester 1) WEEK 9 - Wednesday (2008/09) John Barnden.
AI - Week 15 Logic and Reasoning in AI Lee McCluskey, room 2/07
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
Introduction to AI & AI Principles (Semester 1) WEEK 7 (07/08) [Barnden’s slides only] John Barnden Professor of Artificial Intelligence School of Computer.
Introduction to AI & AI Principles (Semester 1) WEEK 7 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,
Introduction to AI & AI Principles (Semester 1) WEEK 11 John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham,
1 Inference Rules and Proofs Z: Inference Rules and Proofs.
Introduction to AI & AI Principles (Semester 1) WEEK 6 – Wednesday Introduction to AI & AI Principles (Semester 1) WEEK 6 – Wednesday (2008/09) John Barnden.
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
Formal Logic Mathematical Structures for Computer Science Chapter 1 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFormal Logic.
Introduction to AI & AI Principles (Semester 1) WEEK 3 – Tuesday part B Introduction to AI & AI Principles (Semester 1) WEEK 3 – Tuesday part B (2008/09)
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
Introduction to AI & AI Principles (Semester 1) WEEK 5 – Wednesday Introduction to AI & AI Principles (Semester 1) WEEK 5 – Wednesday (2008/09) John Barnden.
Propositional Calculus Math Foundations of Computer Science.
Artificial Intelligence Reasoning. Reasoning is the process of deriving logical conclusions from given facts. Durkin defines reasoning as ‘the process.
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.
Formal Logic Mathematical Structures for Computer Science Chapter Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFormal Logic.
1 Chapter 7 Propositional and Predicate Logic. 2 Chapter 7 Contents (1) l What is Logic? l Logical Operators l Translating between English and Logic l.
1 Knowledge Based Systems (CM0377) Lecture 4 (Last modified 5th February 2001)
Propositional Calculus Composed of symbols –P – some true statement P might represent something like “It is Monday” or “the car is red” And sentences –a.
Discrete Mathematics CS 2610 August 24, Agenda Last class Introduction to predicates and quantifiers This class Nested quantifiers Proofs.
Pattern-directed inference systems
Slide 1 Propositional Definite Clause Logic: Syntax, Semantics and Bottom-up Proofs Jim Little UBC CS 322 – CSP October 20, 2014.
First Order Logic Lecture 2: Sep 9. This Lecture Last time we talked about propositional logic, a logic on simple statements. This time we will talk about.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
1 CMSC 250 Discrete Structures CMSC 250 Lecture 1.
CS 381 DISCRETE STRUCTURES Gongjun Yan Aug 25, November 2015Introduction & Propositional Logic 1.
Propositional Calculus CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 8.
Hazırlayan DISCRETE COMPUTATIONAL STRUCTURES Propositional Logic PROF. DR. YUSUF OYSAL.
Theory and Applications
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Artificial Intelligence 7. Making Deductive Inferences Course V231 Department of Computing Imperial College, London Jeremy Gow.
CS-554 Part-3: First-Order Logic
For Wednesday Read chapter 9, sections 1-3 Homework: –Chapter 7, exercises 8 and 9.
For Friday Read chapter 8 Homework: –Chapter 7, exercises 2 and 10 Program 1, Milestone 2 due.
First Order Logic Lecture 3: Sep 13 (chapter 2 of the book)
11 Artificial Intelligence CS 165A Thursday, October 25, 2007  Knowledge and reasoning (Ch 7) Propositional logic 1.
Chapter 7. Propositional and Predicate Logic Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
Week 4 - Friday.  What did we talk about last time?  Floor and ceiling  Proof by contradiction.
Daniel Kroening and Ofer Strichman 1 Decision Procedures An Algorithmic Point of View Basic Concepts and Background.
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 Lecture 2 out of 5. Last Week Intelligence needs knowledge We need to represent this knowledge in a way a computer can process.
Chapter 7. Propositional and Predicate Logic
Computer Science cpsc322, Lecture 20
Knowledge Representation and Reasoning
Chapter 7. Propositional and Predicate Logic
CSNB234 ARTIFICIAL INTELLIGENCE
Computer Science cpsc322, Lecture 20
Introduction to Computational Linguistics
Habib Ullah qamar Mscs(se)
Presentation transcript:

Introduction to AI & AI Principles (Semester 1) WEEK 8 Introduction to AI & AI Principles (Semester 1) WEEK 8 (2008/09) John Barnden Professor of Artificial Intelligence School of Computer Science University of Birmingham, UK

Language-to-Logic in Shopping Trip case study The material in the following slides (before the ones on Reasoning) MAY be used in the Exercises on Wed 19 th November

 Implication Symbol:  uIf Sally likes Peter then Ben hates Harry.  likes(Sally, Peter)  hates(Ben, Harry).  uA  B is true if and only if B is true or A is false (or both). So:  A  B is false if and only if A is true and B is false. And:  If A is true and A  B is true then it must be that B is true.   uA  B is logically equivalent to (i.e., always has same truth value as)  A  B.   l It is probably best, in fact, to think of A  B as just a sometimes-intuitive ABBREVIATION for  A  B. u  u  is NOT about any intrinsic connection of any sort between the two sides.

 Equivalence or Double Implication:  or  uIf Sally likes Peter then Ben hates Harry, and vice versa.  likes(Sally, Peter)  hates(Ben, Harry).    uA  B is true if and only if A  B and B  A are both true. So:  A  B is true if and only if A and B are either both true or both false. And:  A  B is false if and only if A and B have different truth values.

Existential Quantification uSally likes Peter. l likes(Sally, Peter). uSally likes something.  l (  p) likes(Sally, p).  l Think of “  p” as “there exists something p such that” l Does NOT restrict the claim to exactly one thing: the formula is still true if Sally likes more than one thing. uSally likes someone.  l (  p) (is-person(p)  likes(Sally, p)). uSally likes someone [i.e., at least one particular person] who is tall.  l (  p) (is-person(p)  likes(Sally, p)  tall(p)).

Universal Quantification uSally likes everything. (  x) likes(Sally, x). Think of “  x” as “for anything, x, it is the case that” uSally likes every shop.  (  p) (is-shop(p)  likes(Sally, p)). For anything, p, [it is the case that] if p is a shop then Sally likes p. CAUTION: The formula is TRUE if there are no shops at all! uSally likes every shop that is modern.  (  q) ( (is-shop(q)  modern(q))  likes(Sally, q) ). uSally loves or hates anyone who is tall.  (  z) ( (is-person(z)  tall(z))  (loves(Sally, z)  hates(Sally,z) ).

Quantification, contd. uSally likes everyone.  (  p) (is-person(p)  likes(Sally, p)). Why is the following wrong?:  (  p) (is-person(p)  likes(Sally, p)). uSally likes someone.  (  p) (is-person(p)  likes(Sally, p)). Why is the following wrong?:  (  p) (is-person(p)  likes(Sally, p)).

Quantification, contd. uEveryone likes any shop that’s modern.  (  q,p) ( (is-shop(q)  modern(q)  is-person(p))  likes(p, q) ). uEveryone likes some shop that’s modern.  (  p) (is-person(p))   (  q) (is-shop(q)  modern(q)  likes(p, q) ). This interpretation doesn’t assume it’s the same shop(s) for each person: q can depend on p.  (  q) (is-shop(q)  modern(q)   (  p) (is-person(p))  (likes(p, q)) ). This interpretation does assume it’s the same shop(s) for each person: q does not depend on p.

Substances and Lumps of Them uSally likes ice-cream. l likes(Sally, ice-cream). uSally is eating ice-cream. l eating(Sally, ice-cream). uThe ice-cream Sally is eating is famous.  l (  x) eating(Sally,x)  is(x,ice-cream)  famous(x)). uThe ice-cream Sally is eating is melting.  l (  x) eating(Sally,x)  lump-of(x,ice-cream)  melting(x)). l Is there an interpretative problem here?? l The predicate symbol eating can apply to two different sorts of second-argument object: lumps and general substances. l May be better to have two different predicate symbols.

Somewhat Similar Issue with Actions uSally eats ice-cream [in the sense of: habitually]. l eats-hab(Sally, ice-cream). uSally eats ice-cream [in the sense of: mainly]. l eats-main(Sally, ice-cream). uSally eats ice-cream [in the sense of: is prepared to]. l eats-prep(Sally, ice-cream). uSally is eating ice-cream [at the present moment]. l eating(Sally, ice-cream). uCould not use the same predicate symbol for two or more of the above.

Expressing Uniqueness uSally likes [exactly] one person.  l (  p) (is-person(p)  likes(Sally, p)) WRONG . Wrong because  just means one or more.  ! l (  !p) (is-person(p)  likes(Sally, p)) This notation has been proposed, amongst others. l Without special notation, need to use formulas like:  (  p) (is-person(p)  likes(Sally, p)   (  q)(is-person(q)  likes(Sally, q)  q = p) ) A simplification:  (  p)(  q)(is-person(q)  likes(Sally, q)  q = p)

Deductive Reasoning in Logic (brief intro) The following slides won’t be used in the Exercises on Wed 19 th November

Basic Concepts about Reasoning uReasoning in general is a process of generating new propositions (claims, statements) from existing ones, where the new ones are viewed as following from the old ones in some sense. uSo imagine a “knowledge base” (“proposition base” would have been a better term) where the results of reasoning are being accumulated. l Example: the Working Memory in a production system. uThere are many types of reasoning: deduction, induction, abduction, reasoning by default, reasoning from examples, reasoning by analogy, probabilistic reasoning, …. uAll are studied in AI and are important for practical tasks. u(Traditional) deduction is the most basic and idealistic form …

Nature of Deduction u(Traditional) deduction is reasoning where each step taken is the application of a sound and domain- independent rule of inference. l A rule of inference is a mechanism that takes some set of propositions as input and outputs one or more propositions that are viewed as following from the input. u(In the case where each proposition’s truth value is either TRUE or FALSE:) Soundness means that if the propositions inputed to the rule are true then the output propositions are guaranteed to be true. l That is, the rule is truth-preserving.

PS Rules are (usually) Not Sound uAlthough productions (= rules in production systems) can in principle be of any type whatsoever, they are usually domain dependent (e.g., are about doors, fridges, hands, …) and unsound (they often merely encode defaults).  l IF in(a, room1)  holds0(a, x) THEN in(x, room1) uFor clarity on following slides I am now going to change rule notation. Instead of the above we will write: l IF-HAVE in(a, room1) AND-HAVE holds0(a, x) THEN-HAVE in(x, room1)

Modus Ponens: A Basic Sound (and Domain- Independent) Inference Rule uMP could be expressed as follows:  IF-HAVE A AND-HAVE A  B THEN-HAVE B. with the understanding that A and B are variables that can be bound to propositions in a KB. Such variables are usually called meta-variables to distinguish them from the usual variables that may occur within the propositions. u But the traditional way to express it is:  A, A  B B

Some Other Example Rules (in non-traditional IF-THEN form)   uModus tollens (MT): IF-HAVE  B AND-HAVE A  B THEN-HAVE  A. uRules similar to MP and MT but involving the double-implication connective.  uConjunction elimination: IF-HAVE A  B THEN-HAVE A, B.  uConjunction introduction: IF-HAVE A AND-HAVE B THEN-HAVE A  B.  uDisjunction introduction (one case): IF-HAVE A THEN-HAVE A  B.  uCommutativity of conjunction: IF-HAVE A  B THEN-HAVE B  A. uMany other possibilities. uThe above rules all apply to Propositional Logic as well as Predicate Logic, but …..

Towards A Rule involving Variable Instantiation u We’d like to be able to go from, say,  (  p) (is-shop(p)  likes(Sally, p)) and, say, is-shop(Gap) to likes(Sally, Gap). uCan do this by first “instantiating” the variable p to get  is-shop(Gap)  likes(Sally, Gap)) and then using MP.