0% found this document useful (0 votes)
32 views

Lecture 8 Expert System

The document discusses an expert system lecture covering topics like what is an expert and expert system, the structure of an expert system including knowledge base, working memory and inference engine, knowledge representation using rules and frames, and inference strategies like forward and backward chaining. An example of a medical expert system diagnosing a patient is also provided.

Uploaded by

Muhammad Yasir
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)
32 views

Lecture 8 Expert System

The document discusses an expert system lecture covering topics like what is an expert and expert system, the structure of an expert system including knowledge base, working memory and inference engine, knowledge representation using rules and frames, and inference strategies like forward and backward chaining. An example of a medical expert system diagnosing a patient is also provided.

Uploaded by

Muhammad Yasir
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/ 40

Lecture 8: Expert System

Dr. Muhammad asif


Bahauddin Zakariya University
Spring 2024
Course Outline

Advanced
Introduction Expert Systems Topics

Problem
Solving Uncertainty Conclusion

Genetic
Algorithms Learning

Knowledge
Representation Planning
& Reasoning
What is an Expert?
■ What characterizes an ‘Expert’
❑ Specialized knowledge in a certain area
❑ Experience in the given area

❑ Explanation of decisions

❑ A skill set that enables the expert to translate the


specialized knowledge gained through experience into
solutions.
❑ e.g. Skin specialist, heart specialist, car mechanic,
architect, software designer.
What is an expert system?
■ “A computer program designed to model the
problem solving ability of a human expert”
Durkin
■ Aspects of the human expert that we wish to
model
❑ Knowledge

❑ Reasoning
Comparison of a Human Expert and an Expert System

■ Example: medical ES modelling a doctor, discuss each of the


following issues in that context.
■ The ES outperforms the ‘average’ doctor and is available in
regions where people may not have access to any medical
care at all otherwise.
Comparison
Issues Human Expert Expert System
Availability Limited Always
Geographic location Locally available Anywhere
Safety considerations Irreplaceable Can be replaced
Durability Depends on individual Non-perishable
Performance Variable High
Speed Variable High
Cost High Low
Learning Ability Variable/High Low
Explanation Variable Exact
Expert System Structure
Human Expert Expert System

Focused Area of Expertise Domain

Specialized Knowledge (stored in Domain Knowledge (stored in


LTM) Knowledge Base)

Case Facts (stored in STM) Case/Inferred Facts(stored in


Working Memory)
Reasoning Inference Engine

Solution Conclusions
Expert System Structure
Expert System

Working Memory
Analogy: STM
-Initial Case facts
-Inferred facts

Inference USER
Engine

Knowledge Base
STM: Short Term Memory
Analogy: LTM
LTM: Long Term Memory
- Domain Knowledge
Knowledge Base
■ Part of the expert system that contains the domain
knowledge
❑ Problem facts, Rules
❑ Concepts
❑ Relationships

■ One of the roles of the expert system designer is to act as


a knowledge engineer.
■ As discussed, one way of encoding that knowledge is in
the form of IF-THEN rules.
■ For example:
❑ Rule 1: IF x THEN y
❑ Rule 2: IF y THEN z
Working Memory
■ ‘Part of the expert system that contains the problem facts
that are discovered during the session’ Durkin
■ During a session:
❑ User presents some facts about the situation.

❑ These are stored in the working memory.

❑ Using these and the knowledge in the knowledge base,


new information is inferred and also added to the working
memory.
Inference Engine
■ Processor in an expert system that matches the facts
contained in the working memory with the domain
knowledge contained in the knowledge base, to draw
conclusions about the problem
■ If our knowledge is represented in the form of IF-THEN
rules, the Inference Engine has the following mechanism
❑ Match given facts in working memory to the premises of the
rules in the knowledge base, if match found, ‘fire’ the conclusion
of the rule, i.e. add the conclusion to the working memory.
❑ For example, using rules 1 and 2 in KB, inference engine can
deduce conclusion as: “IF x THEN z.”
knowledge Representation
■ Frame-based expert systems
❑ A frame specifies the attributes of a complex object.
❑ Frames for various object types have specified relationships
■ Rule-based expert systems
❑ Knowledge is represented by production rules
❑ A production rule, or simply a rule, consists of an IF part (a condition or
premise) and a THEN part (an action or conclusion). IF condition THEN
action (conclusion).
■ Explanation facility explains how the system arrived at the
recommendation.
12
Expert System Example: Family

Knowledge Base Working Memory


Rule 1: father (M.Tariq, Ali)
IF father (X, Y) father (M.Tariq, Ahmed)
AND father (X, Z)
THEN brother (Y, Z)
brother (Ali, Ahmed)
Rule 2:
payTuition (M.Tariq, Ali)
IF father (X, Y)
payTuition (M.Tariq,Ahmed)
THEN payTuition (X, Y)
like (Ali, Ahmed)
Rule 3:
IF brother (X, Y)
THEN like (X, Y)
Expert System Example: Raining

