Expert Systems in Artificial Intelligence
Expert Systems in Artificial Intelligence
Expert System
Sara Althubaiti
S
C
O
P
E Exper
t
Specif Syste
ic ms Understanding
Limit Dee
ed p
Brittleness
Only have access to highly specific domain knowledge
Cannot fall back on more general knowledge when needed.
Lack of Meta-Knowledge
Do not have sophisticated knowledge about their own operation.
Cannot reason about their own scope and limitations.
Knowledge Acquisition is a bottleneck in applying ES technology to new domains
Validation of an ES is difficult.
Expert Systems can make mistakes.
Expert System
Development Team
P
r
o
j
e
Domain Expert Knowledge
c Engineer Programmer
t
M
a
n
Expert System
a
g
e
r End-user
1. Knowledge engineer:
Capable of designing, building and testing an expert system.
He or she interviews the domain expert to find out how a particular problem
is solved.
The knowledge engineer establishes what reasoning methods the expert
uses to handle facts and rules and decides how to represent them in the
expert system.
The knowledge engineer then chooses some development software or an
expert system shell, or looks at programming languages for encoding the
knowledge.
And finally, the knowledge engineer is responsible for testing, revising and
integrating the expert system into the workplace.
Artificial Intelligence: A Modern Peter Norvig and Stuart
The main players in the development team
2. Programmer:
Responsible for the actual programming, describing the domain knowledge
in terms that a computer can understand.
The programmer needs to have skills in symbolic programming in such AI
languages as LISP, Prolog and OPS5, some experience in the application of
different types of expert system shells. In addition, the programmer should
know conventional programming languages like C++, Java, and …etc.
[Link] manager:
The leader of the expert system development team,
Responsible for keeping the project on track.
He or she makes sure that all deliverables and milestones are met, interacts
with the expert, knowledge engineer, programmer and end- user.
Artificial Intelligence: A Modern Peter Norvig and Stuart
The main players in the development team
4. End-user:
Person who uses the expert system when it is developed.
The design of the user interface of the expert system is vital for the
project’s success; the end-user’s contribution here can be crucial.
Phas Reformulations
e1
Assessm
ent
Requireme Exploratio
nts Phase 2 ns
Knowledge
Acquisition
Structure
Phase 4
Test
Evaluation
Phase 5
Documentation
Product
Phase 6
Artificial Intelligence: A Modern Maintenance Peter Norvig and Stuart
A Knowledge Engineer’s View of Intelligence
Decisions
Knowledge + Analysis/Deduction
Facts
+ RulesContext
”Raw” Data
+
User
Interface Knowledge-
may Base
employ:
Question- General
Use Knowledge
and-
Menu-
r Inference Base
Answer,
Driven,
Natural Engine
Language, Case-
specific
Graphica Data
Explanatio
l User n
Interface Facilities
Knowledge base:
Contains the domain knowledge useful for problem solving.
In a rule-based expert system, the knowledge is represented as a set of rules.
Each rule specifies a relation, recommendation, directive, strategy or heuristic and
has the IF (condition) THEN (action) structure.
ELSE part is the same as the THEN part and is applied if any of the IF conditions are
FALSE.
ELSE part is optional and not needed in most rules.
A rule can have multiple conditions joined by the keywords AND (conjunction), OR
(disjunction) or a combination of both.
IF <Condition1> IF <Condition1>
AND OR
<Condition2> <Condition2>
. .
...AND ...OR
<Condition n> <Condition n>
THEN THEN
<Action 1> <Action 1>
ELSE ELSE
<Action 2> <Action 2>
Inference engine:
Carries out the reasoning whereby the expert system reaches a solution.
Expert systems employ symbolic reasoning when solving a problem.
Symbols are used to represent different types of knowledge such as facts, concepts and rules.
It links the rules given in the knowledge base with the facts provided by the user.
Explanation facilities:
An expert system must be able to explain its reasoning and justify its advice, analysis or conclusion.
Enable the user to ask the expert system how a particular conclusion is reached and why a specific
fact is needed.
User interface:
The means of communication between a user seeking a solution to the problem and an expert
system.
Expert systems can also use mathematical operators to define an object as numerical
and assign it to the numerical value.
IF ‘age of the customer’<18 AND ‘cash withdrawal’> 1000
THEN‘ signature of the parent’s required
Executer:
Once a solution is critiqued, an executer applies the refined solution to the
current problem.
Evaluator:
If the results are as expected, no further analysis is made, and the cases with
its solution is stored for use in future problem solving.
If not, the solution is repaired
Black
Telepho
?
ne
Color
Ye ?
s Comput
White er
Make ?
Sta Black
rt s Floppy
?
Nois Disk
e? Color Rectangl
N ? Legal
e?
o Paper
Shap
Yellow e? Penc
? Cylindric il
al?
Rule 3: IF the item does not make noise AND the color is black
THEN floppy disk - confidence 10/10.
Rule 4: IF the item does not make noise AND the color is yellow AND the shape is rectangular.
THEN legal paper - confidence 7/10.
Rule 5: IF the item does not make noise AND the color is white AND the shape is cylindrical.
THEN pencil - confidence 8/10.
Artificial Intelligence: A Modern Peter Norvig and Stuart
Inference Engine Control Strategie
In a rule-based expert system, the domain knowledge is represented by a set of
IF-THEN production rules and data is represented by a set of facts about the
current situation.
Control Strategies for Execution of Rules
Forward Chaining
Starts with the facts, and sees what rules apply (and hence what
should be done) given the facts.
Backward Chaining
Begins with a goal and works backwards towards the initial conditions
will help in answering it.
F act: A is x
F act: B is y
Ma F
tch ire
K now led ge B
ase
R u le: IF A is x T H E N B is y
Rule 1: IF Y is true
AND D is true
A X
TH EN Z is true
Rule 2: IF X is true B Y
AND B is true
AND E is true Z
E D
TH EN Y is
true
Rule 3:
IF A is true
TH EN X is true
Artificial Intelligence: A Modern Peter Norvig and Stuart
Forward Chaining
Conclusi
Data Rule
on
Conclude from "A" and "A implies B" to "B“.
Example: If A - B
Category Example Notation
Data It is raining. A
Rule If it is raining, the street A->B
is wet
Conclusion The street is wet. B
Artificial Intelligence: A Modern Peter Norvig and Stuart
Forward Chaining (Data-Driven)
Reasoning
The reasoning starts from the known data and proceeds forward with
that data.
Each time only the topmost rule is executed.
When fired, the rule adds a new fact in the database.
Any rule can be executed only once.
The match-fire cycle stops when no further rules can be fired.
Conclusi
Rule Data
on
Conclude from "B" and "A implies B" to "A“.
Example
The expert system has the goal, and the inference engine attempts to find the
evidence to prove it.
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.
Thus the 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 rules are
found in the knowledge base to prove the current sub goal.
Artificial Intelligence: A Modern Peter Norvig and Stuart
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 the forward chaining inference
engine.
However, if the expert begins with a hypothetical solution and then
attempts to find facts to prove it, choose the backward chaining
inference engine.
Fire the most specific rule. This method is also known as the longest
matching strategy. It is based on the assumption that a specific rule
processes more information than a general one.
Fire the rule that uses the data most recently entered. This method relies
on time tags attached to each fact in the database. In the conflict set, the
expert system first fires the rule whose antecedent uses the data most
recently added to the database.
Artificial Intelligence: A Modern Peter Norvig and Stuart
Meta-Knowledge
Meta-knowledge can be simply defined as knowledge about knowledge.
Meta-knowledge is knowledge about the use and control of domain
knowledge in an expert system.
In rule-based expert systems, meta-knowledge is represented by meta-rules.
A meta-rule determines a strategy for the use of task-specific rules in the expert system.
Analysis
User/expert: Identify a potential application.
Knowledge Engineer: Is expert system the answer?
Task is well understood
Expertise exists, is reliable, and the solution is generally agreed upon.
Task is not too hard (but not too easy, either)
Specification
User/Expert and Knowledge Engineer work together to define the objectives of the expert system application:
Inputs
Outputs
Methodology
Decide how the inference, representation, and control structure can be used to replicate
the decision process.
Build the knowledge base.