Вы находитесь на странице: 1из 6

219

THE DIAGNOSIS OF SOME KIDNEY DISEASES IN A SMALL


PROLOG EXPERT SYSTEM

Eugene ROVENA, George ROSU
'York University Toronto, Canada; 'Aurel Vlaicu University Arad, Romania
roventayorku.ca, georgerosusyahoo.com


Abstract. A Medical Expert Svstem made in Jisual Prolog 5.2 is proposed. This
Expert Svstem makes a differential diagnosis among the main kidnev diseases. The
diagnosis is made taking into account the clinical exam (the svmptoms that can be seen
or felt) and the paraclinical exam (the results of laboratorv tests). This svstem is designed
to give help to a medical expert (doctor) in making the appropriate diagnosis of a patient.
The kidnev diseases have a lot of common svmptoms and manv of them are verv much
alike, and that makes it verv difficult even for a kidnev doctor (specialist) to put a right
diagnosis. This Expert Svstem can do that. It contains knowledge about twentv-seven
kidnev diseases from nine different categories.

Keywords: Expert System, DiIIerential diagnosis, Clinical and paraclinical exam,
Predicates, Clauses, Goal

1. INTRODUCTION

Artificial Intelligence (abbreviated
AI, also sometimes called Svnthetic
Intelligence) is deIined as intelligence
exhibited by an artiIicial entity. Such a
system is generally assumed to be a
computer.
AI Iorms a vital branch oI computer
science, dealing with intelligent
behavior, learning and adaptation in
machines. Research in AI is concerned
with producing machines to automate
tasks requiring intelligent behavior.
Examples include control, planning and
scheduling, the ability to answer
diagnostic and consumer questions,
handwriting, speech, and Iacial
recognition. As such, it has become an
engineering discipline, Iocused on
providing solutions to real liIe problems.
AI systems are now common-use in
economics, in medicine, in engineering
and in the military, and are built into
many common soItware applications,
traditional strategy games like computer
chess and other video games.
AI divides roughly into two schools
oI thought: Conventional AI and
Computational Intelligence (CI).
Conventional AI mostly involves
methods now classiIied as machine
learning, characterized by Iormalism and
statistical analysis. This is also known as
symbolic AI, logical AI, neat AI and
Good Old Fashioned ArtiIicial
Intelligence (GOFAI).
Its methods include:
x Expert systems that apply reasoning
capabilities to reach a conclusion. An
expert system can process large
amounts oI known inIormation and
provide conclusions based on them;
x Case based reasoning;
x Bayesian networks;
x Behavior based AI, which is a
modular method oI building AI
systems by hand.
Computational Intelligence involves
iterative development or learning (e.g.
978-1-4244-5056-5/09/$26.00 2009 IEEE
Authorized licensed use limited to: Chulalongkorn University. Downloaded on June 22,2010 at 05:37:06 UTC from IEEE Xplore. Restrictions apply.
220
SOFA 2009 3
rd
International Workshop on Soft Computing Applications 29 July 1 August Szeged (Hungary) Arad (Romania)
parameter tuning in connectionist
systems). Learning is based on empirical
data and is associated with non-symbolic
AI, scruIIy AI and soIt computing.
Methods mainly include:
x Neural networks, which are systems
with very strong pattern recognition
capabilities;
x Fuzzy systems, i.e. techniques Ior
reasoning under uncertainty, has been
widely used in modern industrial and
consumer product control systems;
x Evolutionary computation, which
applies biologically-inspired concepts
such as populations, mutation and
survival oI the Iittest to generate
increasingly better solutions to the
problem. These methods most notably
divide into evolutionary algorithms
(e.g. genetic algorithms) and swarm
intelligence (e.g. ant algorithms).
With hybrid intelligent systems
attempts are made to combine these two
groups. Expert inIerence rules can be
generated through neural networks or
production rules Irom statistical learning
such as in ACT-R.
A promising new approach called
intelligence ampliIication tries to
achieve artiIicial intelligence in an
evolutionary development process as a
side-eIIect oI ampliIying human
intelligence through technology.

2. EXPERT SYSTEMS

