Professional Documents
Culture Documents
1
Expert System Main Components
and Human Interfaces
Inference
Engine
Expert System
2
How to Build Knowledge base for
Expert System?
Knowledge
Acquisition
Knowledge
Representation
Knowledge Representation
Definition:-
the method used to encode knowledge in an
intelligent systems knowledge base.
Objective:-
to express the acquired knowledge in computer-
tractable form, such that it can be used to help
expert systems making decision.
4
Knowledge Representation
Logical Rules
Representation
Object Techniques
Attribute Semantic
Value Networks
Frames
5
Knowledge Representation
Object-Attribute Value
6
Knowledge Representation
Logical Representation
represent knowledge, using mathematical or orthographic
symbols, inference rules and are based on precisely defined
syntax and semantics.
Logical
Representations
Higher Order
Predicate
Logic
Logic
First Order Proportional
Logic Logic
7
Knowledge Representation
Semantic Network
is a formal graphic language representing
facts about entities about which we could
reason.
8
Knowledge Representation
Semantic Network
9
Knowledge Representation
Semantic Network
13
Knowledge Representation
Rules
based on the general underlying idea of condition-
action pairs (also called if-then pairs, production
rules, or just plain productions).
- A production rule is written in the form
- if this condition holds, then this action is
appropriate.
14
Knowledge Representation
Rules -Syntax
(rule (name)
(if (trigger fact 1) (trigger fact 2)
:
:
(trigger fact n))
(then (conclusion fact 1, or action 1 )
(conclusion fact 2, or action 2)
:
:
(conclusion fact n, or action n)))
Knowledge Representation
Rules Example
Rule 1:if
the engine is getting gas, and
the engine will turn over,
then
the problem is spark plugs.
Rule 2:if
the engine does not turn over, and
the lights do not come on
then
the problem is battery or cables.
Rule 3:if
the engine does not turn over, and
the lights do come on
then
the problem is the starter motor.
Rule 4:if
there is gas in the fuel tank, and
there is gas in the carburator
then 16
Expert System
17
Inference Engine
Inference engine - draws conclusions from
the knowledge base.
Example of drawing to conclusion:-
If I tell you:
All boys have a mother
and that:
"John is a boy"
What can you tell me about John ? You are able to figure out
that:
"John has a mother
without being explicitly told this fact.
18
Inference Engine
19
Inference Engine
For a knowledge base which knowledge is
represented by rules, then forward chaining
and backward chaining are used to draw
conclusions.
Inference engine, it cycles through three
steps:
match facts against rules
select a rule
execute the rule
20
Inference Engine
Forward chaining (data-driven)
start with facts and use rules to draw conclusions/take
actions.
best for prognosis, monitoring, and control.
Examples: CLIPS, OPS5
Backward chaining (query driven) start
work backward from the goal/decision and look for rules
that can provided the desired goal/decision
best for diagnosis problems.
Examples: MYCIN
21
Inference Engine
Forward-chaining Example (A,B,D, and E are given)
If A then X
If X and B and E then Y
If Y and D then Z
If C then L
If L and M then N Not fired (executed)
22
Inference Engine
Forward-chaining - Example
23
Inference Engine
Backward-chaining Example (A,B,C, D and E are
given)
If Y and D then Z
If X and B and E then Y
If A then X
If C then L
Not fired (executed)
If L and M then N
24
Inference Engine
Backward-chaining Example
25
Inference Engine
Forward-Chaining or Backward-Chaining
which to use?
What do experts use?
Are we trying to prove a particular
decision?
Backward-Chaining
Are we trying to find all possible
solutions?
Forward-Chaining
26
Example Expert System
OBJECT NUMBER 22
Name: {orc_age_rpt}
Prompt: Please enter a value for the ORC_AGE_RPT.
Max. selections: open
Legal Values:
-OPEN STRING
-----------------
OBJECT NUMBER 23
Name: Two_Related_Cancers
Prompt: Have you ever been diagnosed with any TWO or more of the following cancers? Colon, Gastric, Small Bowel, Hepatobiliary, Pancreatic, Endometrial, Ovarian, Ren
pelvis, or Ureter.
Max. selections: 1
Legal Values:
-Yes
-No
-----------------
OBJECT NUMBER 24
Name: {Non_Related_Cancers}
Prompt: Please enter any additional CANCERS for which YOU have been diagnosed. Example: Breast, Lymphoma. If no other cancers, then type None.
Max. selections: open
Legal Values:
Example System (contd)
* * * * RULES SUMMARY * * * *
1. The need for the solution justifies the cost and effort of building an
expert system.