1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.

Slides:



Advertisements
Similar presentations
Inference Rules Universal Instantiation Existential Generalization
Advertisements

Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
1 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 20
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.
Logic Use mathematical deduction to derive new knowledge.
Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
Resolution Theorem Proving
Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Logic.
Logic Concepts Lecture Module 11.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
ITCS 3153 Artificial Intelligence Lecture 11 Logical Agents Chapter 7 Lecture 11 Logical Agents Chapter 7.
Knowledge Representation & Reasoning (Part 1) Propositional Logic chapter 6 Dr Souham Meshoul CAP492.
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Knowledge Representation I (Propositional Logic) CSE 473.
Knowledge in intelligent systems So far, we’ve used relatively specialized, naïve agents. How can we build agents that incorporate knowledge and a memory?
Methods of Proof Chapter 7, second half.
Knoweldge Representation & Reasoning
Knowledge Representation & Reasoning (Part 1) Propositional Logic chapter 5 Dr Souham Meshoul CAP492.
Let remember from the previous lesson what is Knowledge representation
Logical Agents Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2005.
Chapter 3 Propositional Logic
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
I NTRO TO L OGIC Dr Shlomo Hershkop March
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.
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.
Propositional Resolution Computational LogicLecture 4 Michael Genesereth Spring 2005.
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 19, 2012.
Knowledge Representation Use of logic. Artificial agents need Knowledge and reasoning power Can combine GK with current percepts Build up KB incrementally.
Pattern-directed inference systems
Logical Agents Logic Propositional Logic Summary
Propositional Calculus – Methods of Proof Predicate Calculus Math Foundations of Computer Science.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
지식표현 Agent that reason logically
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM]
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
LECTURE LECTURE Propositional Logic Syntax 1 Source: MIT OpenCourseWare.
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
CS6133 Software Specification and Verification
Artificial Intelligence 7. Making Deductive Inferences Course V231 Department of Computing Imperial College, London Jeremy Gow.
Propositional Logic Predicate Logic
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Reasoning with Propositional Logic automated processing of a simple knowledge base CD.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part B Propositional Logic.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Logical Agents Chapter 7 Part I. 2 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic.
1 Propositional Proofs 1. Problem 2 Deduction In deduction, the conclusion is true whenever the premises are true.  Premise: p Conclusion: (p ∨ q) 
Knowledge Repn. & Reasoning Lecture #9: Propositional Logic UIUC CS 498: Section EA Professor: Eyal Amir Fall Semester 2005.
March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.
Artificial Intelligence Logical Agents Chapter 7.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
CS 4700: Foundations of Artificial Intelligence
Knowledge Representation and Reasoning
Propositional Logic Session 3
Logics for Data and Knowledge Representation
Knowledge Representation
Logical Inference: Through Proof to Truth
Logic Use mathematical deduction to derive new knowledge.
CS 416 Artificial Intelligence
Back to “Serious” Topics…
Methods of Proof Chapter 7, second half.
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
Presentation transcript:

1 Knowledge Representation

2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of facts about the world. Each representation is a sentence. Each representation is a sentence. Knowledge Representation Knowledge Representation Expressing knowledge in a form that can be manipulated by a computer. Expressing knowledge in a form that can be manipulated by a computer. Inference Mechanism Inference Mechanism Generates new sentences that are necessarily true given that the old sentences are true. Generates new sentences that are necessarily true given that the old sentences are true.

3 Two aspects of the Knowledge Representation language: Two aspects of the Knowledge Representation language: 1.Formal system of defining the world Syntax Syntax What constitutes a sentence What constitutes a sentence Semantics Semantics Meaning. Connects sentences to facts. Meaning. Connects sentences to facts. KB entails a (KB |= a) means when all sentences in KB are true, a is true. (|= means entailment) (|= means entailment) 2.A proof theory Rules for determining all entailments. Rules for determining all entailments. (KB |-- a) (KB |-- a)

4 KR Languages Logic Logic Propositional Logic Propositional Logic First Order Logic First Order Logic Production rules Production rules Structured Objects Structured Objects Semantic Nets Semantic Nets Frames Frames Script Script

5 Logic Logic is reasoning technique. It is the study of rules of inference and the principles of sound argument. Logic is reasoning technique. It is the study of rules of inference and the principles of sound argument. Much of the basis of Expert systems reasoning comes from logic

6 Reasoning(inferencing) Strategies Deduction Deduction Induction Induction Abduction Abduction

7Deduction This process takes general principles and applies the specific instances to infer a conclusion This process takes general principles and applies the specific instances to infer a conclusion All dogs have hair All dogs have hair Lassie is a dog Lassie is a dog We can deduce that Lassie has hair. We can deduce that Lassie has hair.

8 Deduction (cont…) Deduction uses major and minor premises Deduction uses major and minor premises A major premise can have many minor premises A major premise can have many minor premises All minor premises must be true for a deduction to be made. All minor premises must be true for a deduction to be made. This is a limitation of deduction This is a limitation of deduction

9Induction This process uses a number of established facts or premises to draw some general conclusion. This process uses a number of established facts or premises to draw some general conclusion Cat show all Siamese cats had blue eyes Cat show all Siamese cats had blue eyes Cat show all Siamese cats had blue eyes Cat show all Siamese cats had blue eyes Cat show all Siamese cats had blue eyes Cat show all Siamese cats had blue eyes. Conclusion all Siamese cats have blue eyes Conclusion all Siamese cats have blue eyes

10 Induction (cont…) Induction conclusions may not be entirely accurate Induction conclusions may not be entirely accurate only Siamese cats in Australia have blue eyes only Siamese cats in Australia have blue eyes Inferred conclusions may change as more facts are known Inferred conclusions may change as more facts are known

