0% found this document useful (0 votes)
59 views74 pages

Expert PDF

An expert system is a computer program that uses human expertise to solve problems that normally require human expertise. It consists of a knowledge base containing rules and facts, an inference engine that applies the rules to the facts to reach conclusions, and a user interface. Expert systems are useful when human experts are unavailable, expensive, or their knowledge needs improvement. The development of an expert system involves knowledge acquisition from human experts followed by iterative prototyping, testing, and refinement of the system.

Uploaded by

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

Expert PDF

An expert system is a computer program that uses human expertise to solve problems that normally require human expertise. It consists of a knowledge base containing rules and facts, an inference engine that applies the rules to the facts to reach conclusions, and a user interface. Expert systems are useful when human experts are unavailable, expensive, or their knowledge needs improvement. The development of an expert system involves knowledge acquisition from human experts followed by iterative prototyping, testing, and refinement of the system.

Uploaded by

Anshul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 74

UNIT - 3

Expert Systems
Definition
 According to Darlington:
“An expert system is a program that attempts to mimic human
expertise by applying inference methods to a specific body of
knowledge.”
 According to Turban:
“An expert system is a system that employs human knowledge
captured in a computer to solve problems that ordinarily
require human expertise.”
The use of experts system is
recommended when-
 Human experts are difficult to find,
 Human experts are expensive,
 Knowledge improvement is needed,
 Knowledge is difficult to acquire,
 Available information is poor, partial and incomplete,
 Problems are incompletely defined,
 Problem is subject to rapid change.
Elements of Expert System

1. KB: Rules (“IF-THEN statement) –KE


2. Domain Based Facts: Current Situation
3. INFERENCE ENGINE: KB+DBF Processing
Conclusion(s)
4. Explanation Mechanism: Definitions
5. USER INTERFACE
Development of an expert system
Cyclical development

Knowledge
acquisition

Prototype
Prototype
critiquing
development
Cyclical development

Knowledge Preliminary
acquisition exploration of field -
initial k.e. interviews

Prototype
Prototype
critiquing
development
Cyclical development

Knowledge Build a small


acquisition system containing
a few of the
features

Prototype
Prototype
critiquing
development
Cyclical development
Present the
prototype to the Knowledge
domain expert for acquisition
him/her to criticise
and improve

Prototype
Prototype
critiquing
development
Cyclical development

Knowledge Correct & expand


acquisition the knowledge on
the basis of the
D.E.’s comments

Prototype
Prototype
critiquing
development
Cyclical development

Knowledge Add more features,


acquisition and debug existing
features

Prototype
Prototype
critiquing
development
Cyclical development
Present the revised
prototype to the domain Knowledge
expert for him/her to acquisition
criticise and improve

Prototype
Prototype
critiquing
development
Cyclical development

Knowledge Correct & expand


acquisition the knowledge on
the basis of the
D.E.’s comments

Prototype
Prototype
critiquing
development
Cyclical development

Knowledge Add more features,


acquisition and debug
exisiting features

Prototype
Prototype
critiquing
development
Cyclical development
Present the revised
prototype to the domain Knowledge
expert for him/her to acquisition
criticise and improve

Prototype
Prototype
critiquing
development
Architecture
 The architecture of expert systems reflects the KEs
understanding of the method of representing knowledge
and of how to perform intelligent decision making tasks
with a computer –based system.

 Knowledge is in codified form within knowledge base.


 Inference engine uses the information provided to it by the knowledge
base.
 Knowledge base contains rules about the behavior of the elements.
 Some are called as rule based expert system.
 Knowledge acquisition facility:
 acquires knowledge from human expert.
 Contains rules in knowledge base and facts in domain base.
 Using self training the knowledge is upgraded.
Architecture
The User Interface
 The user of an ES can be a tester, a tutor, a pupil, or a customer.

 User Interface style could be menu-driven, question and answer,


natural language or graphics interface

 User interface facilities are designed to recognize


 The mode of the user
 The level of the user’s expertise
 Nature of the transaction
