0% found this document useful (0 votes)
120 views26 pages

Intelligent Systems: University of Colombo School of Computing

This document discusses intelligent systems and expert systems. It provides details on what expert systems are, how they work, and their components. Expert systems use human expert knowledge, encoded as rules, to infer conclusions and explanations. They interact with users to solve problems typically requiring human expertise. Key components include the knowledge base containing rules, an inference engine for reasoning, and a user interface. The document also discusses implementing expert systems using rule-based and uncertain reasoning.

Uploaded by

ridzuancom
Copyright
© Attribution Non-Commercial (BY-NC)
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)
120 views26 pages

Intelligent Systems: University of Colombo School of Computing

This document discusses intelligent systems and expert systems. It provides details on what expert systems are, how they work, and their components. Expert systems use human expert knowledge, encoded as rules, to infer conclusions and explanations. They interact with users to solve problems typically requiring human expertise. Key components include the knowledge base containing rules, an inference engine for reasoning, and a user interface. The document also discusses implementing expert systems using rule-based and uncertain reasoning.

Uploaded by

ridzuancom
Copyright
© Attribution Non-Commercial (BY-NC)
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

Intelligent Systems

Ruvan Weerasinghe

University of Colombo School of Computing
Expert Systems
Focus on know-how in narrow knowledge
domain and not general problem solving
Begun by Feigenbaum and associates as an
effort to codify experts know-how
Became popular and got into commercial
systems in the 1980s
From DENDRAL and MYCIN to XCON
What is an Expert System?
A knowledge intensive program that solves
problems that normally require expertise by
codifying human expert knowledge
providing a mechanism for inferencing based
on forward or backward chaining
asking relevant questions about the problem
explaining the reasons behind its conclusions
Characteristics of an ES
Encodes complex interacting sets of rules
not usually solvable using simple (mutually
exclusive) if-then rules
Interacts with user in finding solution
Knowledge base and Inference engine are
distinguished and separated
Can handle uncertainty
Follows multiple competing hypotheses
Provide explanations
Uses of ES
When expertise in domain is scarce
When experts are not available at required
location and/or time
As an instrument to upgrade the
performance of the less skilled
To capture/archive knowledge that may be
lost in the future
The Anatomy of an ES
Knowledge
Base
Inference
Engine
Expert System
User
Interface
User
Knowledge
Acquisition
System
Knowledge
Engineer/ Expert
Encoding Knowledge in ESs
Most commonly implemented as Rules:
e.g.
IF sky is clear
THEN forecast is sunny
Can also be implemented using other
knowledge representation schemes
e.g. Semantic Nets, Frames etc.

Inferencing in ESs
Most commonly implemented as
Backward chaining from hypotheses
i.e. deductive reasoning
Can also be implemented in other ways
Forward chaining from data (inductive reasoning)
Combined approach from both ends

User Interface to ESs
Reasoning process can be tracked
User is queried for data
But can also query the ES back!
Two main questions:
Why questions (when being queried): to ask ES
why it is asking the user a particular question
How questions (when conclusion made): to ask ES
to explain how it came to a the conclusion
The ES Algorithm
User provides details of case at hand
Case is matched against KB to find all
applicable hypotheses
Questions are asked by the ES to establish
the truth value of one of the hypotheses
If this fails, an alternative hypothesis is tried
Repeat this process until hypothesis verified
or the system exhausts all possibilities
Uncertainty in ESs
User input data may be non-crisp
If-then-else rules may involve uncertainty
An uncertainty calculus may be required to
calculate levels or degrees of certainty
Conclusions may have confidence limits
attached to them
Common methods: Bayesian Statistics
Fuzzy Logic
Consider a simple rule:
IF A is X THEN B is Y
Example:
IF A is X
THEN B is Y {cf 0.7}
(but B is Z {cf 0.2} maybe)
The certainty factor that B is Y is:
cf(B is Y) = cf(A is X) cf(RULE)
Calculating Uncertainty
For example:
IF sky is clear
THEN forecast is sunny {cf 0.8}
Now suppose the certainty factor of sky
being clear is 0.5, then
cf(Sky is clear) = 0.5 0.8 = 0.4
Which means, It may be sunny
Example for Uncertainty
Uncertainty Terms
Term
Definitely not
Almost certainly not
Probably not
Maybe not
Unknown
Certainty Factor
+0.4
+0.6
+0.8
+1.0
Maybe
Probably
Almost certainly
Definitely
1.0
_
0.8
_
0.6
_
0.4
_
0.2 to +0.2
_
When multiple conditions (AND) apply: e.g.
IF evidence E1

