0% found this document useful (0 votes)
6 views39 pages

Lecture 5 - Expert Systems

Expert Systems are designed to provide expert-level advice and diagnoses, simulating human decision-making in various fields such as medicine and automotive repair. They rely on knowledge representation and reasoning mechanisms, utilizing techniques like forward and backward chaining for inference. The architecture includes components like a user interface, knowledge base, inference engine, and explanation system to facilitate problem-solving.

Uploaded by

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

Lecture 5 - Expert Systems

Expert Systems are designed to provide expert-level advice and diagnoses, simulating human decision-making in various fields such as medicine and automotive repair. They rely on knowledge representation and reasoning mechanisms, utilizing techniques like forward and backward chaining for inference. The architecture includes components like a user interface, knowledge base, inference engine, and explanation system to facilitate problem-solving.

Uploaded by

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

Introduction to Expert

Systems

1
Introduction
„ Expert Systems provide expert quality advice,
diagnoses and recommendations on real world
problems
„ Designed to perform function of a human expert
„ Examples:
Medical diagnosis - program takes place of a doctor
„ given a set of symptoms the system suggests a diagnosis and
treatment
Car fault diagnosis - given car's symptoms, suggest what is
wrong with it

2
Introduction, cont.
„ Replace human expert decision making when not
available
„ Assist human expert when integrating various
decisions
„ Provides an ES user with
an appropriate hypothesis
methodology for knowledge storage and reuse
„ Border field to Knowledge-Based Systems,
Knowledge Management
„ Expert System – software systems simulating expert-
like decision making while keeping knowledge
separate from the reasoning mechanism
3
Expert Systems classification
„ Unlike classical problem solver, Expert Systems are
weak, less general, very case specific
„ Expert Systems classification:
Interpretation
Prediction
Diagnostic
Design & Configuration
Planning
Monitoring
Repair & Debugging
Instruction
Control

4
Underlying Philosophy
„ Knowledge representation
production rules
logic
semantic networks
frames, scripts, objects
„ Reasoning mechanism
knowledge-oriented reasoning
model-based reasoning
case-based reasoning

ï 5
General architecture of Expert Systems

6
General architecture of Expert Systems, cont.
„ The user interface
Enable the system to pose questions to the users
Provide explanations about why a particular question is
asked
Allow user queries
Display the derived results

7
General architecture of Expert Systems, cont.
„ The problem-specific database
All information about the current problem
All conclusion that the system has been able to derive
„ The knowledge base
Contains all of the relevant, domain-specific, problem
solving knowledge
Two perspectives: Nature and Format

ï 8
General architecture of Expert Systems, cont.
„ Inference Engine
1. Interpreter of the knowledge stored in the
knowlede base.
2. Find connections between the problem features
and solutions.
„ Explanation System
Justify ‘why’ a question was asked and ‘how’ it
reached some conclusion.

9
Logical inferences
„ The process of reasoning involves making
inferences from known facts.
„ Given a set of premises known (or thought to be
true) and a reasoning method, certain conclusions
can be inferred to also be true.
„ Making inferences involves the derivation of new
facts from a set of true facts.
„ Predicate logic provides a set of sound rules of
inference with which we can perform logical
inferences.

10
Logical inferences – Modus Ponens
„ The best known of these is modus ponens
„ If statements p and (p → q) are known to be true,
then we can infer that q is true.
„ The basis for rule-based reasoning
„ Example
If someone has flu then he has high temperature
∀X (has_flu(X) → high_temperature(X))

11
Logical inferences – Modus Ponens, cont.
„ If the statement
has_flu(omar)
is found in the database,
Then through modus ponens, we can infer
high_temperature(omar)

12
Logical inferences – Modus Tolens
„ If the statement (p → q) is known to be true, and q
is false, then p is false.
„ If the relationship ∀x (has_flu(x) →
high_temperature(x)) is true and if omar has no high
temperature, then he doesn’t have flu. That is if
¬ high_temperature(omar)
which implies, through modus tolens,
¬ has_flu(omar)

13
Deduction
„ Logically correct inference, i.e. deduction from true
premises is guaranteed to result in true conclusions.

