Artificial Intelligence
Artificial Intelligence
SERIES
ARTIFICIAL
INTELLIGENCE
K. D. PAVATE
ARTIFICIAL
INTELLIGENCE
K.D. Pavate
C S I R G o l d e n Jubilee Series
Publication No. 7
Series Editor Dr. Bal Phondke
Volume Editor Parvinder S. Chawla
Cover Design Pradip Banerjee
Illustrations Pradip Banerjee, Neeru Sharma, Neeru Vijan,
Sushila Vohra, K.K. Bhatnagar and Anil Kumar
Production V. Ramachandran, K.B. Nagpal, Vinod Sharma,
Sudhir Chandra Mamgain and Radhe Shiam
Suverna
An Overview ... 92
Glossary ... 97
ince the dawn of civilization
Leibnitz's calculator
Abacus Analytical machine
Evolution of computers in
THE GENESIS 3
Supercomputer
>arallel t o h u m a n e v o l u t i o n
4 ARTIFICIAL INTELLIGENCE
INTEGRATED CIRCUIT
PROCESSING
OUTPUT
INPUT
MAIN MEMORY
INPUT OUTPUT
MEMORY
Parts of a c o m p u t e r system
memory comprises data storage systems similar to human
memory which can store a wide range of information that
could be retrieved as and when required. A computer has a
R a n d o m Access M e m o r y (RAM) w h e r e data can be
read/stored and Read-Only Memory (ROM) from where
data can only be read without writing new data into it. In
addition, there are two other kinds of specialized memories
in a computer. One, the programmable ROM(PROM) that
records data only once and second, the erasable PROM
(EPROM) which has an additional facility that helps the
erasing of previous data and entry of new ones.
10 ARTIFICIAL INTELLIGENCE
Thinking Machines
Many people have tried to compare the abilities of humans
with those of computers. Suppose you were in charge of a
large chemical manufacturing plant and it was your duty to
ensure that this factory operates at its optimum capacity with
minimum wastage of materials and human resources. You
could consult a number of experts who have operated similar
plants with success and use their combined expertise to write
a computer program in order to operate the factory. This
program would essentially imitate the thought process of a
'human expert' and manage the operation of the entire fac-
tory. Solutions to crisis situations would be anticipated and
THE GENESIS 11
ARTIFICIAL INTELLIGENCE
NATURAL
EXPERT ROBOTICS
LANGUAGE
SYSTEM SYSTEMS
A robot
Learning
s m e l l , s o u n d , t o u c h or a
biochemical signal arrives in the
sensory organs, the associated
and neurons undergo complex chemi-
cal changes converting the stimuli
Memory into electrical i m p u l s e s . The
electrical signals are then passed
on from one neuron to another by
release of chemical substances at
the synapse — the junctions be-
tween two neurons. On reaching
the brain, these impulses are
p r o c e s s e d to g e n e r a t e ap-
propriate responses.
Learning to Learn
As they grow older, all men and women acquire in their own
individualistic manner, ways of responding to unusual situa-r
tions. It is remarkable how they select their responses which
enable them to tide over a particular crisis or solve a problem.
In fact, whenever they come across a new situation they
subconsciously work out a strategy to arrive at a convenient
solution. Harry HARLOW (1905-1981) conducted experi-
ments which demonstrated that people can solve problems
in areas they are already familiar with (at least in principle if
not in detail). Harlow called these as "learning sets" as they
help human beings to learn how to leam. He suggested that
the method commonly referred to as "trial and error" is
actually an orderly development of learning and thinking
processes. When we first face an unusual situation we use the
20 ARTIFICIAL INTELLIGENCE
Human Memory
It is important to realize that there are three basic activities
associated with human memory, viz. receiving new data
from the environment followed by its processing and conver-
sion into usable information within the brain; storing this
information in the memory; and retrieving it as and when
required.
Humans have three basic forms of memory. One is the
immediate memory. Here one retains all details of an object
or a scene or a picture for about 1 /10th of a second like a
batsman facing a ball. After that, much is forgotten. Next is
the short term memory where information is retained for a
few minutes only. This memory is also known as the working
memory and as such has a limited capacity. It is also used for
rehearsal,i.e. for mentally repeating the information over and
over again so that it enters the long term memory.
The information which is stored in the long term memory
can be broadly classified into four categories. First is the
information related to specific tasks, which includes riding a
horse or a bicycle, driving a car, typing, painting, carving, etc.
These skills often require several years of experience to per-
fect. Secondly, the information related to fear-inspired ac-
tions like being bitten by a dog, hurt by a falling wall, burnt
by a fire, etc. By proper training one can prepare oneself to
take specific actions under difficult circumstances or emer-
gency conditions. Third is 'Episodic memory', in which in-
formation regarding dated episodes or personal experiences
is stored date-wise. Finally, the 'Semantic memory', which
relates to the use of words, grammar, metaphors, and all
LEARNING AND MEMORY 33
58 60 14
T h e basic forms of h u m a n m e m o r y
24 ARTIFICIAL INTELLIGENCE
It is common knowledge
that people tend to forget.
One e x p l a n a t i o n for this
phenomenon is that unless in-
T y p e s of l o n g term m e m o r y f o r m a t i o n is f r e q u e n t l y
retrieved and used, it tends to
LEARNING AND MEMORY 25
Perception: Guessing g a m e
26 ARTIFICIAL INTELLIGENCE
TYPES OF
KNOWLEDGE
LEARNING AND MEMORY 31
M a x Planck
M e a n w h i l e A n t h o n y OET-
TINGER had been attempting to
use a c o m p u t e r to translate
English words into Russian and
vice versa. An English word fed
into the machine would result in
SCOPE AND EXTENT 35
a Russian equivalent to
a p p e a r on the s c r e e n .
Here, what took place was
matching of equivalent
words from the two lan-
guages. For every English
word a Russian counter-
part was selected. It was
fondly hoped that this
beginning would even-
tually lead to a machine
which could translate con-
tinuous text from one lan-
guage to another.
Unfortunately, the syntax
of the two languages had
not been taken into ac-
c o u n t . The p r o c e d u r e
which a c o m m o n man
uses in stringing words
together to form meaning-
ful sentences had yet not
been p r o p e r l y inves-
tigated at that time. This
led to serious problems in
automatic translation of
texts and often resulted in
amusing situations. For
instance, an English sen-
Alan Turing and his machine
tence, The spirit was willing
but the flesh was not came back after retranslation as The wine
was good but the meat was spoilt!
Knowledge Engineering
AI c o n c e n t r a t e s on k n o w l e d g e e n g i n e e r i n g . Here
"knowledge" refers to a particular domain of expertise. This
expertise could include highly specialized or technical infor-
mation which would not normally be expected to be available
with an ordinary person. The term "engineering" refers to a
practical approach of using this knowledge to solve
problems. This is indeed a commonsense way of doing
things.
Knowledge engineering is the discipline that deals with
the way a knowledge-base is organized so that it becomes
available in the most useful manner possible. This knowledge
is collected by a knowledge engineer by searching literature
or even by asking people who are considered knowledgeable
in that particular subject. His next task is to arrange this
knowledge in some kind of an order so that it is easy to access
and retrieve quickly. This structuring of information is how-
ever, much easier said than done. One way would be to place
SCOPE AND EXTENT 37
KNOWLEDGE
ENGINEER EXPERT SYSTEM
EXPERT
USER
the information most likely needed at the top and the least
likely at the bottom, but then who is to decide? It is often
difficult to get human experts to unanimously agree as to
which aspect is more important than others. Unlike computer
systems which can scan through its entire memory in a matter
of seconds, it takes a considerable time to extract information
from a real human expert. Usually they are hesitant to tell
what they know. This is one of the reasons why developing
a knowledge-base for an expert system requires such a long
time.
1 HUT ' 1
W h o ' s smarter?
40 ARTIFICIAL INTELLIGENCE
Alari Newell and Herbert Simon introduced the " I F - T H E N " rule
A JREOBLEM SOLVER 43
Search Strategies
Once the tree diagram is established, one has to evolve a
strategy to proceed from the starting point to the goal or
solution. If this search net-
work is an extensive one,
then keeping track of the
path is difficult. There are
four types of strategies
which are commonly used
to find a solution to a
problem, viz. depth-first,
breadth-first, bidirection-
al and means-end.
Knowledge-base
A knowledge-base contains all the facts, rules and procedures
related to a specific field. It is important for solving problems
in that field. In contrast to a human expert whose capacity to
work diminishes with age, a knowledge based expert system
can be made more and more efficient by collecting expertise
from not one but a number of experts. The computer program
along with the knowledge-base can be copied to create any
number of expert systems and so the expertise is never really
lost. Moreover, an expert system is available any time of the
day unlike a human expert who needs to rest between work.
Above all, a computer expert system has no preferences as to
whom it provides the expertise. The user may be a very senior
Director in an organization or a junior officer. The same
expertise is provided to both.
Before loading information into the knowledge-base, the
knowledge engineer has to define the relationships between
facts, objects and groups of objects. Let us suppose that the
48 ARTIFICIAL INTELLIGENCE
PROBLEM
SUB-PROBLEM 4 SUB-PROBLEM 5
SUB-PROBLEM SOLUTION
P a t h w a y s to d e c i s i o n
A PROBLEM SOLVER 51
Inference Engine
Just having a great deal of knowledge does not make one an
expert. One must know how to select the appropriate
knowledge and how to apply it. Similarly, a knowledge-base
alone does not make an expert system. The system must
possess another component which directs the implementa-
tion of the knowledge. This component is the inference en-
gine. It decides which heuristic search technique is to be used
USER
'xa
KNOWLEDGE
i*
USER INTERFACE
BASE
INFERENCE
M . ".-< "
ENGINE
FORWARD
CHAINING
GOAL
BACKWARD
CHAINING
FACTS/INITIAL KNOWLEDGE
Success Stories of AI
Both expert systems and conventional database programs
involve retrieval and processing of information. However,
there is a difference between the two. In medicine, for ex-
ample, a database is useful to enumerate the symptoms of
different illnesses. An expert system, on the other hand, helps
to diagnose an illness, determine its causes and suggests a
line of treatment. The database program may reorganize the
data but does not reason about it. In expert systems, it is a
human expert who has provided the information about spe-
cialized areas of knowledge such as say, water management,
diseases of the blood, methods of teaching, etc. into a com-
puter.
One of the first successful expert system was the Mycin. It
was developed in the mid 1970s by Edward FEIGENBAUM
and Edward SHORTLIFFE at the Stanford University. It is a
medical diagnosis expert system. Its purpose is to help the
doctors or physicians to diagnose and to prescribe medica-
tion to those suffering from infectious diseases of the blood.
The problem is to first decide what bacteria has caused the
58 ARTIFICIAL INTELLIGENCE
COPPER DATA
METERS
ARGILLIC
PHYLLIC
POTASSIC
PROPYUTIC
LIMIT OF SULPHIDE
Fact 1:
Ram is a boy.
Fact 2:
All boys like sweets.
Conclusion:
Ram likes sweets.
Symbolic logic
The above example can also be converted into a symbolic
form where the symbol R stands for Ram, B for Boy and S for
Sweets:
•
' *V " - F*
IT
all B
henceR^ IT
B=
A and B —
AorB —
Propositional Logic.
A computer operates on the basis of binary signals. The
electronic circuits inside a computer consists of components
which are capable of assuming one of the two possible stable
states. This basic concept has been used to represent longer
numbers, characters, words and even statements about the
real world in a digital format. Since propositional logic relates
to whether a particular proposition is true or false, it could
also be expressed in a digital format. Therefore, a similarity
exists between the stable states in digital electronic circuits
and propositional logic. Statements such as "It is raining
64 ARTIFICIAL INTELLIGENCE
and the symbol 'b' represents "I like butter". The truth (T)
and falsity (F) of a statement is represented by "on" and "off"
states of a bulb respectively.
The next connective is a conditional connective also
known as 'implies'. There are two parts to the statement "a
implies b". These are the 'head' which comes before the
symbol "implies" and the 'body' which comes after. The
statement says that if the head is true then the body is also
true. The statement can operate in the opposite direction also.
If the body is true then the head must be true. Suppose we
are out in the countryside for a walk (without an umbrella).
The statement, "IF it rains THEN I will be wet" can be inter-
preted as "IF it rains" implies that "I will be wet". Symbolically
this can be represented as " a implies b". The only way this
statement can be false is when 'It rains' and 'I will not be wet'.
Otherwise this statement is always true. The third statement
is, 'It does not rain' and ' I will be wet' is true because you
can get wet by falling into a pond even when it is not raining.
The fourth statement is, 'It does not rain' and i will not be
wet' and it is also true. This example which defines the "a
implies b" connective can be expressed in a truth table shown
below. The "on" and "off" states of a bulb represent the truth
a b a: - b or a implies b
like like
like dislike
like like
68 ARTIFICIAL INTELLIGENCE
Predicate logic
,
Conclusion: buy (ram,icecream).
eats ( X
eats ( Y
eats ( or eats X or Y
Reaching Inference
The first thing to do on receiving an input is to convert it from
English into an equivalent predicate logic. Putting it in the
correct format is very important. The choice of the predicate,
the function and the constants have to be carefully made in
AI applications.
If the input sentence is a question then the answer is
somewhere in the knowledge-base but it may not be explicit.
We may have to infer the answer from the facts. This is made
clear in the following example:
Given: If A then B
Given: A is true
Deduction: B is true
A, A —> B; therefore B
72 ARTIFICIAL INTELLIGENCE
Given: If A then B
Given: B is true
Inference: A is true
What has happened is that given the rule and the fact that
Y is suffering from short breath we have jumped to the
conclusion that Y is suffering from cancer. The fact that Y is
short of breath has been explained away by assuming lung
cancer. This conclusion is a drastic one and hopefully a wrong
one (at least for the sake of the doctor's reputation). Though
abduction could lead to wrong conclusions, the method is
widely followed in many fields including medicine and
economics. Abduction is the process of providing an explana-
tion. Experienced medical doctors use this method with judi-
cious caution and are able to make satisfactory diagnosis.
Another kind of inference is 'induction'. It is the process
of generalizing from a few specific cases. Suppose we meet a
PROGRAMMING INTELLIGENCE 73
LISP
LISP or List Processing was a programming language created
by John McCARTHY. It is a functional language that manipu-
lates both symbols as well as logical statements. It is a simple
language and has been extensively used, particularly in the
U.S.A. for developing expert systems. The LISP rules for
manipulation of information are easy to understand and to
learn.
__
This function might appear to be very elementary but has
its uses. Its real importance is that it prevents any evaluation
of the argument from taking place. Whatever follows the
'quote' is returned as it is verbatim.
Setq: This is another very common system function. Its
effect is to bind the second symbol and the third in the list.
The function has two arguments. The first element is the
function setq. The second is a symbol variable and the third
Here cdr has been applied to the list (al bl cl). LISP returns
the same list with the first element al removed. The value of
the list has been changed. It has been made one element
shorter and therefore, is different from the original list.
Considering the same example: (setq birds (cdr birds)), LISP
starts with the innermost part of the statement, i.e. (cdr birds).
Since there is no quote, the cdr operates on the variable 'birds'
and so it returns the list corresponding to 'birds' but with
crow eliminated. The new 'birds' list therefore, becomes
(sparrow ostrich)
Natural Languages
Advances in knowledge based techniques have led to many
c o n c e p t u a l changes in computers. These have been
redesigned so that even 'computer illiterate' users can use
such advanced machines. This in turn has stimulated
academic research in subjects such as natural language
processing, speech recognition, synthetic speech generation,
vision systems, etc.
Man-machine interaction
USER-FRIENDLY SYSTEMS 81
Subject Predicate
Noun Verb Determiner Noun
. Subject
Predicate
Noun Verb Determiner Noun
Parsing sentences
USER-FRIENDLY SYSTEMS 85
S o n o g r a m of phonemes
strung together to form words while speaking. These seg-
ments are known as 'phonemes'. Most spoken languages
possess, on an average, about 40 phonemes. Each one of these
phonemes can be characterized by a set of unique properties.
VOCABULARY
PATTERNS 7
'COMPARE
RESPONSE
INPUT SPEECH
DECISION
FEATURES
COMPUTER
P a t t e r n r e c o g n i t i o n a p p r o a c h to isolated w o r d r e c o g n i t i o n
nition systems. It is a path finding algorithm which attempts
to seek the best alignment between two similar patterns. Time
alignment is necessary as the duration of the spoken words,
even if by the same speaker, can vary when spoken on
different occasions. If the system caters to larger vocabularies
then not only the time required to produce a match is propor-
90 ARTIFICIAL INTELLIGENCE
tionately longer but also the training period for each new
speaker would be time-consuming.
Continuous speech signals can be reduced to a sequence
of isolated words by intentionally introducing pauses be-
tween words. In this case, the individual words will be
recognized as such. This method is adequate to get the
spoken word to appear on the screen or where instructions
consisting of single word commands are to be recognized.
The speaker has to produce samples of the spoken words
before he can use the system. This is known as the 'training
phase'. Each new user has to have templates for his speech
prepared in advance before he can use the machine. How-
ever, speaker independent systems require no such in-
dividual training schemes. Such systems usually have
templates which have been averaged out over many speakers
and stored in the machine memory. The templates in such
speaker-independent word recognizers consist of- informa-
tion based on acoustic features of the words rather than on
their detailed spectra.
Continuous Speech Recognition (CSR) is much wider in
scope. Natural speech contains many inconsistencies. Coar-
ticulation (i.e. effect of one word on the next) and rhythms
make continuous speech recognition a difficult task. Such
recognizers make use of our linguistic knowledge (both syn-
tactic and semantic ) to characterize the range of acceptable
sentences. They usually consist of large vocabularies, both
in their phonetic and syllabic representations. Extensive re-
search has already been undertaken in this area of technol-
ogy, with CSR being the ultimate goal. Systems claiming 1%
error rate have already been produced. However, inde-
pendent evaluations mention error rates between 12% and
0.5% which depends on the complexity and cost of the sys-
tems.
While speech signals carry linguistic information regard-
ing the message to be conveyed, they also possess extra-
linguistic information about aspects such as the speaker's
USER-FRIENDLY SYSTEMS 91
KNOWLEDGE
INFORMATION
DATA
Hierarchy of k n o w l e d g e
AN O V E R V I E W 95
Human brain
Year 2500?
Human being
Birth of AI
-i —\ 1
1940 1960 1980 1990
Year
T r e n d s i n A I w i t h a p e e p i n t o its f u t u r e
96 ARTIFICIAL INTELLIGENCE
FORTHCOMING TITLES
Orders should be accompanied by Money
ABC of Biotechnology Order or Demand Draft made payable to
Vaccines for Tommorrow "Publications & Information Directorate
New Delhi and sent to:
Biology of Behaviour
Omnipresent HorrrpjgS Sales & Distribution Officer
[Bublications & Information Directorate, (CSIR)
^ K . S . K r i s h n a n Marg, New Delhi 110 012
PROMISING in concept, scope and
utility, the "fifth" generation computers are at the .
threshold of ushering in an era of machines that could
simulate the human mind. In keeping with its interdis-
ciplinary nature, the instilling of intelligence into com-
puters holds avast potential in a plethora of fields.
Even in its infancy it has revolutionized database
management, information retrieval, programming lan-
guages and system design. Expert systems are fast
gaining laurels in the wide domains of medicine and in-
dustry. Equally fascinating is the insight into the future
role of increasingly intelligent robots saving precious
manpower in all walks of life.
This attractive and lavishly illustrated book, targeted
for the non-specialist, explicitly unveils the many facets
of artificial intelligence research. The ability to surpass
human thinking is apparently not far away, thanks to
computer technology that is poised for creating
machines possessing artificial intelligence.
About the Author
ISBN : 8 1 - 7 2 3 6 - 0 3 5 - 5