Knowledge Base Working Memory


Rule 1: person (Ali)
IF person(X)
AND person(Y) person (Ahmed)
AND likes (X, Y) cloudy ()
AND sameSchool(X,Y) likes(Ali, Ahmed)
THEN
sameSchool(Ali, Ahmed)
friends(X, Y)
Rule 2: weekend()
IF friends (X, Y)
AND weekend() friends(Ali, Ahmed)
THEN goToMovies(Ali)
goToMovies(X)
goToMovies(Ahmed)
goToMovies(Y)
Rule 3:
carryUmbrella(Ali)
IF goToMovies(X) carryUmbrella(Ahmed)
AND cloudy()
THEN
carryUmbrella(X)
Inference Strategies
■ Forward Chaining
■ Backward Chaining
Forward Chaining
■ How does a doctor go about diagnosing a patient.
❑ Asks for symptoms
❑ Infers diagnosis from symptoms
■ Data-driven approach
■ Forward Chaining: “Inference strategy that begins with a set
of known facts, derives new facts using rules whose premises
match the known facts, and continues this process until a
goal sate is reached or until no further rules have premises
that match the known or derived facts.
■ This approach is similar to modus ponens.
Forward Chaining

■ It is strategy of an expert system to answer the


question, “What can happen next?”
Backward Chaining
■ Inference engine starts with assumed (hypothesized) conclusion - the
goal or subgoal state – and attempts to match with the conclusion
(THEN) part of the rule.
■ If such a rule is found, its premise becomes the new subgoal.
■ If a hypothesized goal state cannot be supported by the premises,
the system will attempt to prove another goal state.
■ Backward chaining is best suited for applications in which the
possible conclusions are limited in number and well defined.

18
Backward Chaining

■ With this strategy, an expert system finds out the answer to the
question, “Why this happened?”

19
Doctor Example
■ Rules
❑ Rule 1
IF The patient has deep cough
AND We suspect an infection
THEN The patient has Pneumonia
❑ Rule 2

IF The patient’s temperature is above 100


THEN Patient has fever
❑ Rule 3

IF The patient has been sick for over a fortnight


