Assignment 3: Knowledge-Based Systems using CLIPS (Due November 10, 2008)

 

1. The assignment is to write a CLIPS medical diagnostic expert system that is capable of diagnosing one of the following medical situations:

 

HIV:

-         sore_throat

-         headache

-         fever

-         rash

 

Pregnancy

-         fatigue

-         vomiting

-         light_headedness

-         increased_waistline

 

Flu

-         headache

-         fever

-         tiredness

-         nasal_discharge

 

Your system should function correctly even if the user inputs a synonym of one of the symptoms. Here is a list of the synonyms that your system should recognize:

 

fever:                elevated_temperature, hyperthermia, pyrexia

headache:            pain_head, migraine

sore_throat:            pain_throat, throat_sore

fatigue:              exhaustion, lethargy, tiredness, weariness

vomiting:            emesis, stomach_upset, upset_stomach, nausea

passed_out:            fainting, light_headedness, syncope, vasovagal

A typical example run would assert the facts:

(assert
(check Peter) (migraine) (pyrexia) (fatigue) (nasal_discharge))

 

and then run your knowledge base and expect the system to respond by printing:

Peter has/is flu.

You should include the following rule to print the output:

 
(defrule conclusion "Prints out the
results of running the KB"
   
(check ?who)
    (medical_cond ?med)
    
=>
    
(printout t ?who " has/is " ?med "." crlf))
 

 

2. After you are done with implementing the above expert system, try the following:

 
(assert
(check
Peter) (headache) (vomiting) (light_headedness)
(increased_waistline))
 
Your system will respond by saying: "Peter has/is pregnant." Even if Peter has all these symptoms, obviously he cannot be pregnant. What do you need to add to your expert system to avoid this problem? (No need to actually modify your system. Just write down your answer and submit it with your assignment.)

 

Restrictions:

 

Please submit a ReadMe file to tell how to run your program.

References:

  1. http://health.allrefer.com/health/symptoms.html
  2. Herod, J.M. and Bahili, A.T. "Ameliorating the Pregnant Man Problem: A Verification Tool for Personal Computer Based Expert System." Int. J. Man-Machine Studies 1991.

 


Questions provided by Nagi Basha.