CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 17, 18: Predicate Calculus 15.

Slides:



Advertisements
Similar presentations
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 12–Prolog examples: Himalayan club, member, rem_duplicate,
Advertisements

CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 10– Club and Circuit Examples.
Standard Logical Equivalences
First-Order Logic (FOL) aka. predicate calculus. First-Order Logic (FOL) Syntax User defines these primitives: – Constant symbols (i.e., the "individuals"
First Order Logic Resolution
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 9,10,11- Logic; Deduction Theorem 23/1/09 to 30/1/09.
Logic Use mathematical deduction to derive new knowledge.
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
CS344: Artificial Intelligence
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–5 and 6: Propositional Calculus.
Logic Concepts Lecture Module 11.
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 7– Predicate Calculus and Knowledge Representation.
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–28, 29: Predicate Calculus;
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 10a- knowledge representation.
1 Applied Computer Science II Resolution in FOL Luc De Raedt.
1 Automated Reasoning Introduction to Weak Methods in Theorem Proving 13.1The General Problem Solver and Difference Tables 13.2Resolution Theorem.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 21– Predicate Calculus and Knowledge Representation 7 th September,
Artificial Intelligence
Artificial Intelligence Chapter 17 Knowledge-Based Systems Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus.
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 22, 23- Prolog.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
Conjunctive normal form: any formula of the predicate calculus can be transformed into a conjunctive normal form. Def. A formula is said to be in conjunctive.
1 COSC3306: Programming Paradigms Lecture 8: Declarative Programming Specifications Haibin Zhu, Ph.D. Computer Science Nipissing University (C) 2003.
Pattern-directed inference systems
Logical Agents Logic Propositional Logic Summary
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 28– Interpretation; Herbrand Interpertation 30 th Sept, 2010.
CS344 Artificial Intelligence Prof. Pushpak Bhattacharya Class on 5 Mar 2007.
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 19: Interpretation in Predicate.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 15, 16: Predicate Calculus 8.
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–4: Fuzzy Control of Inverted.
CS621 : Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 9 Continuation of Logic and Semantic Web.
The AI War LISP and Prolog Basic Concepts of Logic Programming
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–7, 9, 10,14: Predicate calculus.
CPSC 386 Artificial Intelligence Ellen Walker Hiram College
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–7: (a) Formal System;(b) How to read research papers 3 rd August, 2010.
CS621: Artificial Intelligence Lecture 28: Propositional calculus; Puzzle Solving Pushpak Bhattacharyya Computer Science and Engineering Department IIT.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 9- Completeness proof; introducing knowledge representation.
CS621: Artificial Intelligence
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 14: AI, Logic, and Puzzle Solving.
Backward chaining Assume the same representation of rules as in forward chaining, i.e. If is true, is true, … is true Then is true. Rule interpretation.
Prof. Pushpak Bhattacharyya, IIT Bombay 1 CS 621 Artificial Intelligence Lecture /08/05 Prof. Pushpak Bhattacharyya Fuzzy Logic Application.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 35–Himalayan Club example; introducing Prolog.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
CS 344 Artificial Intelligence By Prof: Pushpak Bhattacharya Class on 26/Feb/2007.
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 4- Logic.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–6: Propositional calculus, Semantic Tableau, formal System 2 nd August,
CS621: Artificial Intelligence
CS 621 Artificial Intelligence Lecture 1 – 28/07/05
CS 621 Artificial Intelligence Lecture 4 – 05/08/05
Logic Use mathematical deduction to derive new knowledge.
Biointelligence Lab School of Computer Sci. & Eng.
Back to “Serious” Topics…
Biointelligence Lab School of Computer Sci. & Eng.
CS621: Artificial Intelligence
CSNB234 ARTIFICIAL INTELLIGENCE
CS621 : Artificial Intelligence
CS621: Artificial Intelligence
CS621: Artificial Intelligence
CS621: Artificial Intelligence
CS621: Artificial Intelligence
Prof. Pushpak Bhattacharyya, IIT Bombay
Artificial Intelligence
Artificial Intelligence
Presentation transcript:

CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 17, 18: Predicate Calculus 15 th and 16 th Feb, 2011

Predicate Calculus: well known examples Man is mortal : rule ∀ x[man(x) → mortal(x)] shakespeare is a man man(shakespeare) To infer shakespeare is mortal mortal(shakespeare)

Inferencing: Forward Chaining man(x) → mortal(x) Dropping the quantifier, implicitly Universal quantification assumed man(shakespeare) Goal mortal(shakespeare) Found in one step x = shakespeare, unification

Backward Chaining man(x) → mortal(x) Goal mortal(shakespeare) x = shakespeare Travel back over and hit the fact asserted man(shakespeare)

Factors influencing Forward and Backward chaining Is the goal precisely known? Fan-in and Fan-out of rules.

Rule Structure R 1 : P 1 ^ P 2 ^ P 3 ^ ^ Pn Q 1 R 2 : P 1 ^ P 2 ^ P 3 ^ ^ Pn Q 2. R k : P 1 ^ P 2 ^ P 3 ^ ^ Pn Q k P 1 P 2. Pn AND OR Q 1 Q 2. Q k

Pictorial Representation of Forward and Backward chaining P 1 P 2.. Pn Q 1 Q 1 P1P1 P2P2 PkPk M1 M2 Mk AND If Fan-out is less Forward chaining is preferable ? Forward Chaining Backward Chaining

Important Data structure: AND-OR Graph S A BC D A1A1 A2A2 A3A3 AnAn B1B1 B2B2 B3B3 C1C1 C2C2 D1D1 D2D2 DnDn D3D3 AND OR Structure of AND-OR Graph decides the direction of inferencing.

Resolution - Refutation man(x) → mortal(x) Convert to clausal form ~man(shakespeare) \/ mortal(x) Clauses in the knowledge base ~man(shakespeare) \/ mortal(x) man(shakespeare) mortal(shakespeare)

Resolution – Refutation contd Negate the goal ~man(shakespeare) Get a pair of resolvents

Resolution Tree

Search in resolution Heuristics for Resolution Search Goal Supported Strategy Always start with the negated goal Set of support strategy Always one of the resolvents is the most recently produced resolute

Inferencing in Predicate Calculus Forward chaining Given P,, to infer Q P, match L.H.S of Assert Q from R.H.S Backward chaining Q, Match R.H.S of assert P Check if P exists Resolution – Refutation Negate goal Convert all pieces of knowledge into clausal form (disjunction of literals) See if contradiction indicated by null clause can be derived

1. P 2. converted to 3. Draw the resolution tree (actually an inverted tree). Every node is a clausal form and branches are intermediate inference steps.

Theoretical basis of Resolution Resolution is proof by contradiction resolvent1.AND. resolvent2 => resolute is a tautology

Tautologiness of Resolution Using Semantic Tree Contradiction

Theoretical basis of Resolution (cont …) Monotone Inference Size of Knowledge Base goes on increasing as we proceed with resolution process since intermediate resolvents added to the knowledge base Non-monotone Inference Size of Knowledge Base does not increase Human beings use non-monotone inference

Terminology Pair of clauses being resolved is called the Resolvents. The resulting clause is called the Resolute. Choosing the correct pair of resolvents is a matter of search.

Wh-Questions and Knowledge what how why where which who when Factoid / Declarative procedural Reasoning

Fixing Predicates Natural Sentences Verb(subject,object) predicate(subject)

Examples Ram is a boy Boy(Ram)? Is_a(Ram,boy)? Ram Playes Football Plays(Ram,football)? Plays_football(Ram)?

Knowledge Representation of Complex Sentence “In every city there is a thief who is beaten by every policeman in the city”

Himalayan Club example Introduction through an example (Zohar Manna, 1974): Problem: A, B and C belong to the Himalayan club. Every member in the club is either a mountain climber or a skier or both. A likes whatever B dislikes and dislikes whatever B likes. A likes rain and snow. No mountain climber likes rain. Every skier likes snow. Is there a member who is a mountain climber and not a skier? Given knowledge has: Facts Rules

Example contd. Let mc denote mountain climber and sk denotes skier. Knowledge representation in the given problem is as follows: 1. member(A) 2. member(B) 3. member(C) 4. ∀ x[member(x) → (mc(x) ∨ sk(x))] 5. ∀ x[mc(x) → ~like(x,rain)] 6. ∀ x[sk(x) → like(x, snow)] 7. ∀ x[like(B, x) → ~like(A, x)] 8. ∀ x[~like(B, x) → like(A, x)] 9. like(A, rain) 10. like(A, snow) 11. Question: ∃ x[member(x) ∧ mc(x) ∧ ~sk(x)] We have to infer the 11 th expression from the given 10. Done through Resolution Refutation.

Club example: Inferencing 1. member(A) 2. member(B) 3. member(C) 4. – Can be written as – 5. – 6. – 7. –

8. – – Negate–

Now standardize the variables apart which results in the following 1. member(A) 2. member(B) 3. member(C)

Interpretation in Logic Logical expressions or formulae are “FORMS” (placeholders) for whom contents are created through interpretation. Example: This is a Second Order Predicate Calculus formula. Quantification on ‘F’ which is a function.

Interpretation:1 D=N (natural numbers) a = 0 and b = 1 x ∈ N P(x) stands for x > 0 g(m,n) stands for (m x n) h(x) stands for (x – 1) Above interpretation defines Factorial Examples

Interpretation:2 D={strings) a = b = λ P(x) stands for “x is a non empty string” g(m, n) stands for “append head of m to n” h(x) stands for tail(x) Above interpretation defines “reversing a string” Examples (contd.)