AND The patient has a fever
THEN We suspect an infection
Doctor example
■ Case facts:
❑ Patients temperature= 103
❑ Patient has been sick for over a month
❑ Patient has violent coughing fits
■ Approach
❑ Add facts to working memory (WM)
❑ Take each rule in turn and check to see if any of its premises
match the facts in the WM
❑ When matches found for all premises of a rule, place the
conclusion of the rule in WM.
❑ Repeat this process till no more facts can be added.
Doctor Example First Pass
Rule, premise Status Working Memory
1, 1 True Temp= 103
Deep cough Sick for a month
Coughing fits
1, 2 Unknown Temp= 103
Suspect infection Sick for a month
Coughing fits
2, 1 True, fire rule Temp= 103
Temperature>100 Sick for a month
Coughing fits
Patient has fever
Doctor Example Second Pass
Rule, premise Status Working Memory
1, 1 True Temp= 103
Sick for a month
Deep cough Coughing fits
Patient has fever
Temp= 103
1, 2 Unknown Sick for a month
Suspect infection Coughing fits
Patient has fever
3, 1 True Temp= 103
Sick for over fortnight Sick for a month
Coughing fits
Patient has fever
3, 2 True, fire Temp= 103
Patient has fever Sick for a month
Coughing fits
Patient has fever
Infection
Issues
■ The forward chaining inference engine infers all possible
facts from the given facts
■ Has no way of distinguishing between important and
unimportant facts. Therefore, equal time spent on trivial
evidence as well as crucial facts
Application Areas
■ Classification - identify an object based on stated characteristics
■ Diagnosis Systems - infer malfunction or disease from observable
data
■ Monitoring - compare data from a continually observed system
to prescribe behaviour
■ Process Control - control a physical process based on monitoring
■ Design - configure a system according to specifications
■ Generation of Options - generate alternative solutions to a
problem
Expert System Examples
■ Medicine (MYCIN)
■ Manufacturing
■ Business (SMARTPlan)
■ Engineering (R1/XCON) PEACE, CAD tool to
assist in design of electronic structures.
■ Agriculture
■ Education (GUIDON)
Control Applications
■ Adaptively govern/regulate the behavior of a system
■ E.g. controlling a manufacturing process, or medical treatment
■ Obtain data about current system state, reason and predict future
state, recommend/execute adjustments
■ Example: VM
Design
■ Configure objects under given constraints.
■ e.g. XCON
■ Often use non-monotonic reasoning, because of implications of steps
on previous steps.
■ Eg. PEACE (Dincbas 1980) CAD tool to assist in design of electronic
structures.
Diagnosis and Prescription
■ Identify system malfunction points.
■ Have knowledge of possible faults as well as diagnosis methodology
extracted from technical experts
■ E.g. diagnosing patients symptoms.
■ Malfunctioning electronic structures
■ Most diagnosis ES have a prescription subsystem.
■ Such system are usually interactive, building on user information to
narrow down diagnosis.
Instruction and Simulation
■ Guide the instruction of a student in some topic. Tutoring
applications
■ Example: GUIDON( Clancey 1979)
❑ Instructs students in diagnosis of bacterial infections
❑ Strategy: presents user with case (of which it has solution), analyzes the
students response. It compares the students approach to its own and directs
student based on differences.
■ Simulation
❑ Model a process or system for operational study.
❑ May be used along with tutoring applications
Interpretation
■ ‘Produces an understanding of situation from given information’
Durkin
■ Example FXAA (1988) provides financial assistance for a commercial
bank. Looks at thousands of transactions and identifies irregularities.
Automated audit.
Planning and Prediction
■ E.g. recommending steps for a robot to carry out certain steps
■ Cash management planning
■ SMARTPlan is a strategic market planning expert (Beeral, 1993).
Suggests appropriate marketing mix required to achieve economic
success.
■ Predictions systems infer likely consequences from a given situation.
❑ Reason with time ordered information
Appropriate Domains for Expert Systems
■ Can the problem be effectively solved by conventional programming?
■ Suited to ill-structured problems
■ Is the domain well-bounded?
❑ e.g. a headache diagnosis system may eventually have to have domain
knowledge of many areas of medicine, not easy to limit diagnosis to one
conventional area.
■ Practical Issues
❑ Is some human expert willing to cooperate?
❑ Is the expert’s knowledge especially uncertain and heuristic? if so, ES may be
useful
People Involved in an Expert System Project
■ Project Manager
■ Domain Expert
■ Knowledge Engineer
■ Programmer
■ End User
People Involved in an Expert System Project
■ Domain Expert
❑ ‘A person who posses the skill and knowledge to solve a
specific problem in a manner superior to others’ Durkin
❑ Person(s) expertise is/are to be captured in the expert
system
❑ For out purposes, an expert should have:
■ Expert Knowledge in the given domain
■ Good Communication Skills
■ Availability
■ Readiness to co-operate
People Involved in an Expert System Project
■ Knowledge Engineer
❑ ‘A person who designs, builds and tests an Expert System’ Durkin
❑ Plays key role to identify, acquire and encode the expert
knowledge.
❑ Choose development software for encoding the knowledge.
❑ Responsible for testing, revising and integrating the expert
system into the workplace
■ Programmer
❑ A person who code the rules of Expert System using some
programming language such that a computer can understand.
❑ Posses skills in symbolic programming such as Prolog.
❑ May posses conventional programming language like Basic, C,
Python etc.
People Involved in an Expert System Project
■ Project Manager
❑ ‘A person who leads ES development team and responsible for
keeping project on track
❑ Makes sure that all deliverables and milestones are met, interacts
with the expert, knowledge engineer, programmer and end-user
■ End User
❑ A person who is beneficiary of Expert System.
❑ Be confident and comfortable to use it
Development of Expert Systems: Steps
■ Identify Problem Domain
• The problem must be suitable for an expert system to solve it.
• Find the experts in task domain for the ES project.
• Establish cost-effectiveness of the system.
■ Design the System
• Identify the ES Technology
• Know and establish the degree of integration with the other systems
and databases.
• Realize how the concepts can represent the domain knowledge best.

38
Development of Expert Systems: Steps
■ Develop the Prototype
• Acquire domain knowledge from the expert.
• Represent it in the form of If-THEN-ELSE rules.
■ Test and Refine the Prototype
• The knowledge engineer uses sample cases to test the prototype for any
deficiencies in performance.
• End users test the prototypes of the ES.
■ Develop and Maintain the ES
• Test and ensure the interaction of the ES with all elements of its environment,
including end users, databases, and other information systems.
• Document the ES project and Train the user to use ES.
• Keep the knowledge base up-to-date by regular review and update.
• Cater for new interfaces with other information systems.
39
When (Not) to Use an ES?
■ Expert systems are not suitable for all types of domains and
tasks especially when:
❑ Efficient conventional algorithms are known
❑ The main challenge is computation, not the knowledge
❑ Knowledge cannot be captured efficiently or used effectively
❑ Users are reluctant to apply an expert system, e.g. due to criticality
of task, high risk or high security demands

40

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy