View
224
Download
0
Category
Tags:
Preview:
Citation preview
© C. Kemke
1Reasoning - Introduction
COMP 4200: Expert SystemsCOMP 4200:
Expert Systems
Dr. Christel Kemke
Department of Computer Science
University of Manitoba
© C. Kemke
2Reasoning - Introduction
Reasoning in Expert SystemsReasoning in Expert Systems
knowledge representation in Expert Systems shallow and deep reasoning forward and backward reasoning alternative inference methods metaknowledge
© C. Kemke
3Reasoning - Introduction
Expert performance depends on expert knowledge!
Experts and Expert SystemsExperts and Expert Systems
Human Experts achieve high performance because of extensive knowledge concerning their field
Generally developed over many years
© C. Kemke
4Reasoning - Introduction
Types of KnowledgeTypes of Knowledge
Knowledge Representation in XPS can include: conceptual knowledge
terminology, domain-specific terms derivative knowledge
conclusions between facts causal connections
causal model of domain procedural knowledge
guidelines for actions
© C. Kemke
5Reasoning - Introduction
Knowledge Modeling in XPSKnowledge Modeling in XPS
Knowledge Modeling Technique in XPS mostly rule-based systems (RBS) rule system models elements of knowledge
formulated independently as rules rule set is easy to expand often only limited ‘deep’ knowledge, i.e. no
explicit coherent causal or functional model of the domain
© C. Kemke
6Reasoning - Introduction
Shallow and Deep ReasoningShallow and Deep Reasoning
shallow reasoning also called “experiential reasoning” aims at describing aspects of the world heuristically short inference chains complex rules
deep reasoning also called causal reasoning aims at building a model that behaves like the “real thing” long inference chains simple rules that describe cause and effect relationships
© C. Kemke
7Reasoning - Introduction
Dilbert on Reasoning 1Dilbert on Reasoning 1
© C. Kemke
8Reasoning - Introduction
Dilbert on Reasoning 2Dilbert on Reasoning 2
© C. Kemke
9Reasoning - Introduction
Dilbert on Reasoning 3Dilbert on Reasoning 3
© C. Kemke
10Reasoning - Introduction
General Technology of XPSGeneral Technology of XPS
Knowledge + Inference core of XPS Most often Rule-Based Systems (RBS) other forms: Neural Networks, Case-Based
Reasoning
© C. Kemke
11Reasoning - Introduction
Rule-Based Expert Systems Rule-Based Expert Systems
Work with a set of facts describing the current world
state a set of rules describing the expert
knowledge inference mechanisms for combining facts
and rules in reasoning
© C. Kemke
12Reasoning - Introduction
Inference Engine
AgendaKnowledge Base
(rules)
ExplanationFacility
User Interface
KnowledgeAcquisition
Facility
Working Memory (facts)
© C. Kemke
13Reasoning - Introduction
Architecture of Rule-Based XPS 1
Architecture of Rule-Based XPS 1
Knowledge-Base / Rule-Base stores expert knowledge as “condition-action-rules” (or: if-
then- or premise-consequence-rules) objects or frame structures are often used to represent
concepts in the domain of expertise, e.g. “club” in the golf domain.
Working Memory stores initial facts and generated facts derived by the
inference engine additional parameters like the “degree of trust” in the truth
of a fact or a rule ( certainty factors) or probabilistic measurements can be added
© C. Kemke
14Reasoning - Introduction
Architecture of Rule-Based XPS 2
Architecture of Rule-Based XPS 2
Inference Engine matches condition-part of rules against facts stored in
Working Memory (pattern matching); rules with satisfied condition are active rules and are
placed on the agenda; among the active rules on the agenda, one is selected
(see conflict resolution, priorities of rules) as next rule for
execution (“firing”) – consequence of rule can add new facts to Working Memory, modify facts, retract facts, and more
© C. Kemke
15Reasoning - Introduction
Architecture of Rule-Based XPS 3
Architecture of Rule-Based XPS 3
Inference Engine + additional components
might be necessary for other functions, like calculation of certainty values, determination of priorities of rules and conflict resolution mechanisms, a truth maintenance system (TMS) if reasoning with
defaults and beliefs is requested
© C. Kemke
16Reasoning - Introduction
Rule-Based Systems- Example ‘Grades’ -
Rule-Based Systems- Example ‘Grades’ -
Rules to determine ‘grade’
1. study good_grade
2. not_study bad_grade
3. sun_shines go_out
4. go_out not_study
5. stay_home study
6. awful_weather stay_home
© C. Kemke
17Reasoning - Introduction
Example ‘Grades’ Example ‘Grades’
1. study good_grade
2. not_study bad_grade
3. sun_shines go_out
4. go_out not_study
5. stay_home study
6. awful_weather stay_home
Q1: If the weather is awful, do you get a good or bad grade?
Q2: When do you get a good grade?
Rule-Base to determine the ‘grade’:
© C. Kemke
18Reasoning - Introduction
Forward and Backward Reasoning
Forward and Backward Reasoning
forward reasoning Facts are given. What is the conclusion?
A set of known facts is given (in WM); apply rules to derive new facts as conclusions (forward chaining of rules) until you come up with a requested final goal fact.
backward reasoning Hypothesis (goal) is given. Is it supported by facts?
A hypothesis (goal fact) is given; try to derive it based on a set of given initial facts using sub-goals (backward chaining of rules) until goal is grounded in initial facts.
© C. Kemke
19Reasoning - Introduction
1. study good_grade
2. not_study bad_grade
3. sun_shines go_out
4. go_out not_study
5. stay_home study
6. awful_weather stay_home
Example ‘Grades’ Example ‘Grades’
forward reasoning rule chaingiven fact: awful_weather 6,5,1
backward reasoninghypothesis/goal: good_grade 1,5,6
© C. Kemke
20Reasoning - Introduction
good grade
Example ‘Grades’ – Reasoning Tree
Example ‘Grades’ – Reasoning Tree
bad grade
not studystudy
go outstay home
sun shinesawful weather
© C. Kemke
21Reasoning - Introduction
Example – GradesExample – Grades
Working Memory Agenda
awful weather Rule 6
Select and apply Rule 6
awful weatherstay home
Rule 5
Select and apply Rule 5
© C. Kemke
22Reasoning - Introduction
Example – GradesExample – Grades
Working Memory Agenda
Select and apply Rule 1
awful weatherstay homestudy
Rule 1
awful weatherstay homestudygood grade
empty
DONE!
© C. Kemke
23Reasoning - Introduction
forward reasoning: Shield AND Pistol Policebackward reasoning: Police Badge AND gun
Police
Badge Gun
Shield PistolRevolver
AND
OR
Bad Boy
Example ‘Police’ – Reasoning TreeExample ‘Police’ – Reasoning Tree
Q: What if only ‘Gun’ is known?
© C. Kemke
24Reasoning - Introduction
Police
Badge Gun
Shield PistolRevolver
AND
OR
Bad Boy
Example ‘Police’ – Reasoning Tree
Example ‘Police’ – Reasoning Tree
Q: What if only ‘Pistol’ is known as ground fact?
© C. Kemke
25Reasoning - Introduction
Police
Badge Gun
Shield PistolRevolver
AND
OR
Bad Boy
Example ‘Police’ – Reasoning Tree
Example ‘Police’ – Reasoning Tree
Task: Write down the Rule-Base for this example!
© C. Kemke
26Reasoning - Introduction
Forward vs. Backward ChainingForward vs. Backward Chaining
Forward Chaining Backward Chainingdiagnosis construction
data-driven goal-driven (hypothesis)
bottom-up reasoning top-down reasoning
find possible conclusions supported by given facts
find facts that support a given hypothesis
antecedents (LHS) control evaluation
consequents (RHS) control evaluation
© C. Kemke
27Reasoning - Introduction
Alternative Reasoning MethodsAlternative Reasoning Methods
Theorem Proving emphasis on mathematical proofs and correctness,
not so much on performance and ease of use
Probabilistic Reasoning integrates probabilities into the reasoning process
Certainty Factors Express subjective assessment of truth of fact or rule
Fuzzy Reasoning allows the use of vaguely defined predicates and rules
© C. Kemke
28Reasoning - Introduction
MetaknowledgeMetaknowledge
deals with “knowledge about knowledge” e.g. reasoning about properties of knowledge
representation schemes, or inference mechanisms usually relies on higher order logic
in (first order) predicate logic, quantifiers are applied to variables second-order predicate logic allows the use of quantifiers for
function and predicate symbols may result in substantial performance problems
CLIPS uses meta-knowledge to define itself, i.e. CLIPS constructs, classes, etc. - in a bootstrapping form
Recommended