SlideShare a Scribd company logo
1 of 28
EXPERT SYSTEM
How computers gain expertise?
What is an EXPERT SYSTEM?
● An expert system is a computer expert that emulates the decision making
ability of a human expert.
● Expert system, a computer program that uses artificial intelligence methods
to solve complex problems within a specialized domain that ordinarily
requires human expertise.
Example: Making of a medical diagnosis expert
system
● A medical diagnosis expert system lets the user diagnose his disease without
going to a real doctor (but of course, user has to go to a real doctor for
treatment)
How does the EXPERT SYSTEM gain
EXPERTISE?
How does medical diagnosis expert system gain
expertise?
Components of an Expert System
1. Knowledge Base
2. Inference Engine
3. User Interface
1. Knowledge Base
● A knowledge base is an organized collection of facts about the system’s
domain.
● Facts for a knowledge base must be acquired from human experts through
interviews and observations.
● This knowledge is then usually represented in the form of “if-then” rules
(production rules): “If some condition is true, then the following inference can
be made (or some action taken).”
● A probability factor is often attached to the conclusion of each production
rule and to the ultimate recommendation, because the conclusion is not a
certainty.
Components of Knowledge Base
● Factual Knowledge − It is the information widely accepted by the Knowledge
Engineers and scholars in the task domain.
● Heuristic Knowledge − It is about practice, accurate judgement, one’s ability
of evaluation, and guessing.
Knowledge Acquisition
● The knowledge base is formed by readings from various experts, scholars,
and the Knowledge Engineers. The knowledge engineer is a person with the
qualities of empathy, quick learning, and case analyzing skills.
● He acquires information from subject expert by recording, interviewing, and
observing him at work, etc.
● He then categorizes and organizes the information in a meaningful way, in
the form of IF-THEN-ELSE rules, to be used by interference machine. The
knowledge engineer also monitors the development of the ES.
Knowledge Base for Medical Diagnosis Expert
system
Symptoms Disease
Fever, cough, conjunctivitis, running nose, rashes Measles
Fever,headache, ache, conjunctivitis, chills,sore
throat,cough,running nose
Flu
Headache, sneezing, sore throat, running nose,
chills
Cold
Fever, chills,ache,rashes Chickenpox
2. The Inference Engine
● An inference engine interprets and evaluates the facts in the knowledge
base in order to provide an answer or to reach a goal state
● For example, if the KB contains the production rules “if x, then y” and “if y, then
z,” the inference engine is able to deduce “if x, then z.”
● In medical diagnosis ES, if a user has Fever, chills,ache,rashes, then user
is suffering from chickenpox
● Strategies used by the inference engine
○ Forward chaining
○ Backward chaining
Forward Chaining
● “What can happen next?”
● It is a data-driven strategy.
● The inferencing process moves from the facts of the case to a goal
(conclusion).
● The inference engine attempts to match the condition (IF) part of each rule in
the knowledge base with the facts currently available in the working memory.
● If several rules match, a conflict resolution procedure is invoked;
Forward chaining diagram
Forward Chaining in Medical Diagnosis ES
● A user has fever, headache, ache, conjunctivitis, chills,sore
throat,cough,running nose.
● In forward chaining, the inference engine will use the symptoms specified to
conclude to the disease the user is suffering from.
● After going through the above symptoms, the inference engine concludes that
the user is suffering from flu by checking the knowledge base.
Backward Chaining
● “Why this happened?”
● On the basis of what has already happened, the Inference Engine tries to find
out which conditions could have happened in the past for this result.
● This strategy is followed for finding out cause or reason.
● The inference engine attempts to match the assumed (hypothesized)
conclusion - the goal or subgoal state - with the conclusion (THEN) part of the
rule.
● If such a rule is found, its premise becomes the new subgoal.
● In an ES with few possible goal states, this is a good strategy to pursue.
Backward Chaining Diagram
Backward Chaining in Medical Diagnosis ES
● Suppose a user has measles.
● Now, the inference engine will look up in the knowledge base to derive the
symptoms that could have resulted in measles.
● It inferred that the symptoms were fever, cough, conjunctivitis, running nose,
rashes.
● This worked as only few states were present.
3. User Interface
● User interface provides interaction between user of the ES and the ES itself.
● The user of the ES need not be necessarily an expert in Artificial Intelligence.
● It explains how the ES has arrived at a particular recommendation. The
explanation may appear in the following forms −
○ Natural language displayed on screen.
○ Verbal narrations in natural language.
○ Listing of rule numbers displayed on the screen.
Code for medical diagnosis ES: 1
#include <iostream>
using namespace std;
void measels(char,char,char,char,char);
void flu(char,char,char,char,char,char,char,char);
void cold(char,char,char,char,char);
void chickenpox(char,char,char,char);
Code for medical diagnosis ES: 2
int main()
{
char name[50];
char a,b,c,d,e,f,g,h,i,j,k;
cout << "Please enter your name.. " << endl;
cin>> name;
cout << "Do you have fever? (y/n)"<< endl;
cin>>a;
cout << "Do you have rashes? (y/n)"<< endl;
Code for medical diagnosis ES: 3
cin>>b;
cout << "Do you have headache? (y/n)"<< endl;
cin>>c;
cout << "Do you have running nose? (y/n)"<< endl;
cin>>d;
cout << "Do you have conjunctivitis? (y/n)"<< endl;
cin>>e;
cout << "Do you have cough? (y/n)"<< endl;
cin>>f;
cout << "Do you have ache? (y/n)"<< endl;
Code for medical diagnosis ES: 4
cin>>g;
cout << "Do you have chills? (y/n)"<< endl;
cin>>h;
cout << "Do you have swollen glands? (y/n)"<< endl;
cin>>i;
cout << "Do you have sneezing? (y/n)"<< endl;
cin>>j;
cout << "Do you have sore throat? (y/n)"<< endl;
cin>>k;
Code for medical diagnosis ES: 5
measles(a,f,e,d,b);
flu(a,c,g,e,h,k,f,d);
cold(c,j,k,d,h);
chickenpox(a,h,g,b);
return 0;
}
Code for medical diagnosis ES: 6
void measles(char q,char w,char r,char t,char y)
{
if(q=='y'&&w=='y'&& r=='y' && t=='y' && y== 'y')
cout<< "You may have measles"<< endl;
else
cout<< "";
}
Code for medical diagnosis ES: 7
void flu(char q,char w,char r,char t,char y,char p,char l,char x)
{
if(q=='y'&&w=='y'&& r=='y' && t=='y' && y== 'y'&& p=='y' && l=='y' && x=='y')
cout<< "You may have flu."<< endl;
else
cout<< "";
}
Output to the User Interface
Applications of Expert System
Limitations of Expert System
No technology offers an easy and total solution. Large systems are costly and
require significant development time and computer resources. ESs also have their
limitations which include:
● Limitations of the technology
● Problems with knowledge acquisition
● Maintaining human expertise in organizations
● https://www.youtube.com/watch?v=TRzBk_KuIaM&t=460s

