Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 109

Expert System and

Uncertainty
Objectives
Understand what is an expert system and
it’s components;
Understand what is uncertainty and how
fuzzy logic can be used to solve
uncertainty;
Construct a simple expert system using
Prolog.
Construct a simple system using fuzzy
logic toolbox in Matlab.
What is knowledge?
Knowledge is a theoretical or practical
understanding of a subject or a domain.
Those who possess knowledge are called experts.
Programmer
Isthe person responsible for the actual
programming, describing the domain
knowledge in terms that a computer can
understand.
End-user
Isa person who uses the expert system
when it is developed.
User must not only be confident in the
expert system’s performance but also feel
comfortable using it.
Relationship between development team and
ES structure
Structure of a rule-based ES
Inference engine
It caries out the reasoning whereby the
expert system reaches a solution.
It links the rules given in the knowledge
base with the facts provided in the
database.
Explanation facilities
Itenables the user to ask the expert
system how particular conclusion is
reached and why a specific fact is needed.
Knowledge base
It contains the domain knowledge useful
for problem solving.
It is represented as a set of rules with IF
(condition) THEN (action) structure.
Each rule specifies a relation,
recommendation, directive or heuristic.
When the condition part of a rule is
satisfied, the rule is said to fire and the
action part is executed.
Database
It includes a set of facts used to match
against the IF (condition) parts of rules
stored in the knowledge base.
Example of a family tree

Database/Facts

Knowledge base/Rules
Comparison of expert system with
conventional system and human expert…
Comparison of expert system with
conventional system and human expert
(con’t)
Can expert systems make mistakes?

Even a brilliant expert is only human and


thus can make mistakes.
Thus an expert system built to perform at
a human expert level also should be
allowed to make mistakes.
Thus, we can rely on solutions provided
by expert systems but mistakes are
possible and we should be aware of it.
Decision Tree (DT)
Rules in a knowledge base can be
represented as a Decision Tree (DT).
A DT is made up of connected decision
points
◦ Tree has starting decision (root).
◦ For each decision (starting from root), one of a set
of ongoing options is chosen.
◦ Choice is made based on conditions derived from
the character’s knowledge/values.
◦ Continue along the tree until the decision process
has no more decisions to make.
◦ Each leaf is an action, to be executed.
Combinations of Decisions
A decision tree is efficient because the
decisions are simple – only one test
condition at a time.
When Boolean combination of tests
(AND/OR) are required, some tree
structures can be used to represent them.
Sample decision tree (design) for a car
diagnostic ES
Sample decision tree (design) for a medical
ES
How does an ES reached a
conclusion?
The matching of the rule IF parts to the
facts produces inference chains.
The inference chain indicates how an ES
applies the rules to reach a conclusion.
Inference engine cycles via a
match-fire procedure
Types of inferences engine
Forward chaining is the data-driven
reasoning where it starts from the known
data and proceeds with that data
Backward chaining is the goal-driven
reasoning where the goal is known and
the inference engine attempts to find the
evidence to prove it.
An example of an inference chain
Forward chaining
Forward chaining
The reasoning starts from the known data
(eg. A) and proceeds forward with that
data.
When fired, the rule adds a new fact in
the database (eg. X).
Any rule can be executed only once per
cycle.
The match-fire cycle stops when no
further rules can be fired.
Weakness of forward chaining
rules that have nothing to do with the
established goal may be executed also.
Thus, if the goal is to infer only one
particular fact, forward chaining inference
technique would not be efficient.
Eg. In previous sample, rule L & M  N
has nothing to do with the goal but is still
executed.
Backward chaining
Backward chaining
First,the knowledge base is searched to
find rules that might have the desired
solution.
Such rules must have the goal in their
THEN (action) parts.
If such a rule is found and its IF
(condition) part matches data in the
database, then the rule is fired and the
goal is proved.
Backward chaining (con’t)
Inference engine puts aside the rule it is
working with (the rule is said to stack) and
sets up a new goal, a sub-goal, to prove the
IF part of this rule.
Then, the knowledge base is searched
again for rules that can prove the sub-goal.
The inference engine repeats the process
of stacking the rules until no more rules are
found in the knowledge base to prove the
current sub-goal.
How do we choose between forward
and backward chaining?
If an expert first needs to gather some
information and then tries to infer from it
whatever can be inferred, choose forward
chaining inference engine.
If an expert begins with a hypothetical
solution and then attempts to find facts to
prove it, choose backward chaining
inference engine.
UNCERTAINTY
What is uncertainty?
Itis defined as the lack of the exact
knowledge that would enable us to reach a
perfectly reliable conclusion.
Sources of uncertain knowledge
1) Weak implications.
2) Imprecise language.
3) Unknown data.
4) Combining the views of different
experts.
How can an expert system handle
uncertainty?
Experts rely on common sense when they
solve problems which may be uncertain
where they may use vague and ambiguous
terms.
 Expert system can handle uncertainty
using fuzzy logic and we can call it fuzzy
expert system.
What is fuzzy logic?
Fuzzy logic describes fuzziness that
involves the theory of fuzzy sets.
It reflects how people think and attempts
to model our sense of words, decision
making and common sense.
What is the difference between
boolean logic and fuzzy logic?
Boolean or crisp Fuzzy logic is a
logic is a two-valued multi-values logic
logic that uses sharp that employs the
distinction where a spectrum of colours,
line can be drawn accepting that things
between members of can be partly true and
a class and non- false at the same
members. time.
Fuzzy logic…
Fuzzy logic is a set of mathematical
principles for knowledge representation
based on degrees of membership.
Fuzzy logic…
The classical example in fuzzy sets is
‘Tall men’.
The elements of the fuzzy set ‘Tall men’
are all men but their degree of
membership depend on their height.
Sample fuzzy set for ‘Tall men’
Fuzzy logic (refer to previous
figure)
Review questions
What is expert system?
What is uncertainty?
What is fuzzy expert system?
What type of problem is suitable to be
solved using fuzzy expert system?

You might also like