0% found this document useful (0 votes)
32 views30 pages

672 1 A Introduction

Uploaded by

Emran Aljarrah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views30 pages

672 1 A Introduction

Uploaded by

Emran Aljarrah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 30

Knowledge-Based

Systems
Course Overview
❖ Introduction
 Knowledge-Based Systems (KBS), Expert Systems (ES)
 Data/Information/Knowledge

❖ Knowledge Representation
 Semantic Nets, Rules, Frames, Scripts, Logic, RDF

❖ Reasoning and Inference


 Predicate Logic, Description Logics, Inference Methods, Resolution

❖ Reasoning with Uncertainty


 Probability, Bayesian Decision Making

❖ 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

❖ computers have special requirements for dealing with knowledge


 acquisition, representation, reasoning

❖ some knowledge-related tasks can be solved better by computers


than by humans
 cheaper, faster, easily accessible, reliable

© 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

❖ to be familiar with frequently used methods for knowledge


representation in computers
❖ to evaluate the suitability of computers for specific tasks
 application of methods to scenarios or tasks

© Franz J. Kurfess 4
Terminology
❖ Data
❖ Information
❖ Knowledge

© Franz J. Kurfess 5
Data Pyramid and Computer-Based
IS
Systems

Strategy makers apply morals, principles, and experience to Wisdom (experience)


generate policies WBS

Higher management generates knowledge by synthesizing KBS Knowledge (synthesis)


information

Middle management uses reports/info. generated though


analysis and acts accordingly DSS, MIS Information (analysis)

Basic transactions by operational staff using data TPS Data (processing of raw observations )
processing

Volume Sophistication and


complexity

Figure 1.7: Data pyramid: Managerial perspectives


6
Data Pyramid and Computer Based Systems

Heuristics and
models
Wisdom

Novelty
Knowledge
Rules

Information Experience
Concepts

Data

Raw data through fact finding Understanding

Researching Absorbing Doing Interacting Reflecting

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

Facts / Information User Interface

Inference Engine
Expertise
Developer

© Franz J. Kurfess 10
Components of KBS

Knowledge base is a repository of domain Enriches the


knowledge and metaknowledge. system with
Inference engine is a software program that self-learning
infers the knowledge available in the capabilities
knowledge base.

Knowledge base Inference engine

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

❖ Decision Support Systems


 less emphasis on autonomy

❖ 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

❖ the inference engine determines which rule antecedents are satisfied


 the left-hand side must “match” a fact in the working memory

❖ satisfied rules are placed on the agenda


❖ rules on the agenda can be activated (“fired”)
 an activated rule may generate new facts through its right-hand side
 the activation of one rule may subsequently cause the activation of other
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’ -

Rules to determine ‘grade’


1. If study then get good_grade
2. If do not_study then get bad_grade
3. If sun_shines THEN go_out
4. If go_out then do not_study
5. If stay_home then study
6. If awful_weather then stay_home
Questions

❖ Ask the following questions of the expert System


❖ Q1: If the weather is awful, do you get a good or bad grade?
❖ Q2: When do you get a good grade?
❖ forward reasoning rule chain
❖ given fact: awful_weather 6,5,1
❖ backward reasoning
hypothesis/goal: good_grade 1,5,6

❖ Answer Question 1 Good Grade


❖ Exercise Answer question 2 with forward and backward chaining
Explaining
❖ Note we presented a rule chain when we solved this
problem.
❖ If we asked How do you know we get a good grade
in awful weather we can say that
❖ By rule 6 if the weather is awful stay at home
❖ By rule 5 If stay at home then you will study
❖ And finally By rule 1 if you study you get a good
grade
In other words
❖ In order to explain how we arrive at a solution we list the chain of
rules that were fired on rout to this conclusion.
❖ This is the basis of expert system explainers
KBS Structure Details

Knowledge Base
Knowledge
Acquisition
User Interface

Facility

Inference Engine Agenda

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

❖ the cycle ends


 no more rules are on the agenda
 explicit “stop” command

© 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

Inference Engine Knowledge Base

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

❖ the main components of an Knowledge-Based System are


 knowledge base
 inference engine

❖ ES can be cheaper, faster, more accessible, and more reliable than


humans
❖ ES have limited knowledge (especially “common-sense”), can be
difficult and expensive to develop, and users may not trust them for
critical decisions
© Franz J. Kurfess 36

You might also like