More Related Content

Similar to Expert Systems

ApplyingElectroencephalography inEstablishing SafetyCriterion byMeasuring Men...
ApplyingElectroencephalography inEstablishing SafetyCriterion byMeasuring Men...ApplyingElectroencephalography inEstablishing SafetyCriterion byMeasuring Men...
ApplyingElectroencephalography inEstablishing SafetyCriterion byMeasuring Men...IJRTEMJOURNAL
 
ApplyingElectroencephalography inEstablishing SafetyCriterion byMeasuring Men...
ApplyingElectroencephalography inEstablishing SafetyCriterion byMeasuring Men...ApplyingElectroencephalography inEstablishing SafetyCriterion byMeasuring Men...
ApplyingElectroencephalography inEstablishing SafetyCriterion byMeasuring Men...journal ijrtem
 
Expert System in Artificial Intelligence
Expert System in Artificial IntelligenceExpert System in Artificial Intelligence
Expert System in Artificial Intelligences7118080008
 
Plug In Generator To Produce Variant Outputs For Unique Data.
Plug In Generator To Produce Variant Outputs For Unique Data.Plug In Generator To Produce Variant Outputs For Unique Data.
Plug In Generator To Produce Variant Outputs For Unique Data.IJRES Journal
 
heart disease predction using machiine learning
heart disease predction using machiine learningheart disease predction using machiine learning
heart disease predction using machiine learningPODILAPRAVALLIKA0576
 
The Role of Normware in Trustworthy and Explainable AI
The Role of Normware in Trustworthy and Explainable AIThe Role of Normware in Trustworthy and Explainable AI
The Role of Normware in Trustworthy and Explainable AIGiovanni Sileno
 
IRJET- Health Monitoring and Stress Detection System
IRJET-  	  Health Monitoring and Stress Detection SystemIRJET-  	  Health Monitoring and Stress Detection System
IRJET- Health Monitoring and Stress Detection SystemIRJET Journal
 
Multiple disease prediction using Machine Learning Algorithms
Multiple disease prediction using Machine Learning AlgorithmsMultiple disease prediction using Machine Learning Algorithms
Multiple disease prediction using Machine Learning AlgorithmsIRJET Journal
 
