SlideShare a Scribd company logo
1 of 53
Download to read offline
Chapter 2:
The Representation of
Knowledge
Expert Systems: Principles and
Programming, Fourth Edition
Expert Systems: Principles and Programming, Fourth Edition 2
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
Expert Systems: Principles and Programming, Fourth Edition 3
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
Expert Systems: Principles and Programming, Fourth Edition 4
Objectives Continued
• Learn about propositional and first order predicate logic
• Learn about quantifiers
• Explore the limitations of propositional and predicate
logic
Expert Systems: Principles and Programming, Fourth Edition 5
What is the study of logic?
• Logic is the study of making inferences – given a set of
facts, we attempt to reach a true conclusion.
• An example of informal logic is a courtroom setting
where lawyers make a series of inferences hoping to
convince a jury / judge .
• Formal logic (symbolic logic) is a more rigorous
approach to proving a conclusion to be true / false.
Expert Systems: Principles and Programming, Fourth Edition 6
Why is Logic Important
• We use logic in our everyday lives – “should I
buy this car”, “should I seek medical attention”.
• People are not very good at reasoning because
they often fail to separate word meanings with
the reasoning process itself.
• Semantics refers to the meanings we give to
symbols.
Expert Systems: Principles and Programming, Fourth Edition 7
The Goal of Expert Systems
• We need to be able to separate the actual
meanings of words with the reasoning process
itself.
• We need to make inferences w/o relying on
semantics.
• We need to reach valid conclusions based on
facts only.
Expert Systems: Principles and Programming, Fourth Edition 8
Knowledge vs. Expert Systems
• Knowledge representation is key to the success of
expert systems.
• Expert systems are designed for knowledge
representation based on rules of logic called
inferences.
• Knowledge affects the development, efficiency,
speed, and maintenance of the system.
Expert Systems: Principles and Programming, Fourth Edition 9
Arguments in Logic
• An argument refers to the formal way facts and
rules of inferences are used to reach valid
conclusions.
• The process of reaching valid conclusions is
referred to as logical reasoning.
Expert Systems: Principles and Programming, Fourth Edition 10
How is Knowledge Used?
• Knowledge has many meanings – data, facts, information.
• How do we use knowledge to reach conclusions or solve
problems?
• Heuristics refers to using experience to solve problems –
using precedents.
• Expert systems may have hundreds / thousands of micro-
precedents to refer to.
Expert Systems: Principles and Programming, Fourth Edition 11
Epistemology
• Epistemology is the formal study of knowledge .
• Concerned with nature, structure, and origins of
knowledge.
Expert Systems: Principles and Programming, Fourth Edition 12
Categories of Epistemology
•Philosophy •A priori
•A posteriori •Procedural
•Declarative •Tacit
Expert Systems: Principles and Programming, Fourth Edition 13
A Priori Knowledge
• “That which precedes”
• Independent of the senses
• Universally true
• Cannot be denied without contradiction
Expert Systems: Principles and Programming, Fourth Edition 14
A Posteriori Knowledge
• “That which follows”
• Derived from the senses
• Now always reliable
• Deniable on the basis of new knowledge w/o
the necessity of contradiction
Expert Systems: Principles and Programming, Fourth Edition 15
Procedural Knowledge
Knowing how to do something:
• Fix a watch
• Install a window
• Brush your teeth
• Ride a bicycle
Expert Systems: Principles and Programming, Fourth Edition 16
Declarative Knowledge
• Knowledge that something is true or false
• Usually associated with declarative statements
Expert Systems: Principles and Programming, Fourth Edition 17
Tacit Knowledge
• Unconscious knowledge
• Cannot be expressed by language
• E.g., knowing how to walk, breath, etc.
Expert Systems: Principles and Programming, Fourth Edition 18
The Pyramid
of Knowledge
Expert Systems: Principles and Programming, Fourth Edition 19
Metaknowledge
• Metaknowledge is knowledge about knowledge
and expertise.
– Ex. Emotions
• 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
Knowledge Representation
Techniques
• Rules
• Semantic nets
• Frames
• Scripts
• Logic
• Conceptual graphs
Expert Systems: Principles and Programming, Fourth Edition 21
Productions (Rules)
• Meta Language, BNF, Pars Tree, …
• Finite State Machines
• Hidden Markov Models
Expert Systems: Principles and Programming, Fourth Edition 22
Semantic Nets
• Rooted from Human Associative Memory
• A classic representation technique for propositional
information
• 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 (relationships between them).
Expert Systems: Principles and Programming, Fourth Edition 23
Two Types of Nets
Expert Systems: Principles and Programming, Fourth Edition 24
Common Types of Links
• IS-A – relates an instance or individual to a
generic class
• A-KIND-OF – relates generic nodes to generic
nodes
Expert Systems: Principles and Programming, Fourth Edition 25
Semantic Net Example
Living Organism
Plant Animal
isa isa
isa
isa isa
isa
isa isa
isa
isa
isa isa
ako
ako
Fly
Swim
Penguin
Eagle
Sparrow
walk
Cat family
Morris
Locomotion
Locomotion
Eats
House Cats Mice
rodents
Fred
Mammal
…
Bird
…
Locomotion
Eats
Expert Systems: Principles and Programming, Fourth Edition 26
Semantic Net Example
Dog
d b
ako
Bite
assailant
Mail-carrier
m
ako ako
victim
“The dog bite the mail carrier”
Expert Systems: Principles and Programming, Fourth Edition 27
Semantic Net Example
John g
Give
agent
Book
b
ako ako
object
Mary
beneficiary
give(John, Mary, book)
“John gives Mary a book”
Expert Systems: Principles and Programming, Fourth Edition 28
Semantic Net Example
Mammal
Person
Owen
Nose
Red Liverpool
isa
ako
has-part
uniform
color team
Expert Systems: Principles and Programming, Fourth Edition 29
Semantic Net Example
Dog
d b
ako
Bite
assailant
Mail-carrier
m
ako ako
victim
“Every dog has bitten a mail-carrier”
g
GS
ako form

