Expert Systems Principles and Programming, Fourth Edition
Expert Systems Principles and Programming, Fourth Edition
Objectives
Introduce the study of logic Learn the difference between formal logic and informal logic Learn the meaning of knowledge and how it can be represented Learn about semantic nets Learn about object-attribute-value triples
Objectives Continued
See how semantic nets can be translated into Prolog Explore the limitations of semantic nets Learn about schemas Learn about frames and their limitations Learn how to use logic and set symbols to represent knowledge
Objectives Continued
Learn about propositional and first order predicate logic Learn about quantifiers Explore the limitations of propositional and predicate logic
Definitions of Knowledge
a) (1) the fact or condition of knowing something with familiarity gained through experience or association (2)acquaintance with or understanding of a science, art, or technique b) (1) the fact or condition of being aware of something (2) the range of one's information or understanding c) the circumstance or condition of apprehending truth or fact through reasoning : cognition the fact or condition of having information or of being learned
9
d)
Epistemology
Epistemology is the formal study of knowledge . Concerned with nature, structure, and origins of knowledge.
10
Categories of Epistemology
Philosophy A priori
A posteriori
Procedural
Declarative
Tacit
11
A Priori Knowledge
Also called theoretical knowledge That which precedes Independent of the senses Universally true Cannot be denied without contradiction e.g., coin flips will give 50% heads and 50% tails
12
A Posteriori Knowledge
Also called empirical knowledge That which follows Derived from the senses Now always reliable Deniable on the basis of new knowledge w/o the necessity of contradiction E.g., 100 coin flips give only 39 heads what can you conclude?
13
Procedural Knowledge
Knowing how to do something: Fix a watch Install a window Brush your teeth Ride a bicycle
14
Declarative Knowledge
Knowledge that something is true or false Usually associated with declarative statements E.g., Dont touch that hot wire.
15
Tacit Knowledge
Unconscious knowledge Cannot be expressed by language E.g., knowing how to walk, breath, etc.
16
17
18
19
Metaknowledge
Metaknowledge is knowledge about knowledge and expertise. Most successful expert systems are restricted to as small a domain as possible. In an expert system, an ontology is the metaknowledge that describes everything known about the problem domain. Wisdom is the metaknowledge of determining the best goals of life and how to obtain them.
Expert Systems: Principles and Programming, Fourth Edition 20
21
Production Rules
Frequently used to formulate the knowledge in expert systems. A formal variation is Backus-Naur form (BNF)
metalanguage for the definition of language syntax a grammar is a complete, unambiguous set of production rules for a specific language a parse tree is a graphic representation of a sentence in that language provides only a syntactic description of the language
not all sentences make sense
23
24
25
26
27
28
Semantic Nets
A classic representation technique for propositional information (sometimes called propositional net) Propositions a form of declarative knowledge, stating facts (true/false) Propositions are called atoms cannot be further subdivided. Semantic nets consist of nodes (objects, concepts, situations) and arcs or links (relationships between them). For nodes
Labels indicate the name Nodes can be instances (individual objects) or classes (generic nodes)
Expert Systems: Principles and Programming, Fourth Edition 29
Links-Semantic Nets
Links represent relationships
The relationships contain the structural information of the knowledge to be represented The label indicates the type of the relationship
30
31
32
33
34
35
36
PROLOG Continued
Programs consist of facts and rules in the general form of goals. General form: p:- p1, p2, , pN p is called the rules head and the pi represents the subgoals Example: spouse(x,y) :- wife(x,y) x is the spouse of y if x is the wife of y
Expert Systems: Principles and Programming, Fourth Edition 37
38
39
40
Object-Attribute-Value Triple
One problem with semantic nets is lack of standard definitions for link names (IS-A, AKO, etc.). The OAV triplet can be used to characterize all the knowledge in a semantic net.
41
42
Problems also include combinatorial explosion of searching nodes, inability to define knowledge the way logic can, and heuristic inadequacy.
43
Efficiency
may result in large sets of nodes and links search may lead to combinatorial explosion
especially for queries with negative results
Usability
lack of standards for link types naming of nodes
classes, instances
44
45
46
47
48
49
50
51
Schemata
Knowledge Structure an ordered collection of knowledge not just data. Semantic Nets are shallow knowledge structures all knowledge is contained in nodes and links. Schema is a more complex knowledge structure than a semantic net. In a schema, a node is like a record which may contain data, records, and/or pointers to nodes.
Expert Systems: Principles and Programming, Fourth Edition 52
Frames
One type of schema is a frame (or script timeordered sequence of frames). Frames are useful for simulating commonsense knowledge. Semantic nets provide 2-dimensional knowledge; frames provide 3-dimensional. Frames represent related knowledge about narrow subjects having much default knowledge.
53
Frames Continued
A frame is a group of slots and fillers that defines a stereotypical object that is used to represent generic / specific knowledge. Commonsense knowledge is knowledge that is generally known. Prototypes are objects possessing all typical characteristics of whatever is being modeled. Problems with frames include allowing unrestrained alteration / cancellation of slots.
Expert Systems: Principles and Programming, Fourth Edition 54
55
56
Forms of Logic
Earliest form of logic was based on the syllogism developed by Aristotle. Syllogisms have two premises that provide evidence to support a conclusion. Example:
Premise: Premise: Conclusion: All cats are climbers. Garfield is a cat. Garfield is a climber.
57
Venn Diagrams
Venn diagrams can be used to represent knowledge. Universal set is the topic of discussion. Subsets, proper subsets, intersection, union , contained in, and complement are all familiar terms related to sets. An empty set (null set) has no elements.
58
59
Propositional Logic
Formal logic is concerned with syntax of statements, not semantics. Syllogism:
All goons are loons. Zadok is a goon. Zadok is a loon.
The words may be nonsense, but the form is correct this is a valid argument.
Expert Systems: Principles and Programming, Fourth Edition 60
61
62
Boolean Logic
Defines a set of axioms consisting of symbols to represent objects / classes. Defines a set of algebraic expressions to manipulate those symbols. Using axioms, theorems can be constructed. A theorem can be proved by showing how it is derived from a set of axioms.
63
64
65
Features Continued
Compound statements formed by using logical connectives (e.g., AND, OR, NOT, conditional, and biconditional) on individual statements. Material implication p q states that if p is true, it must follow that q is true. Biconditional p q states that p implies q and q implies p.
Expert Systems: Principles and Programming, Fourth Edition 66
Features Continued
Tautology a statement that is true for all possible cases. Contradiction a statement that is false for all possible cases. Contingent statement a statement that is neither a tautology nor a contradiction.
67
Truth Tables
68
Universal Quantifier
The universal quantifier, represented by the symbol means for every or for all. ( x) (x is a rectangle x has four sides) The existential quantifier, represented by the symbol means there exists. ( x) (x 3 = 5) Limitations of predicate logic most quantifier.
Expert Systems: Principles and Programming, Fourth Edition 69
Summary
We have discussed:
Elements of knowledge Knowledge representation Some methods of representing knowledge
Fallacies may result from confusion between form of knowledge and semantics. It is necessary to specify formal rules for expert systems to be able to reach valid conclusions. Different problems require different tools.
Expert Systems: Principles and Programming, Fourth Edition 70