The User Interface
 An ES may obtain input from an online data source (database,text
file, web page, etc).
 An ES may be used to monitor a physical system, in which case
input may come directly from sensing devices.
 An ES may be used to control a physical system, in which case
output will be signals to the system.
 When interacting with humans, standard HCI (Human-Computer
Interaction) concerns apply.
Knowledge-base
 The power of problem solving is primarily the consequence of the
knowledge base and secondarily on the inference method
employed.

 A storehouse of knowledge primitives. The design of knowledge


representation scheme impacts the design of the inference engine,
the knowledge updating process, the explanation process and the
overall efficiency of the system.

 Therefore the selection of the knowledge representation scheme is


one of the most critical decision in ES design.
Components of the knowledge of the
ES
 Facts: Ex: Milk is white.

 Procedural rules: Well defined invariant rules that describe


fundamental sequences of events and relations relative to the
domain. ( Always check the traffic before merging onto the
freeway.)

 Heuristic rules: Rules of thumb gained by experience. An


expert also has a general conceptual model of the subject domain
and an overall scheme for finding a solution.
Inference Engine
 The inference engine controls the reasoning involved when the
system is run.

 It has its own mechanism for interpreting the stored knowledge


(in the appropriate form), and for sequencing the steps involved in
reaching conclusions.

 Inference here means any of the methods by which the system


reaches conclusions.
Inference Engine
 Facts All animals breathe oxygen.
All dogs are animals.

 Infer All dogs breathe oxygen.


Inference Mechanisms

GOAL
Forward chaining Backward chaining
fact driven goal driven
bottom - up top- down

Facts

The selection of the inference paradigm strongly influences the overall


performance of the ES
Explanation System
 If the user is to have confidence in the output from an ES, it will
be important for the ES to have ways of explaining how its
conclusions were arrived at.

It will be useful to allow the user to ask


 In response to a question from the ES:
WHY (did you ask that question)?

 After a conclusion has been presented:


HOW (did you reach that conclusion)?
Knowledge Refinement Subsystem

Knowledge refinement means analyzing experience and adjusting


the body of stored knowledge as a result.
People do this all the time, and a good ES can do it too.
This may consist merely of saving previous results for future
reference, to avoid repeating searches or computations.
OR it may involve feedback from the user, e.g.

You (the ES) gave me this advice and it was BAD/GOOD


Goals targeted by expert system builders
 Substituting for an unavailable human expert.
 Combining the knowledge and experience of experts
 Training new experts etc…
 They should be helpful for the human experts.
 Expert system should explain the line of reasoning.
Basic activities of expert system
Sno Category Problem addressed

1 Interpretation Inferring situation descriptions from sensor data


2 Prediction Inferring the consequences of given situations

3 Diagnosis Inferring system malfunctions from observations

4 Design Configuring objects under constraints

5 Planning Designing actions

6 Monitoring Comparing observations to expected outcomes

7 Debugging Prescribing remedies for malfunctions

8 Repair Executing plans to administer prescribed remedies

9 Instruction Diagnosing, debugging and repairing

10 control Governing overall system behavior.


Advantages
 Increased availability
 Reduced cost
 Reduced danger
 Performance
 Multiple expertise
 Increased reliability
 Explanation
 Fast response
 Steady, unemotional and complete response at all times
 Intelligent tutor
 Intelligent database
Stages in the development of an
expert systems
1. Statement of the problem to be
solved,
2. Search for an human expert,
3. Design of the expert system,
4. Selection of the degree of
participation of the user,
5. Selection of development tool,
shell or programming language,
6. Development of a prototype,
7. Prototype checking,
8. Refinement and generalization of
the prototype,
9. Maintenance
10. Updating.
Errors in development stages of an expert
system:
1. Experts’ knowledge errors,
2. Semantic errors,
3. Syntax errors,
4. Inference engine errors,
5. Inference chain errors,
6. Limits of ignorance errors.
Rule-base system
 An expert system or knowledge-based system is the
common term used to describe a rule-based processing
system. It consists three elements:
 A knowledge base (the set of if-then-else rules and
known facts)
 A working memory or database of derived facts and data
 An inference engine which contains the reasoning logic