Expert Systems: Principles and Programming, Fourth Edition 30
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.
Expert Systems: Principles and Programming, Fourth Edition 31
PROLOG and Semantic Nets
• UniformColor(Owen,Red).
• Team(Owen, Liverpool)
• AKO(Owen, Person).
• HasPart(Person, Nose)
• ISA(Person, Mammal)
Mammal
Person
Owen
Nose
Red Liverpool
isa
ako
has-part
uniform
color team
Expert Systems: Principles and Programming, Fourth Edition 32
Problems with Semantic Nets
• To represent definitive knowledge, the link and node names must be
rigorously defined.
• A solution to this is extensible markup language (XML) and
ontologies.
• Problems also include combinatorial explosion of searching nodes.
– Ex. What’s the name of Pluto planet’s football team?
• Inability to define knowledge the way logic can, and heuristic
inadequacy.
Expert Systems: Principles and Programming, Fourth Edition 33
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 34
Frames
• One type of schema is a frame (or script – time-
ordered 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.
Expert Systems: Principles and Programming, Fourth Edition 36
Figure 2.8 A Car Frame
Expert Systems: Principles and Programming, Fourth Edition 37
Frame Examples
• ONE/MORE GOOD FRAME SAMPLES
Expert Systems: Principles and Programming, Fourth Edition 38
Frame Examples
Animals
Alive
Flies
T
F
Birds
Legs
Flies
2
T
Mammals
Legs 4
Penguins
Flies F
Cats Bats
Legs
Flies
2
T
Opus
Name
Friend
Opus
Bill
Name
Friend
Bill
Pat
Name Pat
instance
isa
isa
Expert Systems: Principles and Programming, Fourth Edition 39
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 40
Logic and Sets
• Knowledge can also be represented by symbols
of logic.
• Logic is the study of rules of exact reasoning –
inferring conclusions from premises.
• Automated reasoning – logic programming in the
context of expert systems.
Expert Systems: Principles and Programming, Fourth Edition 41
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: All cats are climbers.
– Premise: Garfield is a cat.
– Conclusion: Garfield is a climber.
Expert Systems: Principles and Programming, Fourth Edition 42
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.
Expert Systems: Principles and Programming, Fourth Edition 43
Figure 2.13 Venn Diagrams
Expert Systems: Principles and Programming, Fourth Edition 44
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 45
Boolean vs. Aristotelian Logic
• Existential import – states that the subject of the
argument must have existence.
• “All elves wear pointed shoes.” – not allowed
under Aristotelian view since there are no elves.
• Boolean view relaxes this by permitting
reasoning about empty sets.
Expert Systems: Principles and Programming, Fourth Edition 46
Figure 2.14 Intersecting Sets
Expert Systems: Principles and Programming, Fourth Edition 47
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.
Expert Systems: Principles and Programming, Fourth Edition 48
Other Pioneers of Formal Logic
• Whitehead and Russell published Principia
Mathematica, which showed a formal logic as
the basis of mathematics.
• Gödel proved that formal systems based on
axioms could not always be proved internally
consistent and free from contradictions.
Expert Systems: Principles and Programming, Fourth Edition 49
Features of Propositional Logic
• Concerned with the subset of declarative
sentences that can be classified as true or false.
• We call these sentences “statements” or
“propositions”.
• Paradoxes – statements that cannot be classified
as true or false.
• Open sentences – statements that cannot be
answered absolutely.
Expert Systems: Principles and Programming, Fourth Edition 50
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 51
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.
Expert Systems: Principles and Programming, Fourth Edition 52
Truth Tables
Expert Systems: Principles and Programming, Fourth Edition 53
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 54
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.

More Related Content

Similar to Expert Systems: Principles and Programming, Fourth Edition

Master Beginners Workshop - September 2019
Master Beginners Workshop - September 2019Master Beginners Workshop - September 2019
Master Beginners Workshop - September 2019Miguel Pardal
 
Applied Artificial Intelligence Unit 1 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 1 Semester 3 MSc IT Part 2 Mumbai Univer...Applied Artificial Intelligence Unit 1 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 1 Semester 3 MSc IT Part 2 Mumbai Univer...Madhav Mishra
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligenceKitty Soso
 
Expert Systems: Principles and Programming, Fourth Edition
Expert Systems: Principles and Programming, Fourth EditionExpert Systems: Principles and Programming, Fourth Edition
Expert Systems: Principles and Programming, Fourth Editionmercyzyada1999
 
Statistical Analysis of Results in Music Information Retrieval: Why and How
Statistical Analysis of Results in Music Information Retrieval: Why and HowStatistical Analysis of Results in Music Information Retrieval: Why and How
Statistical Analysis of Results in Music Information Retrieval: Why and HowJulián Urbano
 
Artificial Intelligence Notes Unit 5
Artificial Intelligence Notes Unit 5Artificial Intelligence Notes Unit 5
Artificial Intelligence Notes Unit 5DigiGurukul
 
Expert System With Python -1
Expert System With Python -1Expert System With Python -1
Expert System With Python -1Ahmad Hussein
 
Örüntü tanıma - Pattern Recognition
Örüntü tanıma - Pattern RecognitionÖrüntü tanıma - Pattern Recognition
Örüntü tanıma - Pattern RecognitionHassan-k Abdi
 
A new systems perspective in Transnet
A new systems perspective in TransnetA new systems perspective in Transnet
A new systems perspective in TransnetTristan Wiggill
 
ML.pptvdvdvdvdvdfvdfgvdsdgdsfgdfgdfgdfgdf
ML.pptvdvdvdvdvdfvdfgvdsdgdsfgdfgdfgdfgdfML.pptvdvdvdvdvdfvdfgvdsdgdsfgdfgdfgdfgdf
ML.pptvdvdvdvdvdfvdfgvdsdgdsfgdfgdfgdfgdfAvijitChaudhuri3
 

Similar to Expert Systems: Principles and Programming, Fourth Edition (20)

Sementic nets
Sementic netsSementic nets
Sementic nets
 
Master Beginners Workshop - September 2019
Master Beginners Workshop - September 2019Master Beginners Workshop - September 2019
Master Beginners Workshop - September 2019
 
Applied Artificial Intelligence Unit 1 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 1 Semester 3 MSc IT Part 2 Mumbai Univer...Applied Artificial Intelligence Unit 1 Semester 3 MSc IT Part 2 Mumbai Univer...
Applied Artificial Intelligence Unit 1 Semester 3 MSc IT Part 2 Mumbai Univer...
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
Expert Systems: Principles and Programming, Fourth Edition
Expert Systems: Principles and Programming, Fourth EditionExpert Systems: Principles and Programming, Fourth Edition
Expert Systems: Principles and Programming, Fourth Edition
 
Knowledge Representation in AI.pptx
Knowledge Representation in AI.pptxKnowledge Representation in AI.pptx
Knowledge Representation in AI.pptx
 
4.3.pdf
4.3.pdf4.3.pdf
4.3.pdf
 
Statistical Analysis of Results in Music Information Retrieval: Why and How
Statistical Analysis of Results in Music Information Retrieval: Why and HowStatistical Analysis of Results in Music Information Retrieval: Why and How
Statistical Analysis of Results in Music Information Retrieval: Why and How
 
Artificial Intelligence Notes Unit 5
Artificial Intelligence Notes Unit 5Artificial Intelligence Notes Unit 5
Artificial Intelligence Notes Unit 5
 
Expert System With Python -1
Expert System With Python -1Expert System With Python -1
Expert System With Python -1
 
4_6_Expert Systems_1.pptx
4_6_Expert Systems_1.pptx4_6_Expert Systems_1.pptx
4_6_Expert Systems_1.pptx
 
Örüntü tanıma - Pattern Recognition
Örüntü tanıma - Pattern RecognitionÖrüntü tanıma - Pattern Recognition
Örüntü tanıma - Pattern Recognition
 
A new systems perspective in Transnet
A new systems perspective in TransnetA new systems perspective in Transnet
A new systems perspective in Transnet
 
ML
MLML
ML
 
Expert system
Expert systemExpert system
Expert system
 
ML.ppt
ML.pptML.ppt
ML.ppt
 
ML.ppt
ML.pptML.ppt
ML.ppt
 
ML.ppt
ML.pptML.ppt
ML.ppt
 
ML.ppt
ML.pptML.ppt
ML.ppt
 
ML.pptvdvdvdvdvdfvdfgvdsdgdsfgdfgdfgdfgdf
ML.pptvdvdvdvdvdfvdfgvdsdgdsfgdfgdfgdfgdfML.pptvdvdvdvdvdfvdfgvdsdgdsfgdfgdfgdfgdf
ML.pptvdvdvdvdvdfvdfgvdsdgdsfgdfgdfgdfgdf
 

Recently uploaded

Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 

Recently uploaded (20)

Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 

Expert Systems: Principles and Programming, Fourth Edition

  • 1. Chapter 2: The Representation of Knowledge Expert Systems: Principles and Programming, Fourth Edition
  • 2. Expert Systems: Principles and Programming, Fourth Edition 2 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
  • 3. Expert Systems: Principles and Programming, Fourth Edition 3 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
  • 4. Expert Systems: Principles and Programming, Fourth Edition 4 Objectives Continued • Learn about propositional and first order predicate logic • Learn about quantifiers • Explore the limitations of propositional and predicate logic
  • 5. Expert Systems: Principles and Programming, Fourth Edition 5 What is the study of logic? • Logic is the study of making inferences – given a set of facts, we attempt to reach a true conclusion. • An example of informal logic is a courtroom setting where lawyers make a series of inferences hoping to convince a jury / judge . • Formal logic (symbolic logic) is a more rigorous approach to proving a conclusion to be true / false.
  • 6. Expert Systems: Principles and Programming, Fourth Edition 6 Why is Logic Important • We use logic in our everyday lives – “should I buy this car”, “should I seek medical attention”. • People are not very good at reasoning because they often fail to separate word meanings with the reasoning process itself. • Semantics refers to the meanings we give to symbols.
  • 7. Expert Systems: Principles and Programming, Fourth Edition 7 The Goal of Expert Systems • We need to be able to separate the actual meanings of words with the reasoning process itself. • We need to make inferences w/o relying on semantics. • We need to reach valid conclusions based on facts only.
  • 8. Expert Systems: Principles and Programming, Fourth Edition 8 Knowledge vs. Expert Systems • Knowledge representation is key to the success of expert systems. • Expert systems are designed for knowledge representation based on rules of logic called inferences. • Knowledge affects the development, efficiency, speed, and maintenance of the system.
  • 9. Expert Systems: Principles and Programming, Fourth Edition 9 Arguments in Logic • An argument refers to the formal way facts and rules of inferences are used to reach valid conclusions. • The process of reaching valid conclusions is referred to as logical reasoning.
  • 10. Expert Systems: Principles and Programming, Fourth Edition 10 How is Knowledge Used? • Knowledge has many meanings – data, facts, information. • How do we use knowledge to reach conclusions or solve problems? • Heuristics refers to using experience to solve problems – using precedents. • Expert systems may have hundreds / thousands of micro- precedents to refer to.
  • 11. Expert Systems: Principles and Programming, Fourth Edition 11 Epistemology • Epistemology is the formal study of knowledge . • Concerned with nature, structure, and origins of knowledge.
  • 12. Expert Systems: Principles and Programming, Fourth Edition 12 Categories of Epistemology •Philosophy •A priori •A posteriori •Procedural •Declarative •Tacit
  • 13. Expert Systems: Principles and Programming, Fourth Edition 13 A Priori Knowledge • “That which precedes” • Independent of the senses • Universally true • Cannot be denied without contradiction
  • 14. Expert Systems: Principles and Programming, Fourth Edition 14 A Posteriori Knowledge • “That which follows” • Derived from the senses • Now always reliable • Deniable on the basis of new knowledge w/o the necessity of contradiction
  • 15. Expert Systems: Principles and Programming, Fourth Edition 15 Procedural Knowledge Knowing how to do something: • Fix a watch • Install a window • Brush your teeth • Ride a bicycle
  • 16. Expert Systems: Principles and Programming, Fourth Edition 16 Declarative Knowledge • Knowledge that something is true or false • Usually associated with declarative statements
  • 17. Expert Systems: Principles and Programming, Fourth Edition 17 Tacit Knowledge • Unconscious knowledge • Cannot be expressed by language • E.g., knowing how to walk, breath, etc.
  • 18. Expert Systems: Principles and Programming, Fourth Edition 18 The Pyramid of Knowledge
  • 19. Expert Systems: Principles and Programming, Fourth Edition 19 Metaknowledge • Metaknowledge is knowledge about knowledge and expertise. – Ex. Emotions • 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.
  • 20. Expert Systems: Principles and Programming, Fourth Edition 20 Knowledge Representation Techniques • Rules • Semantic nets • Frames • Scripts • Logic • Conceptual graphs
  • 21. Expert Systems: Principles and Programming, Fourth Edition 21 Productions (Rules) • Meta Language, BNF, Pars Tree, … • Finite State Machines • Hidden Markov Models
  • 22. Expert Systems: Principles and Programming, Fourth Edition 22 Semantic Nets • Rooted from Human Associative Memory • A classic representation technique for propositional information • 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 (relationships between them).
  • 23. Expert Systems: Principles and Programming, Fourth Edition 23 Two Types of Nets
  • 24. Expert Systems: Principles and Programming, Fourth Edition 24 Common Types of Links • IS-A – relates an instance or individual to a generic class • A-KIND-OF – relates generic nodes to generic nodes
  • 25. Expert Systems: Principles and Programming, Fourth Edition 25 Semantic Net Example Living Organism Plant Animal isa isa isa isa isa isa isa isa isa isa isa isa ako ako Fly Swim Penguin Eagle Sparrow walk Cat family Morris Locomotion Locomotion Eats House Cats Mice rodents Fred Mammal … Bird … Locomotion Eats
  • 26. Expert Systems: Principles and Programming, Fourth Edition 26 Semantic Net Example Dog d b ako Bite assailant Mail-carrier m ako ako victim “The dog bite the mail carrier”
  • 27. Expert Systems: Principles and Programming, Fourth Edition 27 Semantic Net Example John g Give agent Book b ako ako object Mary beneficiary give(John, Mary, book) “John gives Mary a book”
  • 28. Expert Systems: Principles and Programming, Fourth Edition 28 Semantic Net Example Mammal Person Owen Nose Red Liverpool isa ako has-part uniform color team
  • 29. Expert Systems: Principles and Programming, Fourth Edition 29 Semantic Net Example Dog d b ako Bite assailant Mail-carrier m ako ako victim “Every dog has bitten a mail-carrier” g GS ako form 
  • 30. Expert Systems: Principles and Programming, Fourth Edition 30 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.
  • 31. Expert Systems: Principles and Programming, Fourth Edition 31 PROLOG and Semantic Nets • UniformColor(Owen,Red). • Team(Owen, Liverpool) • AKO(Owen, Person). • HasPart(Person, Nose) • ISA(Person, Mammal) Mammal Person Owen Nose Red Liverpool isa ako has-part uniform color team
  • 32. Expert Systems: Principles and Programming, Fourth Edition 32 Problems with Semantic Nets • To represent definitive knowledge, the link and node names must be rigorously defined. • A solution to this is extensible markup language (XML) and ontologies. • Problems also include combinatorial explosion of searching nodes. – Ex. What’s the name of Pluto planet’s football team? • Inability to define knowledge the way logic can, and heuristic inadequacy.
  • 33. Expert Systems: Principles and Programming, Fourth Edition 33 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.
  • 34. Expert Systems: Principles and Programming, Fourth Edition 34 Frames • One type of schema is a frame (or script – time- ordered 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.
  • 35. Expert Systems: Principles and Programming, Fourth Edition 36 Figure 2.8 A Car Frame
  • 36. Expert Systems: Principles and Programming, Fourth Edition 37 Frame Examples • ONE/MORE GOOD FRAME SAMPLES
  • 37. Expert Systems: Principles and Programming, Fourth Edition 38 Frame Examples Animals Alive Flies T F Birds Legs Flies 2 T Mammals Legs 4 Penguins Flies F Cats Bats Legs Flies 2 T Opus Name Friend Opus Bill Name Friend Bill Pat Name Pat instance isa isa
  • 38. Expert Systems: Principles and Programming, Fourth Edition 39 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.
  • 39. Expert Systems: Principles and Programming, Fourth Edition 40 Logic and Sets • Knowledge can also be represented by symbols of logic. • Logic is the study of rules of exact reasoning – inferring conclusions from premises. • Automated reasoning – logic programming in the context of expert systems.
  • 40. Expert Systems: Principles and Programming, Fourth Edition 41 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: All cats are climbers. – Premise: Garfield is a cat. – Conclusion: Garfield is a climber.
  • 41. Expert Systems: Principles and Programming, Fourth Edition 42 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.
  • 42. Expert Systems: Principles and Programming, Fourth Edition 43 Figure 2.13 Venn Diagrams
  • 43. Expert Systems: Principles and Programming, Fourth Edition 44 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.”
  • 44. Expert Systems: Principles and Programming, Fourth Edition 45 Boolean vs. Aristotelian Logic • Existential import – states that the subject of the argument must have existence. • “All elves wear pointed shoes.” – not allowed under Aristotelian view since there are no elves. • Boolean view relaxes this by permitting reasoning about empty sets.
  • 45. Expert Systems: Principles and Programming, Fourth Edition 46 Figure 2.14 Intersecting Sets
  • 46. Expert Systems: Principles and Programming, Fourth Edition 47 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.
  • 47. Expert Systems: Principles and Programming, Fourth Edition 48 Other Pioneers of Formal Logic • Whitehead and Russell published Principia Mathematica, which showed a formal logic as the basis of mathematics. • Gödel proved that formal systems based on axioms could not always be proved internally consistent and free from contradictions.
  • 48. Expert Systems: Principles and Programming, Fourth Edition 49 Features of Propositional Logic • Concerned with the subset of declarative sentences that can be classified as true or false. • We call these sentences “statements” or “propositions”. • Paradoxes – statements that cannot be classified as true or false. • Open sentences – statements that cannot be answered absolutely.
  • 49. Expert Systems: Principles and Programming, Fourth Edition 50 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.
  • 50. Expert Systems: Principles and Programming, Fourth Edition 51 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.
  • 51. Expert Systems: Principles and Programming, Fourth Edition 52 Truth Tables
  • 52. Expert Systems: Principles and Programming, Fourth Edition 53 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.
  • 53. Expert Systems: Principles and Programming, Fourth Edition 54 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.