Spinesense: Advanced Pain Detection System for Spinal Cord
Spinesense: Advanced Pain Detection System for Spinal CordSpinesense: Advanced Pain Detection System for Spinal Cord
Spinesense: Advanced Pain Detection System for Spinal CordIRJET Journal
 
Research on Multidimensional Expert System Based on Facial Expression And Phy...
Research on Multidimensional Expert System Based on Facial Expression And Phy...Research on Multidimensional Expert System Based on Facial Expression And Phy...
Research on Multidimensional Expert System Based on Facial Expression And Phy...IJRESJOURNAL
 
Information Retrieval from Emotions and Eye Blinks with help of Sensor Nodes
Information Retrieval from Emotions and Eye Blinks with help of Sensor Nodes Information Retrieval from Emotions and Eye Blinks with help of Sensor Nodes
Information Retrieval from Emotions and Eye Blinks with help of Sensor Nodes IJECEIAES
 
Brain Fingerprinting
Brain FingerprintingBrain Fingerprinting
Brain FingerprintingAradhya Kundu
 
Brain Fingerprinting
Brain FingerprintingBrain Fingerprinting
Brain FingerprintingAradhya Kundu
 
IRJET- Health Monitoring System using Arduino
IRJET- Health Monitoring System using ArduinoIRJET- Health Monitoring System using Arduino
IRJET- Health Monitoring System using ArduinoIRJET Journal
 

Similar to Expert Systems (20)

6.expert systems
6.expert systems6.expert systems
6.expert systems
 
ApplyingElectroencephalography inEstablishing SafetyCriterion byMeasuring Men...
ApplyingElectroencephalography inEstablishing SafetyCriterion byMeasuring Men...ApplyingElectroencephalography inEstablishing SafetyCriterion byMeasuring Men...
ApplyingElectroencephalography inEstablishing SafetyCriterion byMeasuring Men...
 
ApplyingElectroencephalography inEstablishing SafetyCriterion byMeasuring Men...
ApplyingElectroencephalography inEstablishing SafetyCriterion byMeasuring Men...ApplyingElectroencephalography inEstablishing SafetyCriterion byMeasuring Men...
ApplyingElectroencephalography inEstablishing SafetyCriterion byMeasuring Men...
 
Expert System in Artificial Intelligence
Expert System in Artificial IntelligenceExpert System in Artificial Intelligence
Expert System in Artificial Intelligence
 
Plug In Generator To Produce Variant Outputs For Unique Data.
Plug In Generator To Produce Variant Outputs For Unique Data.Plug In Generator To Produce Variant Outputs For Unique Data.
Plug In Generator To Produce Variant Outputs For Unique Data.
 
06.09.26
06.09.2606.09.26
06.09.26
 
Expert Systems
Expert SystemsExpert Systems
Expert Systems
 
heart disease predction using machiine learning
heart disease predction using machiine learningheart disease predction using machiine learning
heart disease predction using machiine learning
 
The Role of Normware in Trustworthy and Explainable AI
The Role of Normware in Trustworthy and Explainable AIThe Role of Normware in Trustworthy and Explainable AI
The Role of Normware in Trustworthy and Explainable AI
 
AI System.pptx
AI System.pptxAI System.pptx
AI System.pptx
 
IRJET- Health Monitoring and Stress Detection System
IRJET-  	  Health Monitoring and Stress Detection SystemIRJET-  	  Health Monitoring and Stress Detection System
IRJET- Health Monitoring and Stress Detection System
 
Multiple disease prediction using Machine Learning Algorithms
Multiple disease prediction using Machine Learning AlgorithmsMultiple disease prediction using Machine Learning Algorithms
Multiple disease prediction using Machine Learning Algorithms
 
Spinesense: Advanced Pain Detection System for Spinal Cord
Spinesense: Advanced Pain Detection System for Spinal CordSpinesense: Advanced Pain Detection System for Spinal Cord
Spinesense: Advanced Pain Detection System for Spinal Cord
 
Research on Multidimensional Expert System Based on Facial Expression And Phy...
Research on Multidimensional Expert System Based on Facial Expression And Phy...Research on Multidimensional Expert System Based on Facial Expression And Phy...
Research on Multidimensional Expert System Based on Facial Expression And Phy...
 
Information Retrieval from Emotions and Eye Blinks with help of Sensor Nodes
Information Retrieval from Emotions and Eye Blinks with help of Sensor Nodes Information Retrieval from Emotions and Eye Blinks with help of Sensor Nodes
Information Retrieval from Emotions and Eye Blinks with help of Sensor Nodes
 
I04735762
I04735762I04735762
I04735762
 
