0% found this document useful (0 votes)
4 views3 pages

Expert System Assignment

Uploaded by

temp60413412
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)
4 views3 pages

Expert System Assignment

Uploaded by

temp60413412
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

Department of Computer Engineering | DIT T.

E | Laboratory Practice II

Expert System
Assignment No: Title: Expert System for Hospitals and Medical Facilities

Objective:
• To understand the concept of expert systems and AI.
• To implement an expert system for disease diagnosis.

Theory:
An expert system, also known as a knowledge-based system, is a computer program that contains the
knowledge and analytical skills of one or more human experts related to a specific subject. It accepts
symptoms from the user and generates a diagnosis. An expert system incorporates a knowledge base
containing accumulated experience and an inference engine — a set of rules for applying that knowledge
to each described situation.
The concept was first developed in the 1970s by Edward Feigenbaum at Stanford University. Two early
expert systems made significant impact in healthcare: Dendral, which helped chemists identify organic
molecules, and MYCIN, which identified bacteria such as bacteremia and meningitis and recommended
antibiotics and dosages.

Components of Expert Systems:


1. User Interface (UI)
The UI facilitates communication between the system and its users. It accepts the client's inquiry in a
coherent structure, forwards it to the inference engine, and displays the results to the user — enabling
non-expert users to interact with the system.

2. Inference Engine
The Inference Engine is the brain behind the UI. It contains a predefined set of rules to tackle a particular
issue and refers to data from the Knowledge Base to deduce solutions and formulate conclusions. Two
basic strategies are:

a. Forward Chaining: Determines probable outcomes from given inputs and conditions, extracting
data until a particular goal is reached.
b. Backward Chaining: Determines why a particular event would happen under current
circumstances; used in automated theorem provers and other AI applications.
3. Knowledge Base
The Knowledge Base stores data contributed by specialists from required domains. It contains both factual
and heuristic knowledge, providing the credible foundation from which the inference engine draws
conclusions.

Characteristics of Expert Systems:


• High Performance: Delivers high performance 24x7.
• Understandable: Easy to comprehend for all users.
• Reliable: Error-free and trustworthy in outputs.
• Highly Responsive: Provides responses for each detail of the problem.

Advantages:
• Provides consistent answers for repetitive decisions, processes and tasks.
• Holds and maintains significant levels of information.
• Never 'forgets' to ask a question, as a human might.

Limitations:
• Lacks common sense needed in some decision-making.
• Cannot make creative responses as a human expert would in unusual circumstances.
• Errors in the knowledge base may lead to wrong decisions.

Applications:
• Designing and manufacturing domain for vehicles and gadgets.
• Banking and finance sector for fraud detection.
• Diagnosis and troubleshooting of medical equipment.
• Planning, scheduling, and legal/tax knowledge delivery.

Languages and Technologies:


Expert systems have been built using LISP and PROLOG. SWI-Prolog, widely used in research,
education, and commercial applications since 1987, offers a comprehensive free Prolog environment.
Python and Java are also used alongside ML frameworks.

Sample Program: Animal Identification Expert System (Prolog)


go :- hypothesize(Animal), write('I guess that the animal is: '),
write(Animal), nl, undo.

hypothesize(cheetah) :- cheetah, !. hypothesize(tiger) :- tiger, !.


hypothesize(giraffe) :- giraffe, !. hypothesize(zebra) :- zebra, !.
hypothesize(unknown). /* no diagnosis */

cheetah :- mammal, carnivore, verify(has_tawny_color), verify(has_dark_spots).


tiger :- mammal, carnivore, verify(has_tawny_color), verify(has_black_stripes).
giraffe :- ungulate, verify(has_long_neck), verify(has_long_legs).
zebra :- ungulate, verify(has_black_stripes).
ostrich :- bird, verify(does_not_fly), verify(has_long_neck).
penguin :- bird, verify(does_not_fly), verify(swims), verify(is_black_and_white).

mammal :- verify(has_hair), !. mammal :- verify(gives_milk).


bird :- verify(has_feathers), !.
carnivore :- verify(eats_meat), !.

ask(Question) :- write('Does the animal have the following attribute: '),


write(Question), write('? '), read(Response), nl,
( (Response == yes ; Response == y) -> assert(yes(Question)) ;
assert(no(Question)), fail ).

verify(S) :- (yes(S) -> true ; (no(S) -> fail ; ask(S))).


undo :- retract(yes(_)), fail. undo :- retract(no(_)), fail. undo.

Conclusion:
We have understood the concept of Expert System and implemented an expert system for Hospitals and
medical facilities.

Oral Questions:
1. What is an expert system?
2. What are the different stages/components/blocks of an expert system?
3. What is meant by a knowledge base?
4. How is a knowledge base different from a database?
5. What is an inference engine?
6. Whether an expert system can replace human experts? Yes/No
7. What is an expert shell?
8. What are the desirable properties of a good expert system?
9. What is MYCIN?
10. What is Prolog? What are the features of Prolog language?

References:
[Link]
[Link]

Department of Computer Engineering | DIT T.E | Laboratory Practice II

You might also like