used to process the rules and data.
An example of simple rule
if num_wheel =4 and motor=yes

then vehicle =automobile

Antecedent Clause
Consequent Clause
Rule (logic)
 Any rule consists of two parts: the IF part, called the
antecedent (premise or condition) and the THEN part
called the consequent (conclusion or action).
IF antecedent
THEN consequent
A rule can have multiple antecedents joined by the keywords AND
(conjunction), OR (disjunction) or a combination of both.

IF antecedent 1 AND antecedent 2 OR


antecedent 2
. .
. .
. .
AND antecedent n OR antecedent n

THEN consequent
 The antecedent of a rule incorporates two parts: an object
(linguistic object) and its value. The object and its value are
linked by an operator.
 The operator identifies the object and assigns the value.
Operators such as is, are, is not, are not, are used to assign a
symbolic value to a linguistic object.
 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’ is required
Rules can represent relations
 Relation

IF the ‘fuel tank’ is empty

THEN the car is dead


Rules can represent recommendations
 Recommendation

IF the season is autumn


ANDthe sky is cloudy
ANDthe forecast is drizzle

THEN the advice is ‘take an umbrella’


Rules can represent directives
 Directive

IF the car is dead


ANDthe ‘fuel tank’ is empty

THEN the action is ‘refuel the car’


Rules can represent strategies
 Strategy

IF the car is dead

THEN the action is ‘check the fuel tank’;


step1 is complete

IF step1 is complete
AND the ‘fuel tank’ is full

THEN the action is ‘check the battery’;


step2 is complete
Rules can represent heuristics
 Heuristic

IF the spill is liquid


ANDthe ‘spill pH’ < 6
ANDthe ‘spill smell’ is vinegar

THEN the ‘spill material’ is ‘acetic acid’


Components of a rule based expert system:
1. Knowledge engineering:
 People involved are
 The user
 The knowledge engineer
 Domain expert
 Selecting a way to represent knowledge
 Building prototype
2. Knowledge base:
 Contains set of production rules.
 The core of an expert system is the knowledge base.
 It is structured in the form of a tree that consists of root frame and sub frames.
3. The inference engine:
 It is the recognize-act part of the production system.
 It can be goal driven or data driven.
Verification validation and design
of expert system:
 Verification validation and design of expert system:
 Verification: ensures that the expert system has been developed
correctly.
 Validation: shows correctness with respect to user’s need. Deal
with whether the problem was solved or not.

 It is necessary to verify the consistency by looking the following:


 Redundant rules
 Conflicting rules
 Subsumed rules
 Unnecessary IF conditions
 Unreachable IF conditions
 Circular rule chains.
Redundant Rules
 Two rules are redundant if their IF parts are
equivalent and one or more conclusions are also
equivalent.
IF(NOT(Very high ? Load demand))
(NOT (Very low ? Water available))
THEN (assert (Type of plant ? Thermal))

IF (NOT (Very high ? Load Demand)


(VERY LOW ? Water available)))
THEN (assert(Type of plant ?Thermal))
Conflicting rules
 Two rules are conflicting if they succeed in the same situation
on but with conflicting conclusion.
IF(is?Generation hydal)
THEN (assert (Cost ? Generation low))
IF(is?Generation hydal)
THEN (assert(is? Generation conventional))
Subsumed rules
 Two rules are subsumed if they have the same conclusion, but
one contains additional constrains in situations in which it
succeeds.

IF (is ? Load demand medium)


THEN (is ? System reliable)
IF( (is ? Load demand medium)
( is ? Spinning Reserve High))
THEN( is ? System reliable)
Unnecessary IF condition
 Two rules contain unnecessary IF conditions if they have the
same conclusions.

IF(is ? Load demand medium)


