0% found this document useful (0 votes)
11 views54 pages

Expert Systems in Artificial Intelligence

The document provides an overview of Expert Systems (ES) in Artificial Intelligence, detailing their definitions, criteria for development, advantages, and disadvantages. It outlines the roles of key personnel involved in ES development, including domain experts, knowledge engineers, and programmers, as well as the phases in the development process. Additionally, it discusses the architecture and components of an ES, including knowledge bases, inference engines, and user interfaces.

Uploaded by

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

Expert Systems in Artificial Intelligence

The document provides an overview of Expert Systems (ES) in Artificial Intelligence, detailing their definitions, criteria for development, advantages, and disadvantages. It outlines the roles of key personnel involved in ES development, including domain experts, knowledge engineers, and programmers, as well as the phases in the development process. Additionally, it discusses the architecture and components of an ES, including knowledge bases, inference engines, and user interfaces.

Uploaded by

saalsh849
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

ARTI 401: Artificial Intelligence: Principles and Techniques

Expert System
Sara Althubaiti

Artificial Intelligence: A Modern Peter Norvig and Stuart


Introducing Artificial
Intelligence
Introduction to Expert Systems (ES)
Criteria for Building an Expert System
Why and When to Use an Expert System?
Architecture of an Expert System
Components of an ES
Inference Engine Control Strategies
Building an ES

Artificial Intelligence: A Modern Peter Norvig and Stuart


Introduction: ES Definition
 Definitions
 A computer program designed to model the problem-solving ability of
a human expert.
Expert Systems Design and Development by Durkin
 A model and associated procedure that exhibits, within a specific
domain, a degree of expertise in problem solving that is comparable
to that of a human expert.
Expert Systems by Ignizio
 A computer system which emulates the decision-making ability of a
human expert.
Expert Systems: Principles and Programming by
Giarratano and Riley

Artificial Intelligence: A Modern Peter Norvig and Stuart


Criteria for Building an Expert
System
 Does a human know how to solve the problem?
 If no human expert exists, it is not possible to develop rules describing the problem.
 The techniques of solving the problem must be known and defined in order to create an expert system.
 Does the problem have a definable solution?
 If all of the possible solutions cannot be specified; writing rules to solve the problem is difficult.

 Is the level of understanding and scope appropriate?


 A problem that has too wide scope or requires too deep level of understanding is not appropriate for an
ES.
 An ES solves specific problems.
 Has the technique for solving the problem been documented?
 Solution may be a decision tree, manual procedure, written instructions, etc.
 Well-defined problems can be easily converted to an ES.

Artificial Intelligence: A Modern Peter Norvig and Stuart


Level of Understanding
 Problem should NOT have too large a scope or too deep a level of understanding.
 Defining the problem to fall within the shaded area of the graph is very
important.
Problems
Wide

S
C
O
P
E Exper
t
Specif Syste
ic ms Understanding
Limit Dee
ed p

Artificial Intelligence: A Modern Peter Norvig and Stuart


Why Use an Expert System?

 Frees expert from repetitive, routine jobs.


 Provides the beginner with expert advice on a specific subject.
 Wide distribution of rare human knowledge.
 Aids in training new employees.
 Improves worker productivity.
 Provides second opinion in critical situations.
 Especially valuable when tired or under stress.

Artificial Intelligence: A Modern Peter Norvig and Stuart


Technical Advantages of an Expert System

 Rapid prototype development


 Easier verification of software
 Easier maintenance of software
 Explains its reasoning in English to user when requested.
 Truly self documenting software.
 Easier to learn to build rule-based expert systems.
 Inexpensive technology.
 Automated consistency checking of knowledge in the KB.
Artificial Intelligence: A Modern Peter Norvig and Stuart
Comparison of a Human Expert & an Expert
System

Factor Human Expert Expert System


