CS621: Artificial Intelligence

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

AE1APS Algorithmic Problem Solving John Drake. The island of Knights and Knaves is a fictional island to test peoples ability to reason logically. There.
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 10– Club and Circuit Examples.
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.
CS344: Artificial Intelligence
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–5 and 6: Propositional Calculus.
CS621 : Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 12- Completeness Proof; Self References and Paradoxes 16 th August,
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 7– Predicate Calculus and Knowledge Representation.
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–1: Introduction 2 nd January
Let remember from the previous lesson what is Knowledge representation
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 21– Predicate Calculus and Knowledge Representation 7 th September,
CS621: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–4: Fuzzy Inferencing 29 th July 2010.
CS621: Artificial Intelligence Lecture 27: Backpropagation applied to recognition problems; start of logic Pushpak Bhattacharyya Computer Science and Engineering.
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.
Lecture 5 Knights and Knaves.. Administration Show hand in form. Show plagiarism form. Any problems with coursework? Google knight and knaves and look.
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 17, 18: Predicate Calculus 15.
Artificial Intelligence: Introduction Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
MATH 224 – Discrete Mathematics
CS621 : Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 12- Completeness Proof; Self References and Paradoxes 16 th August,
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 15, 16: Predicate Calculus 8.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
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.
CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–3: Fuzzy Inferencing: Inverted.
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.
Dr. Naveed Riaz Design and Analysis of Algorithms 1 1 Formal Methods in Software Engineering Lecture # 25.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 35–Himalayan Club example; introducing Prolog.
CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture–10: Soundness of Propositional Calculus 12 th August, 2010.
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.
Artificial Intelligence Logical Agents Chapter 7.
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,
CS344 : Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 5- Deduction Theorem.
CS621: Artificial Intelligence
Chapter 7. Propositional and Predicate Logic
CS344: Introduction to Artificial Intelligence (associated lab: CS386)
CSE15 Discrete Mathematics 01/23/17
Knowledge Representation and Reasoning
CS621: Artificial Intelligence
CS 621 Artificial Intelligence Lecture 1 – 28/07/05
Proposition & Predicates
Liar liar.
Chapter 1 The Foundations: Logic and Proof, Sets, and Functions
CS 621 Artificial Intelligence Lecture 4 – 05/08/05
CHAPTER 1: LOGICS AND PROOF
Knowledge and reasoning – second part
Back to “Serious” Topics…
CS621: Artificial Intelligence
Chapter 7. Propositional and Predicate Logic
Knowledge Representation I (Propositional Logic)
CS621 : Artificial Intelligence
Foundations of Discrete Mathematics
ece 720 intelligent web: ontology and beyond
CS621: Artificial Intelligence
CS621: Artificial Intelligence
CS344 : Introduction to Artificial Intelligence
Logical and Rule-Based Reasoning Part I
CS621: Artificial Intelligence
Representations & Reasoning Systems (RRS) (2.2)
Artificial Intelligence
CS 621 Artificial Intelligence Lecture /09/05 Prof
Artificial Intelligence
Habib Ullah qamar Mscs(se)
Propositional Satisfiability
Presentation transcript:

CS621: Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 8– Logic and Intelligent Question Answering (puzzle solving)

From Predicate Calculus Problem-1 From Predicate Calculus

Club Example (Zohar Manna, 1974) Facts and Rules: 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. Question: Is there a member who is a mountain climber and not a skier?

Solution step-1: Knowledge Extraction Let mc denote mountain climber and sk denotes skier. Knowledge representation in the given problem is as follows: member(A) member(B) member(C) ∀x[member(x) → (mc(x) ∨ sk(x))] ∀x[mc(x) → ~like(x,rain)] ∀x[sk(x) → like(x, snow)] ∀x[like(B, x) → ~like(A, x)] ∀x[~like(B, x) → like(A, x)] like(A, rain) like(A, snow) Question: ∃x[member(x) ∧ mc(x) ∧ ~sk(x)] We have to infer the 11th expression from the given 10. Done through Resolution Refutation.

Step-2: Conversion to Clausal Form member(A) member(B) member(C) Can be written as

Negate–

Step-3: standardizing the variables apart member(A) member(B) member(C)

10 7 12 5 4 13 14 2 11 15 16 13 2 17

From predicate calculus Problem-2 From predicate calculus

A “department” environment Dr. X is the HoD of CSE Y and Z work in CSE Dr. P is the HoD of ME Q and R work in ME Y is married to Q By Institute policy staffs of the same department cannot marry All married staff of CSE are insured by LIC HoD is the boss of all staff in the department

Diagrammatic representation CSE ME Dr. P Dr. X Z Y R Q married