„ The most accepted, understood method.

„ The basis of both propositional and predicate logics.

14
Deduction, cont.
„ For example,
IF Object A is larger than Object B
AND Object B is larger than Object C
THEN Object A is larger than Object C

„ In predicate logic, this is represented as


∀A∀B∀C (larger( A,B ) ∧ larger(B, C ) → larger( A, C ))

15
Deduction, cont.
„ If the following axioms exist:
larger(house, cat)
larger(car, cat)
„ Through deductive reasoning
larger(house, cat)
can be derived.

16
Abduction, cont.
„ The reasoning method commonly used for
generating explanations.
„ Unlike deduction, it does not guarantee a true
conclusion.
„ While abduction inference is unsound, it is quite
useful technique and we use it often in our daily
lives.
„ Assuming the following rule
∀x(has - flu(x ) → high_temperature( x ))

17
Abduction, cont.
„ Assuming the following axiom exists
high_temperature (khaled)
„ Abduction concludes
has_flu (khaled)
„ There could be other reasons why khaled has high
temperature

ï 18
Induction
„ Reasoning from particular facts or individual cases
to a general conclusion.
„ The basis of scientific discovery.
„ The most common form is:
P(A) is true
P(B) is true
„ Then by induction we conclude
∀x, P( x ) is true

19
Induction, cont.
„ Observing Khaled over a period of time and noted
that whenever he had high temperature, it turned out
that he had flu.

„ One could induce that


∀x, high_temperature( x ) → has_flu( x )

„ Obviously, this is not always true

20
Inferences in rule-based system

21
Inferences in rule-based system, cont.

22
Rule-based system example
here → fine ? here → no
not here → absent ? seen → no
absent and not seen → at home ? holiday → no
absent and seen → in the building sick
in the building → fine
at home and not holiday → sick
? here → yes
here and holiday → sick
fine

not here, in the building → fine ? here → yes


not here, not holiday → sick ? holiday → yes
sick

23
Data-driven × Goal-driven

here seen holiday

data driven

absent

building
home

goal driven

fine sick

24
Data-driven × Goal-driven
„ Data-driven (forward chaining) ~ configuration,
interpretation,
reasonable set of input data
data are given at the initial state
huge set of possible hypothesis
„ Goal-driven (backward chaining) ~ blood diagnostic,
theorem proving
limited number of goal hypothesis
data shall be acquired, complicated data about the object
less operators to start with at the goal rather than at the data

25
Forward chaining (Data-driven)

„ Rule 1: Y&D→Z
„ Rule 2: X&B&E→Y
„ Rule 3: A→X
„ Rule 4: C→L
„ Rule 5: L&M→N

26
Forward chaining (Data-driven), cont.
„ Reasoning starts from data and proceeds forward
with data.
„ Each time only the top most rule is executed.
„ When fired, the rule addes a new fact in the
database.
„ Any rule can be executed only once.
„ The match-fire cycle stops when no further rule can
be fired.

27
Forward chaining (Data-driven), cont.

28
Forward chaining (Data-driven), cont.

29
Forward chaining (Data-driven), cont.

30
Forward chaining (Data-driven), cont.

31
Backward chaining (Goal-driven)
„ The ES has the goal (a hypothetical solution) and the
inference engine attempts to prove it.
„ Find rules that might have the desired soltuion in the
THEN parts.
„ Subgoals might be needed in proving the IF parts.
„ Search rules that can prove the subgoals.
„ The process repeats.

32
Backward chaining (Goal-driven), cont.

33
Backward chaining (Goal-driven), cont.

ï 34
Backward chaining (Goal-driven), cont.

35
Backward chaining (Goal-driven), cont.

36
Backward chaining (Goal-driven), cont.

37
Backward chaining (Goal-driven), cont.

8
Forward or Backward Chaining?
„ Forward chaining - for analysis and interpretation.
For example, DENDRAL determines the molecular
structure of unknown soil based on its mass spectral data.

„ Backward chaining – for diagnosis.


For example, MYCIN diagnoses infections blood diseases.

„ Combining forward and backward chaining

39

You might also like