Time availability Workday Always
Geographic Local Anywhere
availability
Safety Irreplaceable Replaceable
Perishable/ Yes No
consumable
Performance Variable Consistent
Speed Variable Consistent (usually
faster)
Cost High Reasonable
Artificial Intelligence: A Modern Peter Norvig and Stuart
Disadvantages of an ES

 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.

Artificial Intelligence: A Modern Peter Norvig and Stuart


When to use an Expert
System?
 Final users agree that payoff will be high
Application is knowledge intensive
A human expert exists
Not a natural-language intensive application.
A wide range of test cases are available.
Neither creativity nor physical skills are required.

Artificial Intelligence: A Modern Peter Norvig and Stuart


Personnel Involved
 Domain Expert
 A person who posses some skills that allow him/her to draw upon past
experiences and quickly focus on the core of a given problem.
 Anyone can be considered a domain expert if he or she has deep knowledge (of
both facts and rules) and strong practical experience in a particular domain.
 User
 A person who will use the expert system and eventually benefit from the domain
expert’s knowledge.
 Knowledge Engineer
 A person who designs, develops, and implements expert systems (or other
artificial intelligent applications).

Artificial Intelligence: A Modern Peter Norvig and Stuart


The main players in the development team

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

Artificial Intelligence: A Modern Peter Norvig and Stuart


The main players in the development team

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.

Artificial Intelligence: A Modern Peter Norvig and Stuart


Phases in Expert System Development

Phas Reformulations
e1
Assessm
ent

Requireme Exploratio
nts Phase 2 ns
Knowledge
Acquisition

Knowledge Phase 3 Refineme


Design nts

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
+

Artificial Intelligence: A Modern Peter Norvig and Stuart


Architecture of an Expert System
Knowledge
Engineer

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

Artificial Intelligence: A Modern Peter Norvig and Stuart


Components of an Expert System

 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.

Artificial Intelligence: A Modern Peter Norvig and Stuart


Components of an Expert System

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>

Artificial Intelligence: A Modern Peter Norvig and Stuart


Components of an Expert System

 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.

Artificial Intelligence: A Modern Peter Norvig and Stuart


IF-THEN rules as a knowledge
representation

 Rules can represent relations, recommendations, directives, strategies and


heuristics:
 Relation
 IF the ‘fuel tank is empty’
 THEN the car is dead
 Recommendation
 IF the season is autumn
 AND the sky is cloudy
 AND the forecast is slightly rain
 THEN the advice is ‘take an umbrella’.

Artificial Intelligence: A Modern Peter Norvig and Stuart


IF-THEN rules as a knowledge representation
 Directive
 IF the car is dead AND the ‘fuel tank’ is empty
 THEN the action is ‘refuel the car’
 Strategy
 IF the car is dead
 THEN the action is ‘check the fuel tank’;
 Step 1 is complete
 IF step 1 is complete AND the ‘fuel tank’ is full
 THEN the action is ‘Check the battery’;
 Step 2 is complete

Artificial Intelligence: A Modern Peter Norvig and Stuart


IF-THEN rules as a knowledge representation
 Heuristic
 IF the spill is liquid AND the ‘spill pH’< 6 AND the ‘spill smell’ is vinegar
 THEN the ‘spill material’ is ‘acetic acid’

 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

Artificial Intelligence: A Modern Peter Norvig and Stuart


Another Way to Represent the Knowledge Base
(CBR)
 Case-based
 It retrieves cases relevant to the present problem situation from the case base and
decides on the solution to the current problem on the basis of the outcomes from
previous cases.
 A case-based ES consists of
 A case base
 A retriever
 An adapter
 A refiner
 An executer
 An evaluator
 A case base functions as a repository of prior cases.
 The cases are indexed so that they can be quickly recalled when necessary
 A case contains the general descriptions of old problems
Artificial Intelligence: A Modern Peter Norvig and Stuart
Another way to represent the Knowledge
Base
 A retriever:
 When a new problem is entered into a case-based system:
 A retriever decides on the features similar to the stored cases.
 Retrieval is done by using features of the new cases as indexes into the case base.
 An adapter
 Examines the differences between these cases and the current problem using