THEN (is ? System reliable)
IF(NOT(is(Load demand is very high))
THEN(is ? System reliable)
Unreachable IF conditions
 If there is no match for an IF conditions, then it is called as
unreachable IF conditions.

IF (is ? Load demand high)


THEN (is ? Load demand high demand)
Circular rule chains
 A set of rules is circular if their chaining in the set make a
cycle.

IF(is ? Load demand medium)


THEN (is ? System reliable)
IF(is ? System reliable)
THEN (is ? Load demand medium)
Validation and Testing
 for completeness
 Unreferenced attribute values
 Unreferenced attribute values occur when some value in the set of
possible values of an object’s attribute are not covered by any rule’s IF
conditions.
 Illegal attribute values
 An illegal attribute value occur when a rule refers to an attribute value
that is not in the set of legal values.
 Dead IF conditions
 To achieve an IF condition in an IF-condition-driven system, either the
attributes of the IF condition must be obtained from the user of the IF
condition must be matched by an IF condition of one of the rules in the
rule sets. If neither of these requirements is satisfied, then the IF
condition is known as a dead end IF condition.
 Dead end goals
 To achieve a goal in a goal-driven system, either the attributes of the goal
must be obtained from the user or the goal must be matched by a
conclusion of one of the rules in the rule sets. If neither of these
requirements is satisfied, then the goal is known as a dead end goal.
 Unreachable conclusions
 Conclusions for which there are no matches in the database are called
unreachable conclusions.
 The impact of confidence factors
 +1 - rule is definitely true
 - 1 - rule is definitely false
 0 – the truth value is unknown
Machine learning expert system:
 System that learn from data or experience
 Important methods for machine learning:
 The precedent rule method
 The perceptron
 The pandemonium
 The nearest neighbour
 Learning as searching
 Parameter learning
 Structural learning
The precedent rule method:
 One of the simplest forms of machine learning.
 Set of inputs, set of conclusions and set of examples are
provided.
 Inputs are matched with the rules to get the
conclusion.
 For every possible combination of the inputs a
potential rule is created.
 For four inputs, number of rules are , nR=24
 An active rule is one that gives a conclusion.
 The perceptron:
 One of the earliest learning systems.
 It can be regarded as a binary classifier.
 Uses an error correction learning algorithm in which the weights
are modified after erroneous decisions.
 a function that maps its input (a real-valued vector) to an output
value (a single binary value):

 Where w is a vector of real-valued weights, w.x is the dot product


(which here computes a weighted sum), and b is the 'bias', a
constant term that does not depend on any input value.
 The value of f(x) (0 or 1) is used to classify as either a positive or a
negative instance, in the case of a binary classification problem.
 The pandemonium:
 It is considered as one of the most important pattern
recognizers.
 Four levels
 Input is obtained
 Input is analyzed
 Patterns that match the inputs are evaluated.
 Pattern with the highest fitness is selected.
 The nearest neighbour
 It is one of the most well known classifiers.
 A new unknown pattern is assigned to a class to which it
is closer.
 In the below example the test pattern is given class1 label.
 Learning as searching
 Search the solution using any optimal method.
 These methods drastically reduce the search time and give very
good results.
 Parameter learning:
 Including parameters in the knowledge base.
 Structural learning:
 Structural learning can be achieved using probability based
methods.
Probability-based Expert
systems
 All expert systems should incorporate uncertainty since they represent an
intuitive decision-making process. All intuitive decisions are subject to
uncertainty. Ex. Choosing your life partner, selecting the right car to buy, evaluation of a
job, decision about an education, selecting a meal when eating out, selecting the next book
to read, decide how to dress for today, and so on.
 To include uncertainty rules and statements, decisions are represented using
probability.
 The probability of an event A occurring or being ‘true’ can be represented as
P(A) or P[A]
 Combined probability of the events A1,A2,A3 can be written as
 P(A1 AND A 2 AND A3)=P(A1A2A3)
 P(A1 OR A2 OR A3)=P(A1+A2+A3)

 Random events: unpredictable events


 A trial: it is a procedure of observing the possible occurrence of an event
in order to determine whether or not it actually occurs.
 Subjective probability:
 It is a measure of the degree of a person’s belief than an event will
occur.
 Uncertainty may exist in an expert system in two possible ways.
 Type -1 uncertainty
 Uncertainty in the inputs
 This uncertainty is then propagated through the rules to the final
conclusion using some type of probability.
 Type -2 uncertainty
 Uncertainty in the validation of the rules in all circumstances, even if the
input events are certainly true.
Subjective probability and
probability laws
 The probability associated with the inputs to an expert system should be
considered subjective.
 C-event of an intermediate/ final conclusion.
 Ei -Event of the ith lower level condition to be true.
 E – Event of the combined events being true.
 E –Event of the combined Ei s being not true.
 P[C|E]- probability of a rule firing if the conditions are assigned true.
 P[C|E]- probability of a rule firing if the conditions are not true.
 P(E) – probability that the combined conditions are true.
 P(Ei)- probability that ith condition is true.
 P[CE]-probability that conclusions at a node is true and combined
conditions are true.
 P[C]- is the probability that the rule fires.
 P[C]=P[CE]+P[CE]
 Based on the uncertainties:
 P[C]= P[C|E] x P(E) +P[C|E] x P(E)
 Monte Carlo simulation:
 Procedure to solve any combined probability problem.
 Used for solving problems with inputs that are conditional
probabilities.
 Doesn’t require the use of equations, only definitions of combined
events is required.
Probability based models
Using examples of patient, diseases and symptoms`:
 Dependence models
 based on the dependency relationships between symptoms.
 General dependence model
 Contains maximum number of parameters.
 Relevant symptoms dependence model
 Number of model parameters are greatly reduced.
 Independence models
 They assume the statistical independence of symptoms for a given disease.
 This model is not realistic in many situations.
Uncertainty measures:
1. Certainty factors:
2. Theory of Evidence
3. Fuzzy logic
Difficulties in Developing
Expert Systems
Difficulties in Developing Expert
Systems
 Lack of Resources
 The lack of resources might be in the form of competent personnel or
appropriate software tools.
 Time
 Expert Systems take a large time to built.
 The development of an expert system from conceptualization to delivery
take a fairly long time.
 The time required to build a system depends on the complexity of the
problem and the number of people assigned to the application team.
 Careful project planning, full user involvement, and motivated and committed experts
assist in reducing the development time.
 Expectations
 If user expectations are not realistic, the end product will never be perceived as being
effective.
Applications of ES
1. Product-specific systems
 Commodity based
 Developed from single design to mass marketed product
 Examples : home appliances, office machines etc
2. Service-specific systems
 Generic task based
 Designed for many user to do same task
 Ex: DB acces assistant
3. Organization-specific systems
 Corporate goal based
 Designed for single organization use
 Ex: intelligent customer services assistant, expert configuration systems
4. Task-specific systems
 Personal workstations
 Designed for single key knowledge worker
 Ex: intelligent assistant for job shop scheduling
Expert System Tools
1. Inductive tools
2. Simple-and structured-rule based tools
3. Hybrid tools
4. Domain-specific tool
5. Small, medium and large rule-based tools
1. Inductive tools
 Generate rules from examples.
 Large inductive tools run on mainframes, while smaller ones
on PCs.
 Derived from experiments conducted in machine learning
 Developer feeds large amount of examples for the machine’s
information base.
 Tools use an algorithm to convert these examples into rules
and determine the order the system follow to answer the user.
2. Simple-and structured-rule based tools
 Simple-rules : IF-THEN rules
 Structured-rules : offer context trees, multiple instantiations,
confidence factors, powerful editors etc.

3. Hybrid tools
 Represent most complex ES development environments
 Work with objects
 Facilitate complex, graphically oriented interfaces
 Research purpose
4. Domain-specific tools
 For particular domain
 May incorporate any of the techniques as above
 Provide special development and user interfaces
5. Small, medium and large rule-based tools
 Small – Works on PC, Cost will be low, provides limited
support
 Medium – works on Workstations and large PC
 Large – woks on Mainframes
Evaluation of an ES Tool
 Factors to be considered
 Knowledge representation, inference and control
 Developer interface
 User interface
 System interface
 Training and support

You might also like