The Expert Systems represent today
the major part oI AI domains. This sub-
domain leads to over 70 oI real-liIe
applications.
The Expert Systems are computer
programs that are derived Irom a branch
oI computer science research called
Artificial Intelligence (AI). AI's
scientiIic goal is to understand
intelligence by building computer
programs that exhibit intelligent
behavior. It is concerned with the
concepts and methods oI symbolic
inIerence, or reasoning, by a computer,
and how the knowledge used to make
those inIerences will be represented
inside the machine.
Building an expert system is known
as knowledge engineering and its
practitioners are called knowledge
engineers. The knowledge engineer must
make sure that the computer has all the
knowledge needed to solve a problem.
The knowledge engineer must choose
one or more Iorms in which to represent
the required knowledge as symbol
patterns in the memory oI the computer -
- that is, he (or she) must choose a
knowledge representation. He must also
ensure that the computer can use the
knowledge eIIiciently by selecting Irom
a handIul oI reasoning methods. The
practice oI knowledge engineering is
described later. We Iirst describe the
components oI expert systems.
Since every task domain consists oI
many entities that stand in various
relations, the properties can also be used
to speciIy relations, and the values oI
these properties are the names oI other
units that are linked according to the
relations. One unit can also represent
knowledge that is a 'special case oI
another unit, or some units can be 'parts
oI another unit.
The most important ingredient in any
expert system is knowledge. The power
oI expert systems resides in the speciIic,
high-quality knowledge they contain
about task domains.

3. MEDICAL EXPERT SYSTEMS

Intuition may seem like a human
trick, but machines can be pretty good at
it, too. Underlying a hunch are dozens oI
Authorized licensed use limited to: Chulalongkorn University. Downloaded on June 22,2010 at 05:37:06 UTC from IEEE Xplore. Restrictions apply.
221
Eugene Roventa, George Rou The Diagnosis of Some Kidney Diseases in a Small Prolog Expert System
tiny, subconscious rules - truths we've
learned Irom experience. Add them up
and you get instinct: a physician's sense
that a patient's stomach ache might
really be appendicitis, Ior example.
Program those rules into a computer and
you get an expert system - one oI many
that can screen lab tests, diagnose blood
inIections, and identiIy tumors on a
mammogram.
A lot oI Expert Systems are medical.
Their purpose is the diagnosis and
treatment oI certain diseases. A Medical
Expert System is made out oI a group oI
programs and a medical knowledge base
with which one can have a dialogue by
using a computer. The inIormation
obtained Irom the computer is similar to
the inIormation given by a physician,
expert in that certain area.
Our Medical Expert System has in its
knowledge base twenty seven kidney
diseases Irom nine diIIerent categories.
The user is asked to answer with Yes or
No iI a certain symptom appears or not.
In the end, based on the user`s answers,
the name oI the disease is posted up on
the screen. A drawback oI this Expert
System (and usually oI any other) is that
only the symptoms put in the knowledge
base by the programmer are available. It
does not think and does not learn by
itselI; however, the knowledge base can
be updated anytime with new symptoms
and new diseases.
It is said that 'an Expert System is
made by experts and an Open System is
made Ior experts. That`s why we can
conclude that our System is an Open
System.

4. THE STRUCTURE