a similarity function.
 It then applies rules to modify the old solution to fit the new problem.
 A refiner
 Critiques the adapted solution against prior outcomes
 One way to do this is to compare it to similar solutions of prior cases.
 If a known failure exists for a derived solution, the system then decides whether the
similarities is sufficient to suspect that the new solution will fail

Artificial Intelligence: A Modern Peter Norvig and Stuart


Another way to represent the Knowledge
Base

 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

Artificial Intelligence: A Modern Peter Norvig and Stuart


The CBR Cycle

Artificial Intelligence: A Modern Peter Norvig and Stuart


Which Representation do we use?

 When to use Rule-Based Reasoning?


 When there is a lot of specific expert knowledge on a particular subject and the expert
can solve the problem sequentially.
 When an explanation or an audit trail of the solution is required.

 When to use Case-Based Reasoning?


 When the user wants to browse similar cases.
 When you have lots of typical situations or cases for the knowledge base.

Artificial Intelligence: A Modern Peter Norvig and Stuart


Confidence Modes
 One of the most powerful parts of an expert system is being able to
create rules which state that an answer is probably, but not definitely, true.
 Process accomplished by assigning confidence modes.
 Ways to assign confidence modes:
 0-10
 -100 to 100
 Increment/decrement system
 Custom formula

Artificial Intelligence: A Modern Peter Norvig and Stuart


Tree Structured Rules
 Model: items of a desk to include a telephone, a computer, a pencil,
legal paper, and floppy disks.

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?

Artificial Intelligence: A Modern Peter Norvig and Stuart


Converting Tree Structure to an Expert System

 Rule 1: IF the item makes noise AND the color is black


 THEN telephone - Confidence 9/10.

 Rule 2: IF the item makes noise AND the color is white


 THEN computer - confidence 10/10.

 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.

Artificial Intelligence: A Modern Peter Norvig and Stuart


Inference Engine Control Strategie

Artificial Intelligence: A Modern Peter Norvig and Stuart


Inference Engine Cycles
 The inference engine compares each rule stored in the knowledge base with
facts contained in the database. When the IF (condition) part of the rule
matches a fact, the rule is fired and its THEN (action) part is executed.
D atab ase

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

Artificial Intelligence: A Modern Peter Norvig and Stuart


An example of an Inference Chain

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.

 Forward chaining is a technique for gathering information and then


inferring from it whatever can be inferred.
 However, in forward chaining, many rules may be executed that have
nothing to do with the established goal.
 Therefore, if our goal is to infer only one particular fact, the forward
chaining inference
Artificial Intelligence: A Modern
technique would not be efficient. Peter Norvig and Stuart
Forward Chaining

Artificial Intelligence: A Modern Peter Norvig and Stuart


Backward chaining

Conclusi
Rule Data
on
 Conclude from "B" and "A implies B" to "A“.
 Example

Category Example Notation


Conclusion The street is wet. B
Rule If it is raining, the street A->B
is wet
Data It is raining. A
Artificial Intelligence: A Modern Peter Norvig and Stuart
Backward chaining (Goal-Driven) Reasoning

 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.

Artificial Intelligence: A Modern Peter Norvig and Stuart


Conflict Resolution
 If we have a KB with these 3 rules:  Thus both of them can be set to
fire when the condition part is
 Rule 1:
satisfied.
 IF the ‘traffic light’ is green
 These rules represent a conflict
 THEN the action is go.
set.
 Rule 2:
 The inference engine must
 IF the ‘traffic light’ is red
determine which rule to fire
 THEN the action is stop.
from such a set.
 Rule 3:  A method for choosing a rule to
 IF the ‘traffic light’ is red fire when more than one rule
 THEN the action is go. can be fired in a given cycle is
 Rule 2 and Rule 3, with the same IF part. called conflict resolution.
Artificial Intelligence: A Modern Peter Norvig and Stuart
Methods used for Conflict Resolutio
 Fire the rule with the highest priority.

 In simple applications, the priority can be established by placing the rules in an