Brain Fingerprinting
Brain FingerprintingBrain Fingerprinting
Brain Fingerprinting
 
Brain Fingerprinting
Brain FingerprintingBrain Fingerprinting
Brain Fingerprinting
 
Expert system design
Expert system designExpert system design
Expert system design
 
IRJET- Health Monitoring System using Arduino
IRJET- Health Monitoring System using ArduinoIRJET- Health Monitoring System using Arduino
IRJET- Health Monitoring System using Arduino
 

More from Varunjeet Singh Rekhi (10)

Natural Language Processing
Natural Language ProcessingNatural Language Processing
Natural Language Processing
 
Transistors and Applications
Transistors  and ApplicationsTransistors  and Applications
Transistors and Applications
 
Production System
Production SystemProduction System
Production System
 
Tic Tac Toe
Tic Tac ToeTic Tac Toe
Tic Tac Toe
 
Simple Harmonic Motion
Simple Harmonic MotionSimple Harmonic Motion
Simple Harmonic Motion
 
SCSI Interfaces
SCSI InterfacesSCSI Interfaces
SCSI Interfaces
 
Video DIsplay Technologies
Video DIsplay TechnologiesVideo DIsplay Technologies
Video DIsplay Technologies
 
Tower of Hanoi
Tower of HanoiTower of Hanoi
Tower of Hanoi
 
Reconnaissance and Social Engineering
Reconnaissance and Social EngineeringReconnaissance and Social Engineering
Reconnaissance and Social Engineering
 
Bullet trains
Bullet trainsBullet trains
Bullet trains
 

Recently uploaded

Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxNadaHaitham1
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesMayuraD1
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxmaisarahman1
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilVinayVitekari
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdfKamal Acharya
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdfKamal Acharya
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEselvakumar948
 

Recently uploaded (20)

Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Wadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptxWadi Rum luxhotel lodge Analysis case study.pptx
Wadi Rum luxhotel lodge Analysis case study.pptx
 
DeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakesDeepFakes presentation : brief idea of DeepFakes
DeepFakes presentation : brief idea of DeepFakes
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptxA CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
A CASE STUDY ON CERAMIC INDUSTRY OF BANGLADESH.pptx
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 

