Define and then add facts in working memory by using clips commands
e.g.
- “A patient has 101 degree Fahrenheit temperature, yellow spots, red rash and infected throat.”
Note: Temperature, spots, rash and throat are the parameters of a patient.
- “Disease is diagnosed as allergy”Note: Disease is a parameter of title diagnose
- Novidat and Evil are the medicines suggested by the doctor as treatment.Note: Medicine is a parameter of title treatment.
Clips Commands & Implementation:
CLIPS> (deftemplate patient “Relation patient ”
(slot temperature)
(slot spots)
(slot rash)
(slot throat)
)
CLIPS> (assert (patient (temperature “101 degree fahrenheit”)))
CLIPS> (assert (patient (spots “yellow”)))
CLIPS> (assert (patient (rash “red”)))
CLIPS> (assert (patient (throat “infected”)))
CLIPS> (deftemplate diagnose “Relation diagnose”
(slot disease))
CLIPS> (assert (diagnose (disease “allergy”)))
CLIPS> (deftemplate treatment “Relation treatment”
(slot medicine))
CLIPS> (assert (treatment (medicine “novidat”)))
CLIPS> (assert (treatment (medicine “evil”)))
Last updated: March 19, 2014