appropriate order in the knowledge base.

 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.

 Meta-rule 1: Rules supplied by experts have higher priorities than rules


supplied by novices.
 Meta-rule 2: Rules governing the rescue of human lives have higher priorities
than rules concerned with clearing overloads on power system equipment.

Artificial Intelligence: A Modern Peter Norvig and Stuart


Building an Expert System
 Analysis
 Specification
 Development
 Deployment

Artificial Intelligence: A Modern Peter Norvig and Stuart


Analysis and Specification

 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

Artificial Intelligence: A Modern Peter Norvig and Stuart


Development
 Knowledge Engineer: Learns how the expert performs task:
 Called “knowledge acquisition”.
 Must cover current, historical, and hypothetical cases.

 Develop a conceptual model of the ES.


 Framework consists of high-level descriptions of the tasks and situations.

 Decide how the inference, representation, and control structure can be used to replicate
the decision process.
 Build the knowledge base.

 Verify and validate.


 Am I building the product right?
 Am I building the right product?
Artificial Intelligence: A Modern Peter Norvig and Stuart
Deployment

 Install the system for routine use.


 Fix bugs, update, and enhance.
 Go back to development phase.
 This loop remains active throughout the life cycle of the
project.

Artificial Intelligence: A Modern Peter Norvig and Stuart


Expert Systems vs. Conventional Programs

Characteristic Conventional Program Expert System


Control by... Information & control Knowledge separate from
integrated control
Solution by... Algorithm Rules & inference
Execution Generally sequential Opportunistic rules
Input Must be complete Can be Incomplete
Design Structured Little or none
Expansion Done in major jumps Incremental
Representatio Numeric Symbolic
n
Modify Difficult to modify Easy to modify
Results Final result given Recommendation
Interface Command interface Natural dialogue
Answers Optimal Solution Acceptable solution
Artificial Intelligence: A Modern Peter Norvig and Stuart
Application Categories
Interpretation Inferring situation from observations/data
Prediction Inferring likely consequences of situation
Diagnosis Inferring malfunctions
Design Configuring objects under constraints
Planning Developing plans to achieve goals
Monitoring Comparing observations to plans
Debugging Prescribing remedies for malfunctions
Repair Executing a plan to administer a remedy
Instruction Diagnosing, debugging, and correcting student performance
Control Managing system behavior
Selection Identifying best choice from a list of possibilities
Simulation Modeling the interaction between system components

Artificial Intelligence: A Modern Peter Norvig and Stuart


Prominent Expert Systems
 EXSYS
 Provides an easy to use user interface to develop traditional applications
or web-based solutions.
 DENDRAL
 Embedded a chemist’s knowledge of mass spectrometry rules to use in
analysis.
 MYCIN
 Used to diagnose infectious blood diseases and recommend antibiotics.
 CADUCEUS
 Used to analyze blood-borne infectious bacteria

Artificial Intelligence: A Modern Peter Norvig and Stuart


What is Expert System/Decision Support System?

 Expert System: Decision-making and/or problem-solving package


that can reach a level of performance comparable to (or even
exceeding that of) a human expert in some specialized and usually
narrow problem area.
 Decision Support System: Computer-based support systems which
help decision makers utilize data and models to solve semi-
structured or unstructured problems.

Artificial Intelligence: A Modern Peter Norvig and Stuart


Summary
 Expert system strengths:
 Corporate knowledge retained
 Knowledge can be incomplete -- the expertise can be expanded as needed.
Conventional programs must be “complete” before they can be used.
 Expert systems can act as consultant, instructor, or partner/colleague.
 Expert System limitations:
 Domain must often be restricted or narrow.
 Determination of expertise reliability and completeness is very difficult.
 Some knowledge doesn’t translate well to rules/cases.
 Expert Systems are expensive -- problem must be sufficiently complex to justify
the cost.
Artificial Intelligence: A Modern Peter Norvig and Stuart

You might also like