Expert Systems

  • 1. EXPERT SYSTEM How computers gain expertise?
  • 2. What is an EXPERT SYSTEM? ● An expert system is a computer expert that emulates the decision making ability of a human expert. ● Expert system, a computer program that uses artificial intelligence methods to solve complex problems within a specialized domain that ordinarily requires human expertise.
  • 3. Example: Making of a medical diagnosis expert system ● A medical diagnosis expert system lets the user diagnose his disease without going to a real doctor (but of course, user has to go to a real doctor for treatment)
  • 4. How does the EXPERT SYSTEM gain EXPERTISE?
  • 5. How does medical diagnosis expert system gain expertise?
  • 6. Components of an Expert System 1. Knowledge Base 2. Inference Engine 3. User Interface
  • 7. 1. Knowledge Base ● A knowledge base is an organized collection of facts about the system’s domain. ● Facts for a knowledge base must be acquired from human experts through interviews and observations. ● This knowledge is then usually represented in the form of “if-then” rules (production rules): “If some condition is true, then the following inference can be made (or some action taken).” ● A probability factor is often attached to the conclusion of each production rule and to the ultimate recommendation, because the conclusion is not a certainty.
  • 8. Components of Knowledge Base ● Factual Knowledge − It is the information widely accepted by the Knowledge Engineers and scholars in the task domain. ● Heuristic Knowledge − It is about practice, accurate judgement, one’s ability of evaluation, and guessing.
  • 9. Knowledge Acquisition ● The knowledge base is formed by readings from various experts, scholars, and the Knowledge Engineers. The knowledge engineer is a person with the qualities of empathy, quick learning, and case analyzing skills. ● He acquires information from subject expert by recording, interviewing, and observing him at work, etc. ● He then categorizes and organizes the information in a meaningful way, in the form of IF-THEN-ELSE rules, to be used by interference machine. The knowledge engineer also monitors the development of the ES.
  • 10. Knowledge Base for Medical Diagnosis Expert system Symptoms Disease Fever, cough, conjunctivitis, running nose, rashes Measles Fever,headache, ache, conjunctivitis, chills,sore throat,cough,running nose Flu Headache, sneezing, sore throat, running nose, chills Cold Fever, chills,ache,rashes Chickenpox
  • 11. 2. The Inference Engine ● An inference engine interprets and evaluates the facts in the knowledge base in order to provide an answer or to reach a goal state ● For example, if the KB contains the production rules “if x, then y” and “if y, then z,” the inference engine is able to deduce “if x, then z.” ● In medical diagnosis ES, if a user has Fever, chills,ache,rashes, then user is suffering from chickenpox ● Strategies used by the inference engine ○ Forward chaining ○ Backward chaining
  • 12. Forward Chaining ● “What can happen next?” ● It is a data-driven strategy. ● The inferencing process moves from the facts of the case to a goal (conclusion). ● The inference engine attempts to match the condition (IF) part of each rule in the knowledge base with the facts currently available in the working memory. ● If several rules match, a conflict resolution procedure is invoked;
  • 14. Forward Chaining in Medical Diagnosis ES ● A user has fever, headache, ache, conjunctivitis, chills,sore throat,cough,running nose. ● In forward chaining, the inference engine will use the symptoms specified to conclude to the disease the user is suffering from. ● After going through the above symptoms, the inference engine concludes that the user is suffering from flu by checking the knowledge base.
  • 15. Backward Chaining ● “Why this happened?” ● On the basis of what has already happened, the Inference Engine tries to find out which conditions could have happened in the past for this result. ● This strategy is followed for finding out cause or reason. ● The inference engine attempts to match the assumed (hypothesized) conclusion - the goal or subgoal state - with the conclusion (THEN) part of the rule. ● If such a rule is found, its premise becomes the new subgoal. ● In an ES with few possible goal states, this is a good strategy to pursue.
  • 17. Backward Chaining in Medical Diagnosis ES ● Suppose a user has measles. ● Now, the inference engine will look up in the knowledge base to derive the symptoms that could have resulted in measles. ● It inferred that the symptoms were fever, cough, conjunctivitis, running nose, rashes. ● This worked as only few states were present.
  • 18. 3. User Interface ● User interface provides interaction between user of the ES and the ES itself. ● The user of the ES need not be necessarily an expert in Artificial Intelligence. ● It explains how the ES has arrived at a particular recommendation. The explanation may appear in the following forms − ○ Natural language displayed on screen. ○ Verbal narrations in natural language. ○ Listing of rule numbers displayed on the screen.
  • 19. Code for medical diagnosis ES: 1 #include <iostream> using namespace std; void measels(char,char,char,char,char); void flu(char,char,char,char,char,char,char,char); void cold(char,char,char,char,char); void chickenpox(char,char,char,char);
  • 20. Code for medical diagnosis ES: 2 int main() { char name[50]; char a,b,c,d,e,f,g,h,i,j,k; cout << "Please enter your name.. " << endl; cin>> name; cout << "Do you have fever? (y/n)"<< endl; cin>>a; cout << "Do you have rashes? (y/n)"<< endl;
  • 21. Code for medical diagnosis ES: 3 cin>>b; cout << "Do you have headache? (y/n)"<< endl; cin>>c; cout << "Do you have running nose? (y/n)"<< endl; cin>>d; cout << "Do you have conjunctivitis? (y/n)"<< endl; cin>>e; cout << "Do you have cough? (y/n)"<< endl; cin>>f; cout << "Do you have ache? (y/n)"<< endl;
  • 22. Code for medical diagnosis ES: 4 cin>>g; cout << "Do you have chills? (y/n)"<< endl; cin>>h; cout << "Do you have swollen glands? (y/n)"<< endl; cin>>i; cout << "Do you have sneezing? (y/n)"<< endl; cin>>j; cout << "Do you have sore throat? (y/n)"<< endl; cin>>k;
  • 23. Code for medical diagnosis ES: 5 measles(a,f,e,d,b); flu(a,c,g,e,h,k,f,d); cold(c,j,k,d,h); chickenpox(a,h,g,b); return 0; }
  • 24. Code for medical diagnosis ES: 6 void measles(char q,char w,char r,char t,char y) { if(q=='y'&&w=='y'&& r=='y' && t=='y' && y== 'y') cout<< "You may have measles"<< endl; else cout<< ""; }
  • 25. Code for medical diagnosis ES: 7 void flu(char q,char w,char r,char t,char y,char p,char l,char x) { if(q=='y'&&w=='y'&& r=='y' && t=='y' && y== 'y'&& p=='y' && l=='y' && x=='y') cout<< "You may have flu."<< endl; else cout<< ""; }
  • 26. Output to the User Interface
  • 28. Limitations of Expert System No technology offers an easy and total solution. Large systems are costly and require significant development time and computer resources. ESs also have their limitations which include: ● Limitations of the technology ● Problems with knowledge acquisition ● Maintaining human expertise in organizations ● https://www.youtube.com/watch?v=TRzBk_KuIaM&t=460s