A rule-based ES has six components:
1) The knowledge base contains the
domain knowledge (inIormation about
kidney diseases) represented as a set oI
IF-THEN production rules in the clauses
section oI the program. The knowledge
base is analogue to the long-term human
memory. There is a total order among
production rules. We can consider that
each production rule has attached a
priority that can be changed.
2) The facts base contains Iacts used
to match against the IF (condition) part
oI rules stored in the knowledge base.
This Iact base is analogue to the short-
term human memory.
3) The inference engine carries out
the reasoning by linking the rules with
the Iacts and deducing new Iacts.
4) The user interface is the means oI
communication between a user and an
ES.
5) The explanation module enables
the user to ask the ES how a particular
conclusion is reached and why a speciIic
Iact is needed.
6) The developer interface is needed
to modiIy the knowledge base and to
stock the knowledge in an external
DBMS.
These are basically the same sections
oI any program written in Visual Prolog
5.2.
The 'Iacts Section contains only two
Iacts:
xpositive(symbol,symbol)
Ior a positive answer, and
xnegative(symbol,symbol)
Ior a negative answer
which will be used in deIining the rules
Ior the predicates 'positive and
'negative, like this:
positive(X,Y):-
xpositive(X,Y),!.
positive(X,Y):-
not(xnegative(X,Y)),
question(X,Y,yes).
iI the answer to the question is
aIIirmative, res.
Authorized licensed use limited to: Chulalongkorn University. Downloaded on June 22,2010 at 05:37:06 UTC from IEEE Xplore. Restrictions apply.
222
SOFA 2009 3
rd
International Workshop on Soft Computing Applications 29 July 1 August Szeged (Hungary) Arad (Romania)
negative(X,Y):-
xnegative(X,Y),!.
negative(X,Y):-
not(xpositive(X,Y)),
question(X,Y,no).
iI the answer to the question is negative.
The 'predicates Section contains
three basic predicates:
disease(symbol) - nondeterm (o),
isdisease(symbol) - nondeterm (i),
question(symbol,symbol,symbol)-
determ (i,i,i)
The predicate 'disease will have as a
parameter the name oI the disease in the
clauses section. The predicate
'isdisease will have as a parameter the
category oI diseases, deIined and
recursively appealed every time it is met
in the program.
The clauses (the rules) Ior the
predicate 'question will be shown in
the section ,clauses.
By help oI the predicates 'positive
and 'negative we introduce the
symptoms oI the disease: the symptom is
put as an argument oI 'positive iI it is
available Ior that certain disease,
respectively as an argument oI
'negative iI it is not available.
In the ~clauses (rules) Section we
introduced all the rules that deIine the
diseases, using the predicates
'isdisease, 'positive and 'negative,
deIined in the predicates section.
For a better understanding we
illustrate here the rules Ior a single
disease (syndrome Goodpasture):

disease(goodpastureSyndrome):-
positive(pulmonaryHemorrhagesSignaled),
isdisease(rapidlyProgressGlomeruloneIritis),
positive(upperRespiratoryTractInIection),
positive(respiratorySymptomsCoughDispnea),
positive(variableAnemia),
positive(microscopicAndModerateHematuria),
positive(moderateProteinuria),
positive(lowArterialBloodPressure),
positive(articularPhenomenaVariableArtralgia),
negative(increasedImmunoCirculantComplexes),
positive(normalC3Fraction),
positive(increasedSanguinUreaAndUricAcid),
positive(basalPulmonaryInIiltratesPresent),
positive(linearDepositsOIIgGPresent).

We present now the common clause
Ior the category 'rapidly progressive
glomeruloneIritis (in this case), which
is called in the rules Irom all the diseases
in this category.

isdisease(rapidlyProgressGlomeruloneIritis):-
positive(glomerularInIlammationOligoanuria),
positive(slowlyProgressiveStartOIDisease),
positive(evolutionTowardRenalInsuIIiciency),
positive(extracapilarGlomerulitisPredominant).

We also describe the clause Ior
'question, in which we use the
predicate 'remember:
question(X,Y,yes):- !,
write(X," ",Y,'\n'),
readln(Reply),nl,
Irontchar(Reply,'y',),
remember(X,Y,yes).
question(X,Y,no):- !,
write(X," ",Y,'\n'),
readln(Reply),nl,
Irontchar(Reply,'n',),
remember(X,Y,no).

The program calls the predicate
,disease and posts up on the screen the
name oI the disease (read Irom the
argument) and, in case it cannot Iind all
the symptoms or the disease cannot be
identiIied, it posts up a corresponding
message.

5. HOW THE PROGRAM WORKS

We consider Ior example a speciIic
disease Irom a certain category. In the
Iollowing Iigure we present the
simulation oI the program on this
disease:

Authorized licensed use limited to: Chulalongkorn University. Downloaded on June 22,2010 at 05:37:06 UTC from IEEE Xplore. Restrictions apply.
223
Eugene Roventa, George Rou The Diagnosis of Some Kidney Diseases in a Small Prolog Expert System















































