March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation.

Slides:



Advertisements
Similar presentations
Artificial Intelligence Chapter 13 The Propositional Calculus Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
Advertisements

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.
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
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.
Logic.
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
Computability and Complexity 9-1 Computability and Complexity Andrei Bulatov Logic Reminder (Cnt’d)
Syllabus Every Week: 2 Hourly Exams +Final - as noted on Syllabus
Knowledge Representation I (Propositional Logic) CSE 473.
November 5, 2009Introduction to Cognitive Science Lecture 16: Symbolic vs. Connectionist AI 1 Symbolism vs. Connectionism There is another major division.
Knoweldge Representation & Reasoning
Let remember from the previous lesson what is Knowledge representation
CS 4700: Foundations of Artificial Intelligence
Chapter 3 Propositional Logic
Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus Artificial Intelligence Chapter 14 Resolution in the Propositional Calculus.
1 Knowledge Representation and Reasoning. 2 Knowledge Representation & Reasoning How knowledge about the world can be represented How knowledge about.
Fall 2002CMSC Discrete Structures1 Let’s proceed to… Mathematical Reasoning.
Adapted from Discrete Math
I NTRO TO L OGIC Dr Shlomo Hershkop March
Intro to Discrete Structures
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.
March 3, 2015Applied Discrete Mathematics Week 5: Mathematical Reasoning 1Arguments Just like a rule of inference, an argument consists of one or more.
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
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
Propositional Logic Dr. Rogelio Dávila Pérez Profesor-Investigador División de Posgrado Universidad Autónoma Guadalajara
SSK3003 DISCRETE STRUCTURES
LECTURE LECTURE Propositional Logic Syntax 1 Source: MIT OpenCourseWare.
1 Introduction to Abstract Mathematics Expressions (Propositional formulas or forms) Instructor: Hayk Melikya
October 17, 2012Introduction to Artificial Intelligence Lecture 11: Knowledge Representation and Reasoning I 1Semantics In propositional logic, we associate.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
CS6133 Software Specification and Verification
Artificial Intelligence “Introduction to Formal Logic” Jennifer J. Burg Department of Mathematics and Computer Science.
11 Artificial Intelligence CS 165A Thursday, October 25, 2007  Knowledge and reasoning (Ch 7) Propositional logic 1.
CS2351 Artificial Intelligence Bhaskar.V Class Notes on Knowledge Representation - Logical Agents.
Chapter 7. Propositional and Predicate Logic Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part B Propositional Logic.
First-Order Logic Semantics Reading: Chapter 8, , FOL Syntax and Semantics read: FOL Knowledge Engineering read: FOL.
Propositional Logic Rather than jumping right into FOL, we begin with propositional logic A logic involves: §Language (with a syntax) §Semantics §Proof.
ARTIFICIAL INTELLIGENCE Lecture 2 Propositional Calculus.
Artificial Intelligence Chapter 13 The Propositional Calculus Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
1 Propositional Proofs 1. Problem 2 Deduction In deduction, the conclusion is true whenever the premises are true.  Premise: p Conclusion: (p ∨ q) 
Artificial Intelligence Logical Agents Chapter 7.
CS.462 Artificial Intelligence SOMCHAI THANGSATHITYANGKUL Lecture 04 : Logic.
Chapter 7. Propositional and Predicate Logic
Knowledge Representation and Reasoning
Discrete Mathematics Logic.
The Propositional Calculus
ARTIFICIAL INTELLIGENCE
Semantics In propositional logic, we associate atoms with propositions about the world. We specify the semantics of our logic, giving it a “meaning”. Such.
CS201: Data Structures and Discrete Mathematics I
Mathematical Reasoning
Artificial Intelligence
Resolution And yet Another Example:
CS 220: Discrete Structures and their Applications
Applied Discrete Mathematics Week 1: Logic
CS 416 Artificial Intelligence
Back to “Serious” Topics…
Discrete Mathematics Logic.
Logical Agents Chapter 7.
Chapter 7. Propositional and Predicate Logic
CSNB234 ARTIFICIAL INTELLIGENCE
Propositional Logic CMSC 471 Chapter , 7.7 and Chuck Dyer
ece 720 intelligent web: ontology and beyond
Mathematical Reasoning
CS201: Data Structures and Discrete Mathematics I
Logical Agents Chapter 7 Andreas Geyer-Schulz and Chuck Dyer
Presentation transcript:

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 1 Back to “Serious” Topics… Knowledge Representation and Reasoning

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 2 Knowledge Representation & Reasoning Knowledge representation is the study of how knowledge about the world can be represented and what kinds of reasoning can be done with that knowledge. We will discuss two different systems that are commonly used to represent knowledge in machines and perform algorithmic reasoning: Propositional calculus Propositional calculus Predicate calculus Predicate calculus

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 3 Propositional Calculus In propositional calculus, features of the world are represented by propositions, features of the world are represented by propositions, relationships between features (constraints) are represented by connectives. relationships between features (constraints) are represented by connectives.Example: LECTURE_BORING  TIME_LATE  SLEEP This expression in propositional calculus represents the fact that for some agent in our world, if the features LECTURE_BORING and TIME_LATE are both true, the feature SLEEP is also true.

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 4 Propositional Calculus You see that the language of propositional calculus can be used to represent aspects of the world. When there are a language, as defined by a syntax, a language, as defined by a syntax, inference rules for manipulating sentences in that language, and inference rules for manipulating sentences in that language, and semantics for associating elements of the language with elements of the world, semantics for associating elements of the language with elements of the world, then we have a system called logic.

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 5 The Language Atoms: The atoms T and F and all strings that begin with a capital letter, for instance, P, Q, LECTURE_BORING, and so on. Connectives:  “or”  “or”  “and”  “and”  “implies” or “if-then”  “implies” or “if-then”  “not”  “not”

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 6 The Language Syntax of well-formed formulas (wffs): Any atom is a wff. Any atom is a wff. If  1 and  2 are wffs, so are If  1 and  2 are wffs, so are  1   2 (conjunction)  1   2 (disjunction)  1   2 (implication)  1 (negation) There are no other wffs. There are no other wffs.

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 7 The Language Atoms and negated atoms are called literals. Atoms and negated atoms are called literals. In  1   2,  1 is called the antecedent, and  2 is called the consequent of the implication. In  1   2,  1 is called the antecedent, and  2 is called the consequent of the implication. Examples of wffs (sentences): Examples of wffs (sentences): (P  Q)   P P   P P  P  P (P  Q)  (  Q   P)  P  P The precedence order of the above operators is     For example,  P  Q  R means ((  P)  Q)  R. The precedence order of the above operators is     For example,  P  Q  R means ((  P)  Q)  R.

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 8 Rules of Inference We use rules of inference to generate new wffs from existing ones. One important rule is called modus ponens or the law of detachment. It is based on the tautology (P  (P  Q))  Q. We write it in the following way: P P  Q _____  Q Q Q Q The two hypotheses P and P  Q are written in a column, and the conclusion below a bar, where  means “therefore”.

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 9 Rules of Inference P______  PQ PQ PQ PQ Addition PQ PQ PQ PQ_____  P P P P Simplification P Q______  PQ PQ PQ PQ Conjunction Q Q Q Q P  Q P  Q_____  P P P P Modus tollens P  Q P  Q Q  R Q  R_______  P  R Hypothetical syllogism PQ PQ PQ PQ P P P P_____  Q Q Q Q Disjunctive syllogism

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 10Proofs The sequence of wffs {  1,  2, …,  n } is called a proof (or a deduction) of  n from a set of wffs  iff (if and only if) each  i in the sequence is either in  or can be inferred from one or more wffs earlier in the sequence by using one of the rules of inference. If there is a proof of  n from , we say that  n is a theorem of the set . We use the following notation:  | _  n In this notation, we can also indicate the set of inference rules R that we use:  | _ R  n

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 11ProofsExample: Given a set of wffs  = {P, R, P  Q}, the following sequence is a proof of Q  R given the inference rules that we discussed earlier: {P, P  Q, Q, R, Q  R} Tree representation: P P  Q Q R Q  R

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 12Semantics In propositional logic, we associate atoms with propositions about the world.In propositional logic, we associate atoms with propositions about the world. We thereby specify the semantics of our logic, giving it a “meaning”.We thereby specify the semantics of our logic, giving it a “meaning”. Such an association of atoms with propositions is called an interpretation.Such an association of atoms with propositions is called an interpretation. In a given interpretation, the proposition associated with an atom is called the denotation of that atom.In a given interpretation, the proposition associated with an atom is called the denotation of that atom. Under a given interpretation, atoms have values – True or False. We are willing to accept this idealization (otherwise: fuzzy logic).Under a given interpretation, atoms have values – True or False. We are willing to accept this idealization (otherwise: fuzzy logic).

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 13SemanticsExample: “Gary is either intelligent or a good actor. If Gary is intelligent, then he can count from 1 to 10. Gary can only count from 1 to 2. Therefore, Gary is a good actor.” Propositions: I: “Gary is intelligent.” A: “Gary is a good actor.” C: “Gary can count from 1 to 10.”

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 14Semantics I: “Gary is intelligent.” A: “Gary is a good actor.” C: “Gary can count from 1 to 10.” Step 1:  CHypothesis Step 2: I  C Hypothesis Step 3:  I Modus Tollens Steps 1 & 2 Step 4: A  IHypothesis Step 5: ADisjunctive Syllogism Steps 3 & 4 Conclusion: A (“Gary is a good actor.”)

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 15Semantics In propositional logic, we associate atoms with propositions about the world.In propositional logic, we associate atoms with propositions about the world. We thereby specify the semantics of our logic, giving it a “meaning”.We thereby specify the semantics of our logic, giving it a “meaning”. Such an association of atoms with propositions is called an interpretation.Such an association of atoms with propositions is called an interpretation. In a given interpretation, the proposition associated with an atom is called the denotation of that atom.In a given interpretation, the proposition associated with an atom is called the denotation of that atom. Under a given interpretation, atoms have values – True or False. We are willing to accept this idealization (otherwise: fuzzy logic).Under a given interpretation, atoms have values – True or False. We are willing to accept this idealization (otherwise: fuzzy logic).

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 16Semantics We say that an interpretation satisfies a wff if the wff is assigned the value True under that interpretation.We say that an interpretation satisfies a wff if the wff is assigned the value True under that interpretation. An interpretation that satisfies a wff is called a model of that wff.An interpretation that satisfies a wff is called a model of that wff. An interpretation that satisfies each wff in a set of wffs is called a model of that set.An interpretation that satisfies each wff in a set of wffs is called a model of that set. The more wffs we have that describe the world, the fewer models there are.The more wffs we have that describe the world, the fewer models there are. This means that the more we know about the world, the less uncertainty there is.This means that the more we know about the world, the less uncertainty there is.

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 17Semantics If no interpretation satisfies a wff (or a set of wffs), the wff is said to be inconsistent or unsatisfiable, for example, P   P.If no interpretation satisfies a wff (or a set of wffs), the wff is said to be inconsistent or unsatisfiable, for example, P   P. A wff is said to be valid if it has value True under all interpretations of its constituent atoms, for example, P   P.A wff is said to be valid if it has value True under all interpretations of its constituent atoms, for example, P   P. Neither valid wffs nor inconsistent wffs tell us anything about the world.Neither valid wffs nor inconsistent wffs tell us anything about the world.

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 18Semantics Two wffs are said to be equivalent if and only if their truth values are identical under all interpretations. For two equivalent wffs  1 and  2 we write  1   2.Two wffs are said to be equivalent if and only if their truth values are identical under all interpretations. For two equivalent wffs  1 and  2 we write  1   2. If a wff  has value True under all of those interpretations for which each of the wffs in a set  has value True, then we say thatIf a wff  has value True under all of those interpretations for which each of the wffs in a set  has value True, then we say that –  logically entails  –  logically follows from  –  is a logical consequence of  –  |= 

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 19 Soundness and Completeness If, for any set of wffs  and wff ,  | _ R  implies  |= , we say that the set of inference rules R is sound.If, for any set of wffs  and wff ,  | _ R  implies  |= , we say that the set of inference rules R is sound. If, for any set of wffs  and wff , it is the case that whenever  |= , there exists a proof of  from  using the set of inference rules R, we say that R is complete.If, for any set of wffs  and wff , it is the case that whenever  |= , there exists a proof of  from  using the set of inference rules R, we say that R is complete. When R is sound and complete, we can determine whether one wff follows from a set of wffs by searching for a proof instead of using a truth table (increased efficiency).When R is sound and complete, we can determine whether one wff follows from a set of wffs by searching for a proof instead of using a truth table (increased efficiency).

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 20Resolution Multiple rules of inference can be combined into one rule, called resolution.Multiple rules of inference can be combined into one rule, called resolution. A clause is a set of literals, which is a short notation for the disjunction of all the literals in the set. For example, the wff {P, Q,  R} is the same as the wff P  Q   R.A clause is a set of literals, which is a short notation for the disjunction of all the literals in the set. For example, the wff {P, Q,  R} is the same as the wff P  Q   R. The empty clause { } (or NIL) is equivalent to F.The empty clause { } (or NIL) is equivalent to F. A conjunction of clauses is a set of clauses that is connected by AND connectives. For example, {R, P}, {  P, Q}, {R} stands for (R  P)  (  P  Q)  R.A conjunction of clauses is a set of clauses that is connected by AND connectives. For example, {R, P}, {  P, Q}, {R} stands for (R  P)  (  P  Q)  R. Resolution operates on such conjunctions of clauses.Resolution operates on such conjunctions of clauses.

March 3, 2016Introduction to Artificial Intelligence Lecture 12: Knowledge Representation & Reasoning I 21ResolutionP. In other words: {R}, {  R, P} yields {P}. Resolution rule for the propositional calculus: From clauses { }   1 and {  }   2 (where  1 and  2 are sets of literals and is an atom), we can infer  1   2, which is called the resolvent of the two clauses. The atom is the atom resolved upon, and the process is called resolution. Examples: Resolving R  P and  P  Q yields R  Q. In other words: {R, P}, {  P, Q} yields {R, Q}. Resolving R  P and  P  Q yields R  Q. In other words: {R, P}, {  P, Q} yields {R, Q}. Resolving R and  R  P yields Resolving R and  R  P yields