AND evidence En
THEN hypothesis H {cf }
The certainty of hypothesis H in this case is
established as follows:
cf(H,E1E2...En) = min{cf(E1), cf(E2),...,
cf(En)} cf(RULE)

Realistic Example 1
For example:
IF sky is clear
AND forecast is sunny
THEN wear sunglasses {cf 0.8}
Now if the certainty of sky is clear is 0.9 and
the certainty of the forecast of sunny is 0.7,
then
cf (H,E1E2) = min{0.9, 0.7} x 0.8 = 0.7 x 0.8 =
0.56
Realistic Example 1 (contd.)
When multiple conditions (OR) apply: e.g.
IF evidence E1

OR evidence En
THEN hypothesis H {cf }
The certainty of hypothesis H in this case is
established as follows:
cf(H,E1E2...En) = max{cf(E1), cf(E2),...,
cf(En)} cf(RULE)

Realistic Example 2
For example,
IF sky is overcast
OR the forecast is rain
THEN take an umbrella {cf 0.9}
Now if the certainty of sky is overcast is 0.6
and the certainty of the forecast of rain is 0.8,
then
cf (H,E1 E2) = max{0.6, 0.8} x 0.9 = 0.8 x 0.9
= 0.72
Realistic Example 2 (contd.)
When the same consequent is obtained as a
result of the execution of two or more rules:
Rule 1: IF A is X
THEN C is Z {cf 0.8}
Rule 2: IF B is Y
THEN C is Z {cf 0.6}
What certainty should be assigned to object
C having value Z if both Rule 1 and Rule 2
are fired?

A Final Example
Common sense suggests that, if we have two
pieces of evidence (A is X and B is Y) from
different sources (Rule 1 and Rule 2)
supporting the same hypothesis (C is Z), then
the confidence in this hypothesis should
increase and become stronger than if only
one piece of evidence had been obtained.

A Final Example (contd.)
A Final Example (contd.)
if cf
1
> 0 and cf
2
> 0

cf
1
+ cf
2
(1 cf
1
)
cf (cf
1
, cf
2
) =
1 min |,cf
1
,, ,cf
2
,|
cf
1
+ cf
2
cf
1
+ cf
2
(1 + cf
1
)
if cf
1
< 0 or cf
2
< 0
if cf
1
< 0 and cf
2
< 0
where: cf
1
is the confidence in hypothesis H
established by Rule 1; cf
2
is the confidence in
hypothesis H established by Rule 2; and ,cf
1
, and
,cf
2
, are absolute magnitudes of cf
1
and cf
2
,
respectively.
The certainty factors theory provides a
practical alternative to Bayesian reasoning.
The heuristic manner of combining certainty
factors is different from the manner in which
they would be combined if they were
probabilities. The certainty theory is not
mathematically pure but does mimic the
thinking process of a human expert.

Summary of Uncertain Reasoning
ES: the Good and the Bad
Simple rule-based implementation (subset
of PC) used commonly
Clear separation of KB and IE
Explanatory power through how and why
questions
Rigid set of unchanging rules
Usually expects crisp rules
Knowledge acquisition bottleneck
Implementing an ES in Prolog
Case Study: Diagnosing water leaks
A simple implementation of if-then
(production) rules
Problems of using Prologs built-in (default)
method of inferencing
Indistinguishablity of KB and IE
Difficulty in encoding knowledge
Supporting Forward Chaining
A Better Approach
A language independent implementation
Defining if, then, and and or operators
The new Knowledge Base
The rule interpreter (Inference Engine)
A forward chaining rule interpreter
Which is better?
Mixing directions
Other Issues
Implementing a simple explanation
generator
More advanced examples
Introducing uncertainty in rules
Implementing a rule interpreter for handling
uncertain rules
Towards an Expert System Shell

You might also like