NO
.......
S1 D1
S2 D1
S1 D2
S1 D3
S1 D4
S1 D5
S1 D6
S1 D7
S1 D8
S2 D8
S3 D8
S13 D8
S1 C3
S1 D9
S2 C3
S3 C3
S4 C3
The other D1 symptoms
are not used in this
case.
YES
YES
YES
YES
YES
YES
NO
YES
YES
YES
The other D2 symptoms
The other D3 symptoms
The other D4 symptoms
The other D5 symptoms
The other D6 symptoms
The other D7 symptoms
Negative
YES
YES
YES
YES
NO
NO
NO
NO
NO
NO
NO
YES
YES
NO
...........
YES
NO
YES
NO
NO
NO
NO
NO
NO
The other D8 symptoms
S4.S12 NO
YES
IdentiIies the disease
Authorized licensed use limited to: Chulalongkorn University. Downloaded on June 22,2010 at 05:37:06 UTC from IEEE Xplore. Restrictions apply.
224
SOFA 2009 3
rd
International Workshop on Soft Computing Applications 29 July 1 August Szeged (Hungary) Arad (Romania)
Above we denoted by S1 D1 the Iirst
symptom oI the Iirst disease the order
is taken Irom the 'clauses section, by
S2 D1 the second symptom oI the Iirst
disease, by S1 D2 the Iirst symptom oI
the second disease a.s.o. In general, by
Si Dj we denote the 'i symptom oI the
'j disease. On the other hand, by Sn C3,
n 1..4, we noted the symptoms oI the
third category, category the disease Irom
this example takes part oI.
The program 'thinks like this: iI it
has a positive answer to a symptom, it
goes on with the symptoms Irom that
disease. II only one symptom Irom the
disease is negative it 'jumps to the Iirst
symptom Irom the next disease. OI
course, it takes into account the category
symptoms also. II at least one symptom
Irom the category is negative, the
program goes to the next disease. II all
the category symptoms are aIIirmative, it
goes on to the symptoms which make
the diIIerence between this disease and
the other diseases Irom this category.
An important way oI improving this
Expert System is making it Iuzzy. In this
case the system would tell the
probability that the diagnosis is close to
the reality. Here we have some ideas Ior
IuzziIying the Prolog rules:
p(X,a) :- q(X,u), r(X,Y,v).
where a is the degree to which entity X
satisIies predicate p, and u, v are similar
degrees. OI course, the degrees are
numbers between 1 and 0 and we could
compute with degrees, such as Ior
example a sup(uv).

6. CONCLUSIONS
Taking into account the Iact that we
are dealing with a person`s health and
we have to establish an approximate
diagnosis on a certain disease, this
system used in practice implies a great
risk. In reality there are more kidney
diseases than we have considered in this
system`s knowledge base. So, our
knowledge base is not complete, but we
can update and improve it anytime with
new symptoms and new diseases.
On the other hand, it is possible that
the symptoms already present are not
100 correct, because diIIerent experts
have diIIerent opinions and there are a
lot oI anomalies in Medicine.

REFERENCES
|1| Bostaca, I., Cheile diagnosticului in
clinica medical, Editura Polirom, 1999.
|2| Gluhovschi, G., Curs de Nefrologie, Lito
U.M.F.T., 2004.
|3| Romosan, I. Rinichiul. Ghid diagnostic i
terapeutic, Editura Medical, 1999.
|4| Luger, G.L., Artificial Intelligence.
Structures and Strategies for Complex
Problem Solving, 4ed., Addison-Wesley,
2002.
|5| Negnevitski, M., Artificial Intelligence
Guide to Intelligent Svstems, Addison-
Wesley, 2002.
|6| Rovena, E., Elements de Logique pour
lInformatique, GREF Toronto, 2000.
|7| Rovena, E., Spircu, T., Management of
Knowledge Imperfection in Developing
Intelligent Svstems, Springer-Verlag, 2009.
|8| Russell, S., Norvig P., Artificial
Intelligence. A Modern Approach,
Prentice Hall, 1995.
|9|Bratko, I., Prolog Programming for
Artificial Intelligence, Addison
Wesley, 2000.
|10| Callear, D., Prolog Programming for
Students (With Expert Svstems and
Artificial Intelligence Topics), Thomson
Learning, 2001.
|11| Nilsson, U., Maluszynski, J., Logic
Programming and Prolog(2ed), John
Wiley & Sons Ltd. 2000.
|12| Reghis, M., Rovena, E., Classical and
Fu::v Concepts in Mathematical Logic and
Applications, CRC Press New York, 1998.

Authorized licensed use limited to: Chulalongkorn University. Downloaded on June 22,2010 at 05:37:06 UTC from IEEE Xplore. Restrictions apply.

Вам также может понравиться