Download presentation

Presentation is loading. Please wait.

Published byKaelyn Bucher Modified over 2 years ago

1
© 2002 Franz J. Kurfess Logic and Reasoning 1 CPE/CSC 481: Knowledge-Based Systems Dr. Franz J. Kurfess Computer Science Department Cal Poly

2
© 2002 Franz J. Kurfess Logic and Reasoning 2 Course Overview u Introduction u Knowledge Representation u Semantic Nets, Frames, Logic u Reasoning and Inference u Predicate Logic, Inference Methods, Resolution u Reasoning with Uncertainty u Probability, Bayesian Decision Making u Expert System Design u ES Life Cycle u CLIPS Overview u Concepts, Notation, Usage u Pattern Matching u Variables, Functions, Expressions, Constraints u Expert System Implementation u Salience, Rete Algorithm u Expert System Examples u Conclusions and Outlook

3
© 2002 Franz J. Kurfess Logic and Reasoning 3 Overview Logic and Reasoning u Motivation u Objectives u Knowledge and Reasoning u logic as prototypical reasoning system u syntax and semantics u validity and satisfiability u logic languages u Reasoning Methods u propositional and predicate calculus u inference methods u Knowledge Representation and Reasoning Methods u Production Rules u Semantic Nets u Schemata and Frames u Logic u Important Concepts and Terms u Chapter Summary

4
© 2002 Franz J. Kurfess Logic and Reasoning 4 Logistics u Term Project u Lab and Homework Assignments u Exams u Grading

5
© 2002 Franz J. Kurfess Logic and Reasoning 5 Bridge-In

6
© 2002 Franz J. Kurfess Logic and Reasoning 6 Pre-Test

7
© 2002 Franz J. Kurfess Logic and Reasoning 7 Motivation

8
© 2002 Franz J. Kurfess Logic and Reasoning 8 Objectives

9
© 2002 Franz J. Kurfess Logic and Reasoning 9 Evaluation Criteria

10
© 2002 Franz J. Kurfess Logic and Reasoning 10 Chapter Introduction u Review of relevant concepts u Overview new topics u Terminology

11
© 2002 Franz J. Kurfess Logic and Reasoning 11 Introduction to Logic expresses knowledge in a particular mathematical notation All birds have wings --> ¥x. Bird(x) -> HasWings(x) rules of inference guarantee that, given true facts or premises, the new facts or premises derived by applying the rules are also true All robins are birds --> ¥x Robin(x) -> Bird(x) given these two facts, application of an inference rule gives: ¥x Robin(x) -> HasWings(x)

12
© 2002 Franz J. Kurfess Logic and Reasoning 12 Logic and Knowledge rules of inference act on the superficial structure or syntax of the first 2 formulas doesn't say anything about the meaning of birds and robins could have substituted mammals and elephants etc. major advantages of this approach deductions are guaranteed to be correct to an extent that other representation schemes have not yet reached easy to automate derivation of new facts problems computational efficiency uncertain, incomplete, imprecise knowledge

13
© 2002 Franz J. Kurfess Logic and Reasoning 13 Validity and Satisfiability a sentence is valid or necessarily true if and only if it is true under all possible interpretations in all possible worlds also called a tautology IsBird(Robin) V ~IsBird(Robin) Stench[1,1] V ~Stench[1,1] OpenArea[square in front of me] V Wall[square in front of me] is NOT a tautology! assumes every square has either a wall or an open area, so not true for all worlds "If every square has either a wall or an open area in it, then OpenArea[square in front of me] V Wall[square in front of me]" is a tautology... a sentence is satisfiable iff there is some interpretation in some world for which it is true a sentence that is not satisfiable is unsatisfiable (also known as a contradiction): It is raining and it is not raining.

14
© 2002 Franz J. Kurfess Logic and Reasoning 14 Summary of Logic Languages propositional logic facts true/false/unknown first-order logic facts, objects, relations true/false/unknown temporal logic facts, objects, relations, times true/false/unknown probability theory facts degree of belief [0..1] fuzzy logic degree of truth degree of belief [0..1]

15
© 2002 Franz J. Kurfess Logic and Reasoning 15 Propositional Logic u Syntax u Semantics u Validity and Inference u Models u Inference Rules u Complexity

16
© 2002 Franz J. Kurfess Logic and Reasoning 16 Syntax u symbols logical constants True, False propositional symbols P, Q, … u logical connectives u conjunction , disjunction , u negation , u implication , equivalence u parentheses , u sentences u constructed from simple sentences u conjunction, disjunction, implication, equivalence, negation

17
© 2002 Franz J. Kurfess Logic and Reasoning 17 BNF Grammar Propositional Logic Sentence AtomicSentence | ComplexSentence AtomicSentence True | False | P | Q | R |... ComplexSentence (Sentence ) | Sentence Connective Sentence | Sentence Connective | | | ambiguities are resolved through precedence or parentheses e.g. P Q R S is equivalent to ( P) (Q R)) S

18
© 2002 Franz J. Kurfess Logic and Reasoning 18 Semantics u interpretation of the propositional symbols and constants u symbols can be any arbitrary fact u sentences consisting of only a propositional symbols are satisfiable, but not valid the constants True and False have a fixed interpretation True indicates that the world is as stated False indicates that the world is not as stated u specification of the logical connectives u frequently explicitly via truth tables

19
© 2002 Franz J. Kurfess Logic and Reasoning 19 Truth Tables for Connectives P True True False False P Q False True P Q False True P Q True False True P Q True False True Q False True False True P False True

20
© 2002 Franz J. Kurfess Logic and Reasoning 20 Validity and Inference u truth tables can be used to test sentences for validity u one row for each possible combination of truth values for the symbols in the sentence the final value must be True for every sentence

21
© 2002 Franz J. Kurfess Logic and Reasoning 21 Propositional Calculus properly formed statements that are either True or False syntax logical constants, True and False proposition symbols such as P and Q logical connectives: and ^, or V, equivalence, implies => and not ~ parentheses to indicate complex sentences sentences in this language are created through application of the following rules True and False are each (atomic) sentences Propositional symbols such as P or Q are each (atomic) sentences Enclosing symbols and connective in parentheses yields (complex) sentences, e.g., (P ^ Q)

22 © 2002 Franz J. Kurfess Logic and Reasoning 22 Complex Sentences Combining simpler sentences with logical connectives yields complex sentences conjunction sentence whose main connective