11Abduction A form of deductive inference which uses probability to determine most probable conclusion. A form of deductive inference which uses probability to determine most probable conclusion.

12 Abduction Example Major Premise Major Premise I do not jog when the temperature exceeds 38 degrees I do not jog when the temperature exceeds 38 degrees Minor Premise Minor Premise I did not jog today I did not jog today Conclusion Conclusion The temperature today is greater than 40 degrees The temperature today is greater than 40 degrees

13 Propositional Logic: Syntax A BNF (Backus-Naur Form) grammar of sentences in propositional logic. A BNF (Backus-Naur Form) grammar of sentences in propositional logic. Sentence  Atomic Sentence  Complex Sentence Atomic Sentence  True  False Atomic Sentence  True  False  P  Q  R  …  P  Q  R  … Complex Sentence  (Sentence)  Sentence Connective Sentence  Sentence Connective Sentence   Sentence   Sentence Connective         Connective        

14 Propositional Logic: Semantics Truth tables for the five logical connectives. Truth tables for the five logical connectives.

15 Propositional Logic: Rules of Inference Modus Ponens/Implication- Elimination: Modus Ponens/Implication- Elimination: From an implication and the premise of the implication, you can infer the conclusion From an implication and the premise of the implication, you can infer the conclusion   ,    ,   And-Elimination: And-Elimination: From a conjunction you can infer any of the conjuncts. From a conjunction you can infer any of the conjuncts.  1   2 ...   n  1   2 ...   n  i  i And-Introduction: And-Introduction: From a list you can infer their conjunction. From a list you can infer their conjunction.  1,  2,...,  n  1,  2,...,  n  1   2 ...   n  1   2 ...   n

16 Or-Introduction: Or-Introduction: From a sentence, you can infer its disjunction with anything else at all. From a sentence, you can infer its disjunction with anything else at all.  i  i  1   2 ...   n  1   2 ...   n Double-Negation Elimination: Double-Negation Elimination: From a doubly negated sentence, you can infer a positive sentence From a doubly negated sentence, you can infer a positive sentence    Unit Resolution: Unit Resolution: From a disjunction, if one of the disjuncts is false, then you can infer the other one is true. From a disjunction, if one of the disjuncts is false, then you can infer the other one is true.   ,     ,    Resolution: Resolution: This is the most difficult. Because  cannot be both true and false, one of the other disjuncts must be true in one of the premises. Or equivalently, implication is transitive. This is the most difficult. Because  cannot be both true and false, one of the other disjuncts must be true in one of the premises. Or equivalently, implication is transitive.   ,         ,               

17 Propositional Logic: Inference Resolution refutation theorem prover Resolution refutation theorem prover Inference mechanism for propositional logic Inference mechanism for propositional logic Refutation: Refutation: Recall that S |=  is defined as: Recall that S |=  is defined as: Whenever all sentences in S are true, than  is true as well. Whenever all sentences in S are true, than  is true as well. This is equivalent to saying that: This is equivalent to saying that: It impossible for S to be true and  to be false. It impossible for S to be true and  to be false.Or It is impossible for S and  to be true at the same time. It is impossible for S and  to be true at the same time. In a refutation theorem prover, in order to prove  from S, add  to S and try to derive a contradiction. In a refutation theorem prover, in order to prove  from S, add  to S and try to derive a contradiction.

18 Algorithm to prove S |=  : Algorithm to prove S |=  : 1.Rewrite S in clausal form. 2.Rewrite  in clausal form. 3.Using the various inference rules, derive the empty clause from the results of 1. and 2.

19 Clausal Form or CNF Conjunctive Normal Form (CNF). Conjunctive Normal Form (CNF). Representing a sentence as a conjunction of disjunctions. Representing a sentence as a conjunction of disjunctions. To do this: To do this: 1.Eliminate Implications Remember a  b   a  b Remember a  b   a  b 2.Push negation inwards  (a  b)   a   b  (a  b)   a   b  (a  b)   a   b  (a  b)   a   b (De Morgan’s Laws) 3.Eliminate double negations 4.Push disjunctions into conjunctions a  (b  c)  (a  b)  (a  c) a  (b  c)  (a  b)  (a  c)

20 Example: Converting to CNF Converting the following sentence to CNF: Converting the following sentence to CNF: (a   b)  (c  d) Steps: Steps: 1.Remove Implication  (a   b)  (c  d)  (a   b)  (c  d) 2.Push Negations Inwards  a    b  (c  d) 3.Eliminate Double Negations  a  b  (c  d) 4.Push Disjunctions into Conjunctions (  a  b  c)  (  a  b  d) CNF Represented in KB as the 2 clauses: Represented in KB as the 2 clauses: {  a  b  c} and {  a  b  d}

21 Example: Resolution Prove that r follows from: Prove that r follows from: (p  q)  (r  s) - (1) p   s - (2) p   s - (2) p  q - (3) p  q - (3) Solution: Solution: 1.Clause (1) in CNF  (p  q)  (r  s)  (p  q)  (r  s)  {  p   q  r  s} - (1) Clause (2) {  p   s} - (2) {  p   s} - (2) Clause (3) Clause (3) {p} - (3) {q} - (4)

22 Example (con’t) 2.Clause of r is {  r} - (5) 3.Using inference rules: {  p   q  s} - (6) {  p   q  s} - (6) from unit resolution rule of (1) and (5) {  q  s} - (7) from unit resolution of (3) and (6) {s} - (8) from (4) and (7) from (4) and (7) {  p} - (9) from (2) and (8) from (2) and (8) {} - (10) from (3) and (9) from (3) and (9) Therefore r follows from the original clauses Therefore r follows from the original clauses