Questions on “department” Who works in CSE? Is there a married person in ME? Is there somebody insured by LIC?

Problem-3 (Zohar Manna, Mathematical Theory of Computation, 1974) From Propositional Calculus

Tourist in a country of truth-sayers and liers Facts and Rules: In a certain country, people either always speak the truth or always lie. A tourist T comes to a junction in the country and finds an inhabitant S of the country standing there. One of the roads at the junction leads to the capital of the country and the other does not. S can be asked only yes/no questions. Question: What single yes/no question can T ask of S, so that the direction of the capital is revealed?

Diagrammatic representation Capital S (either always says the truth Or always lies) T (tourist)

Deciding the Propositions: a very difficult step- needs human intelligence P: Left road leads to capital Q: S always speaks the truth

Meta Question: What question should the tourist ask The form of the question Very difficult: needs human intelligence The tourist should ask Is R true? The answer is “yes” if and only if the left road leads to the capital The structure of R to be found as a function of P and Q

A more mechanical part: use of truth table Q S’s Answer R T Yes F No

Get form of R: quite mechanical From the truth table R is of the form (P x-nor Q) or (P ≡ Q)

Get R in English/Hindi/Hebrew… Natural Language Generation: non-trivial The question the tourist will ask is Is it true that the left road leads to the capital if and only if you speak the truth? Exercise: A more well known form of this question asked by the tourist uses the X-OR operator instead of the X-Nor. What changes do you have to incorporate to the solution, to get that answer?

From Propositional Calculus Problem-4 From Propositional Calculus

Another tourist example: this time in a restaurant setting in a different country (Manna, 1974) Facts: A tourist is in a restaurant in a country when the waiter tells him: “do you see the three men in the table yonder? One of them is X who always speaks the truth, another is Y who always lies and the third is Z who sometimes speaks the truth and sometimes lies, i.e., answers yes/no randomly without regard to the question. Question: Can you (the tourist) ask three yes/no questions to these men, always indicating who should answer the question, and determine who of them is X, who y and who Z?

Solution: Most of the steps are doable by humans only Number the persons: 1, 2, 3 1 can be X/Y/Z 2 can be X/Y/Z 3 can be X/Y/Z Let the first question be to 1 One of 2 and 3 has to be NOT Z. Critical step in the solution: only humans can do?

Now cast the problem in the same setting as the tourist and the capital example Solving by analogy Use of previously solved problems Hallmark of intelligence

Analogy with the tourist and the capital problem Find the direction to the capital  Find Z; who amongst 1, 2 and 3 is Z? Ask a single yes/no question to S (the person standing at the junction)  Ask a single yes/no question to 1 Answer forced to reveal the direction of the capital  Answer forced to reveal who from 1,2,3 is Z

Question to 1 Ask “Is R true” and the answer is yes if and only if 2 is not Z Propositions P: 2 is not Z Q: 1 always speaks the truth, i.e., 1 is X

Use of truth table as before P Q 1’s Answer R T Yes F No

Question to 1: the first question Is it true that 2 is not Z if and only if you are X?

Analysis of 1’s answer Ans= yes Case 1: 1 is X/Y (always speaks the truth or always lies) 2 is indeed not Z (we can trust 1’s answer) Case 2: 1 is Z 2 is indeed not Z (we cannot trust 1’s answer; but that does not affect us)

Analysis of 1’s answer (contd) Ans= no Case 1: 1 is X/Y (always speaks the truth or always lies) 2 is Z; hence 3 is not Z Case 2: 1 is Z 3 is not Z Note carefully: how cleverly Z is identified. Can a machine do it?

Next steps: ask the 2nd question to determine X/Y Once “Not Z” is identified- say 2, ask him a tautology Is P≡P If yes, 2 is X If no, 2 is Y

Ask the 3rd Question Ask 2 “is 1 Z” If 2 is X If 2 is Y (always lies) Ans=yes, 1 is Z Ans=no, 1 is Y If 2 is Y (always lies) Ans=yes, 1 is X Ans=no, 1 is Z 3 is the remaining person

What do these examples show? Logic systematizes the reasoning process Helps identify what is mechanical/routine/automatable Brings to light the steps that only human intelligence can perform These are especially of foundational and structural nature (e.g., deciding what propositions to start with) Algorithmizing reasoning is not trivial

Assignment on Deduction, Induction and Abduction

Guidelines for submission Deduction Induction Abduction Survival Efficiency Life Quality Inference method task

Fill the cells Put a tick in the cell <i, j> if the inference method j is needed for the task i. Support the decision with an appropriate example Before doing the task provide your Definitions References (work that you have studied for doing the assignment)