672 1 A Introduction
672 1 A Introduction
Systems
Course Overview
❖ Introduction
Knowledge-Based Systems (KBS), Expert Systems (ES)
Data/Information/Knowledge
❖ Knowledge Representation
Semantic Nets, Rules, Frames, Scripts, Logic, RDF
❖ Approximate Reasoning
Fuzzy Logic
❖ KBS Implementation
Unification, Pattern Matching, Salience, Rete Algorithm
❖ KBS Examples
CLIPS/Jess, Prolog, Semantic Web Technologies
© Franz J. Kurfess 2
Motivation
❖ utilization of computers to deal with knowledge
quantity of knowledge available increases rapidly
relieve humans from tedious tasks
© Franz J. Kurfess 3
Objectives
❖ to know and comprehend the main principles, components, and
application areas for Knowledge-Based Systems
❖ to understand the structure of Knowledge-Based Systems
knowledge base, inference engine
© Franz J. Kurfess 4
Terminology
❖ Data
❖ Information
❖ Knowledge
© Franz J. Kurfess 5
Data Pyramid and Computer-Based
IS
Systems
Basic transactions by operational staff using data TPS Data (processing of raw observations )
processing
Heuristics and
models
Wisdom
Novelty
Knowledge
Rules
Information Experience
Concepts
Data
7
What is an Knowledge-Based
System (KBS)?
❖ relies on internally represented knowledge to perform tasks
❖ utilizes reasoning methods to derive appropriate new knowledge
❖ usually restricted to a specific problem domain
❖ some systems try to capture common-sense knowledge
General Problem Solver (Newell, Shaw, Simon)
Cyc (Lenat)
© Franz J. Kurfess 8
Main Components of a KBS
User
Expertise
Knowledge Base
Inference Engine
Expertise
Developer
© Franz J. Kurfess 10
Components of KBS
Explanation
Self-
and
learning
reasoning
User interface
Friendly
interface to
users working
Provides in their native
explanation and language
reasoning
facilities Figure 1.10: General structure of KBS
11
General Concepts and
Characteristics of ES
❖ knowledge acquisition
transfer of knowledge from humans to computers
sometimes knowledge can be acquired directly from the environment
machine learning
❖ knowledge representation
suitable for storing and processing knowledge in computers
❖ inference
mechanism that allows the generation of new conclusions from existing knowledge
in a computer
❖ explanation
illustrates to the user how and why a particular solution was generated
© Franz J. Kurfess 13
Early KBS Success Stories
❖ DENDRAL
identification of chemical constituents
❖ MYCIN
diagnosis of illnesses
❖ PROSPECTOR
analysis of geological data for minerals
discovered a mineral deposit worth $100 million
❖ XCON/R1
configuration of DEC VAX computer systems
saved lots of time and millions of dollars
© Franz J. Kurfess 15
Rules and Humans
❖ rules can be used to formulate a theory of human information
processing (Newell & Simon)
rules are stored in long-term memory
temporary knowledge is kept in short-term memory
sensory input or thinking triggers the activation of rules
activated rules may trigger further activation
a cognitive processor combines evidence from currently active rules
❖ this model is the basis for the design of many rule-based systems
also called production systems
© Franz J. Kurfess 16
Related Developments
❖ Semantic Web
extension of the World Wide Web
includes knowledge representation and reasoning capabilities
❖ Data Mining
extraction of knowledge from large quantities of data
❖ Sensemaking
computer support for quicker, easier understanding of complex
domains or situations
© Franz J. Kurfess 20
Rule-Based ES
❖ knowledge is encoded as IF … THEN rules
these rules can also be written as production rules
© Franz J. Kurfess 21
Example Rules
IF … THEN Rules
antecedent
Rule: Red_Light
(left-hand-side)
IF the light is red
THEN stop
Rule: Green_Light consequent
IF the light is green (right-hand-side)
THEN go
antecedent (left-hand-side)
Production Rules
the light is red ==> stop
consequent
(right-hand-side)
the light is green ==> go
© Franz J. Kurfess 22
MYCIN Sample Rule
Human-Readable Format
IF the stain of the organism is gram negative
AND the morphology of the organism is rod
AND the aerobiocity of the organism is gram anaerobic
THEN the there is strongly suggestive evidence (0.8)
that the class of the organism is enterobacteriaceae
MYCIN Format
IF (AND (SAME CNTEXT GRAM GRAMNEG)
(SAME CNTEXT MORPH ROD)
(SAME CNTEXT AIR AEROBIC)
THEN (CONCLUDE CNTEXT CLASS ENTEROBACTERIACEAE
TALLY .8)
[Durkin 94, p. 133]
© Franz J. Kurfess 23
KBS Elements
❖ knowledge base
❖ inference engine
❖ working memory
❖ agenda
❖ explanation facility
❖ knowledge acquisition facility
❖ user interface
© Franz J. Kurfess 24
Rule-Based Systems
- Example ‘Grades’ -
Knowledge Base
Knowledge
Acquisition
User Interface
Facility
Explanation
Facility
Working Memory
© Franz J. Kurfess 30
Inference Engine Cycle
❖ describes the execution of rules by the inference engine
conflict resolution
select the rule with the highest priority from the agenda
execution
perform the actions on the consequent of the selected rule
remove the rule from the agenda
match
update the agenda
add rules whose antecedents are satisfied to the agenda
remove rules with non-satisfied agendas
© Franz J. Kurfess 31
Forward and Backward
Chaining
❖ different methods of rule activation
forward chaining (data-driven)
reasoning from facts to the conclusion
as soon as facts are available, they are used to match antecedents of rules
a rule can be activated if all parts of the antecedent are satisfied
often used for real-time expert systems in monitoring and control
examples: CLIPS, OPS5
backward chaining (query-driven)
starting from a hypothesis (query), supporting rules and facts are sought until all
parts of the antecedent of the hypothesis are satisfied
often used in diagnostic and consultation systems
examples: EMYCIN
© Franz J. Kurfess 32
Foundations of KBSs
Rule-Based Systems
Pattern
Conflict Facts Rules
Matching
Resolution
Rete Post Production
Rules
Algorithm Action
Execution
Markov
Algorithm
© Franz J. Kurfess 33
KBS Advantages
❖ economical
lower cost per user
❖ availability
accessible anytime, almost anywhere
❖ response time
often faster than human experts
❖ reliability
can be greater than that of human experts
no distraction, fatigue, emotional involvement, …
❖ explanation
reasoning steps that lead to a particular conclusion
❖ intellectual property
can’t walk out of the door
© Franz J. Kurfess 34
KBS Problems
❖ limited knowledge
“shallow” knowledge
no “deep” understanding of the concepts and their relationships
no “common-sense” knowledge
no knowledge from possibly relevant related domains
“closed world”
the ES knows only what it has been explicitly “told”
it doesn’t know what it doesn’t know
❖ mechanical reasoning
may not have or select the most appropriate method for a particular problem
some “easy” problems are computationally very expensive
❖ lack of trust
users may not want to leave critical decisions to machines
© Franz J. Kurfess 35
Summary Introduction
❖ expert systems or knowledge based systems are used to represent and
process in a format that is suitable for computers but still
understandable by humans
If-Then rules are a popular format