004 - Artificial Intelligence (3rd Ed.) by Elaine Rich Kevin Knight & Shivashankar Nair
004 - Artificial Intelligence (3rd Ed.) by Elaine Rich Kevin Knight & Shivashankar Nair
004 - Artificial Intelligence (3rd Ed.) by Elaine Rich Kevin Knight & Shivashankar Nair
in the years since the first editiOn. of this book appeared, Artificial Intaigence (Al) has. grown from
scale laboratory science into a technological and industrial success. We now possess an arsenal of techniques.
for creating computer programs that control manufacturing processes, diagnokse computer faults andi human
diseases, design computers, do insurance underwriting, play grandmaster-level chess" and so on.. Ba_cie research
in Al has expanded enormously during this period. For the student+ extracting theoretical and practical
knowledge from such a large body of scientific knowledge is a daunting task. The goal of the 'first edition of
this book was to provide a readable introduction to the problems and techniques of Al. In this edition. we have
tried to achieve the same goal for the expanded field that Al ha,...; beccirne. ln particular. we have tried to
present both the...theoretical foundations of Al and an indication of the ways that curreni techniques can be
mod in application programs,
As a result of this effort. the book has grown. .11 is probably no lonQc.b.r possible to cover everything. in a
rigle senile-ger. Because of this, we have structured the Mink so that an instructor can choose from a variety
of paths through the chapters_ The hook ire divided into threc parts:
Part 1. Problems and Search..
Part11 Knositillcidge R ilres-untation_
Part 111. Advanced Topics,
Part I introduces Al by examining. the mature of the difficLili problems that Al seeks to solver lt then
develupK u] thcory and practice 4)1-heuristic search, pruvi ring o.ailed 4Allgorithrns lltr standard search methods,.
including best-first search, hill climbing, simulated an imam s-ends analysis, and constraint satisfaction.
The last thirty years of .A1 have dernonstratod that intelligence requires more than the abiliiy to reason.
also requires giro deal of knowledge about the world. So Part 11 explores a variety of methods for encoding
knowledge in computer systems.. These methods include predicate logic. production nil es, semantic networks,
frames, and scripts_ There are also chapter or both symbolic and numeric Ktehniques for re4isconing
uncertainty. In addition', wc present some very specific frameworks in which. particular commitmons to a set
of representational primitives are made_
Parts I. and rl should be covered in any basic course in AL They provide the foundation for the advanced
topics and applications shat are presented in Part HI, While the chapters in Parts I and El shoutd be covered in
order since they build on each other, the chapters in Part III fur the most independ.era and can be
covered in almost any combination, depencling on the goals of a particular course. The topics that are covered
include: garlic playing, planning, understanding. natural language processing (which. depends on dic
undemanding chapter). par-4111cl and. distributed. AI (which clopends on planning and natural language), Teaming,
connectionist models, common sense+ expert systems„ and perception and 4.-Lction.
To use this book effectively, students should have some background in both computer science and
mathematics, As computa hackground. th'y should have oxpericnce programming and they should
feel comfortable with the material in an undergraduate data structures course. They should he familiar with
the use of recursion as a program control structure. And they should be able to do simple analyses of the time
complexity of algorithms. As mathematical background, t u de in is. should have the equivalent of an
undergraduate colme in logic, inclidding predicate logic with quantifiers. and the basic motion of a deei2i.itan
proCedure.
Copyrighted material
xviii Preface to the Second Edkion
This book contains. spread throughout it, many references to the AI research literature, These references
are important for two reagons., First. they make i Rpos.sihle for the AtUdent {) pursue in icipics in greater
depth than is possible within the space restrictins. of this hook. This is the common reason for including
references in a survey text, The second reason alai th s refercnces have bccn included is more specific to the
content. of this book_ Al k a relatively, new discipline.. In rrkany as of the field there is still pot complete
agreement on how things should be done. The references to the sourrx literature guan.intee that students have
access. noi just k one approach, hut to as many as possible of those whosc eventual success rii1 neied!i to be
deemined by further research, 13oih. theoretical and empirical.
Since the ultimate goal of Al is the construction of programs that solve hard problems, no study of Al i$
complete without erne experince writing. programs_ Mc.iist Al programs are written in LISP, PROLOG., or
sorripo specialized Al shell.. Recently though, a Al hit spread out into the mainstream computing world, Al
programs are being wriiten in a wide variety of programming languages.. The algorith.ms pcesented in this
book are described in sufficient detail io enable studenis to exploit ihern. in their programs, hui they are not
expressed in code_ This book should probably be supplemented with a good book on whatever language i$
being used for programming in the course,
'hid book would not have happoned without the help of many people, The cotwirct of the rriAnuscript has
been greatly improved by the comments of Srinivas Akella, Ji ii Blevins, Clay Bridges, R. Martin Chavez,
Alan Cline, Adam Farquar. Anwar Ghutoum, Yolanda R. V. Guha, Lacy Hidden, A] ay Jain, Craig Knoblock.
Join Laird, Clifforcl Mercer, Michael Newton.. Charle,s Peirie, Robert Rich, Sieve Shafer., Reid Simmons,
He Simon. Munindar Tarnba, David Touretzk_y s Mazucla Vcioso. David. Wrobiewski, and
Marco
Special thanks io Yolando. Gil and Alan Cline for help above ii.nd beyond. Yolanda kept the project going
under dcsperair d myrnstances,, and Akin spent innumerable hours designing the cover and bringing it i filo the
world. We hank them for these. things and much, much more,
Linda Mitchell helped us put together many draft editions along the way. Some of those drafts were used
in actual courses, where stufJenis found innumerable b.tip; for us, We would like to thank i hem as well as. their
instructors... Torn Mitchell and lean Scholti. 'Thanks also to Speray for his help in producing the cover.
David Shapiro 4rind ate' Murphy deserve credit for superb editing, and for keeping us on schedule.
We would also like to thank Nicole Vcccbi for her wisdom and patience in the wor14 of high rusgiution
printing. Thanks to David Long and Lily Mumrnert for pointing us to the right fonts.
Thanks 10 the following reviewers for their comments: Tigal Areas. University of Southern California;
Jai trio Carbonell, Carncgie Mellon University: Dyer. 1._Tniversity of Wisconsin, Madition; George
Erns!. Case. Wintern RestIrlit: University: Pat Lingloy, University of California. Irvine.; Brian Schmid,
University of Michigan: and James Slagle, University of Minnesota.
Carnegie Mellen University and MCC provided us the environment in which we could write and produce
this book. We would like to thank our wile-amts.. particularly Jim Barnett and Masan]. Mirka, for putting up
with us while in wore %Tiling this hook instead of doing the tither thing,: we were supposed to be doing.
Elaine Rich
gala K n i g h t
PART I
Copyrighted mall:Idol
9r.
'1...• -• ! A I' 1 ..
._.1.f5_': ,- IL1 .;
t . .1 - F • ':
1 .• .
6 a 1 .: -
- I .- - 9 . . •1 :
„ ..,
-. . . b
, WM c ..,... -•-... . - • : . .t .
l : lr . al •1 1,
1 1.
Z. 7 IllaililageMiri:Fl .6. Illreigib-EMI 11MIMPIMMIMEMWIPMF
-
1 ,11111111111X1110--L3Wim
1
der are three iirinds of i;JuiTurence: one kind whierstands things for itself, the other appreciata what
others can understand, the third understands neither for itself nor tii rovri others, is first kind kg
excellent the second good and the third kind usdess.
—Niccolo Machiavelli
(1469-1527i, Italian diplomat, politica]. philosopher,
musician, poet and playwright
What exactly i aftifir.:ial imelligence Although most atizmpts to define complex and widely used terms
precisely are exercises in futility, it is useful to draw at least an approximate boundary around ihe concept to
provide a perspective on the discus,sion that follows. To do this. we propusc the following by no mans
universally accepied definition.. Aritficiat tirirelligenve (Al) is the study of how to make computers do thi.ngs
which, at the morn tit. pcopte di better. This definition is, of course. somewhat ephemeral because of its
reference to the current state of computer science, And it fails to include some 3rea_s of 1)0h:116 011y very large
impact namely problems that cannot now I solved well by eitha cumputc.ips or people. But it provides a
good outline of *hat constittilvi 4rlifici:11 intelligeoue, and it avoids the philosophical 'SATS that dominate
attempts to dellae the meaning of either firth:Alai or hgelliporre, Intelestingly, though, it suggcsts a similarity
with philosophy at the same time it is avoiding it_ Philosophy has always been the stony of those branches of
knowledge that were so Orly understood that they had not yell become separate diseipline.s in their own
right, As fields such as malhematics or physics beczine snore advanced, they broke off from philosophy.
Perhaps ifAI SIUCCeedS it cars reduce itself to the empty set,. As on due this has not happened,. There are signs
which scum to t;aggc,..t that the newer offshoois of Al together with their real world applications are gradually
-
overshadowing it. As Al migrates to the real world we do not seem to be satisfied. with aunt a crInriputer
playing a chess game. Instead we wish a robot would it opposiie to us al: an opponent, vistia]ize the real
&Lard and. make the right moves iu this physical world, Rail maims 9Lcin lc) pasts the definitions or Al to
a greater extent, A Vie read on. them will be always that lurking feeling that the definitions propounded so far
are not adequntc. Only what we finally achieve in the future will help us propound an apt rielinition for Al!
The feeling of intelligence is a mirage, if you achieve it, it ceases to make you. feel so. As somebody hag
aptly put is – AT is Artificial inirelligencre till it is achieved: lifter which the acronym reduces to Aiready
Implemented.
Copyrighted ni aleri al
4 Antifiticit inteiligelire
One must also appreciate the fact that comprehending the concept of Al at aide 1113 in understanding how
uatural intelligrnce works. Though :i complete comprehension of its working may remain a mirage, the very
attempt will definitely assist in unfolding mysteries one by one,
only played games with opponents but also used its experience at those games to improve its later performance,
Chess also received a good deal of intention. The Logic 'Theorist wios an early attempt io prove mathematical
theorems. It was able io prove several theorems (rpm the first chapter of Whitehead and Russell's Prineipia
Mathemaiiica. Gelernier's theorem prover explored another area of mathematics; geometry. Garne playing
and 111COre in pawing 7.i.harci the prop:sty that pimple who do them well are. considered to be displaying
iricelligence. Dc-spitc this. it appeared initially that computers could perform well at those tasks simply by
being fast at exploring a large n Li rnber of solution paths and then se leczing the best one. lt was thought that this
proms required very little knowled.gr and could therefor be I:loyal-rimed czsily.. As we will see Later, this
as.sumption turntd out tEl he false sine c no computer k fast enough to overcome the combinatorial explosion
generab..4.1 by most prublems.
Another early foray into Al focused on the sort of problem solving that we do every day when we decide
how to get io work. in the morning, ofwn called ornminimsense reasorthig_ 11 hie luelm reasoning about physical
objects and their relationships to each other (e.g.., an object can be in only one place at a time), As well as
reasoning about actions and their et-prisequences; ife,g.. if you let go of some it will fall to the floor and
rank break)_ To investigate this. sort of reasoning. N'well, Shaw., an.d. Simon. built the Gnneral Problem
Solver (GB), which they applied to several comnrIonsenso tasks as %Tic!! ias to the problem of performing
symbolic manipulations or logical expressions. Again, no anempt was made to create a program with a large
amount of knowledge about a particular probTem domain. Only 5 imp]e tasks were selected.
As Al research prugressoci and techniquo!..; for handling larger amounts of world knowledge wen developed,
some plirjgre.SS WiLli Ina& on the tusks just desc...ribcd and new tasks could masonably be attcrriptcd_ Thaic
include perception (vision and speech), natural language understanding, and problem solving in specialized
domains such as medical diagnosis. and chemical analysis.
F'erception or the world around us is crucial to our survival_ Animals with much 'less intelligence than
pcoplc are capable of inure S.Eilph IliiietrtM VISUiii ['exception than affi.! currrnt machines. Perceptual 417.40 am
difficult because they involve analog (rather than digital) signals; the signals are typically very noisy and
LISUa Ily a Large number of things (some of which may be partially obscuring others) must be perceived at once.
The problems of perception are disamied in greater ideiail in Chapier 21,
The abiiity lo wee language to cornIrn KO calkr u was ac Ni gritty g.if ideas is paliaps the inosi important thing that
separates humans from the other an The problem of understanding spoken language is a perceptual
problem and is hard to solve for the reasons just discus!..;ed. But suppose we simplify the problem by restricting
it to written language. This problem, usually referttd to as ntautai language understanding, ig still extremely
difficult. ln irder to understand seniences about a topic, it is necessary to know not only a lot abotit the
language itself (its vocabulary and grammar) but also a good deal ...,thout the topic so that unstated as sump! ions
can be recognized. We discuss this problem again latcr in this chapter and then in IITIOrC. detail in Chapter 15.
In addition to these mundane tasks, many people can also perform one or maybe more specialized tasks in
which carefully acquired expertise is uctss.ary Examples of .s:Bch taste include engineerifig design, scientific
-
discovery. medical diagnosis:, and financial planning. Progriuns that can solve problems. in these domains also fall
under the aegis of artificial intelligence. Figure 1.1 lists some of the tasks that are the targeLL of work in AL
Copyrighted material
What is Artificial intelligence?
A person li•ho knows how to perform tasks from several of rhL ca.teguries shown 3ri. the tig,.ure Innis the
necessary skills in a standard order. First, perceptual, linguistic, and curnmonsensu skills are learned_ Later
(and of COU Me for some people, never) expert skills such as engineering. medicine. or finance are :icquired._ It
might. seem to make sense then that the earlier skills are easier and thus more amenable to computerized
duplication than arc the later. more specialized ones_ For this reason. much of the initial Al work was
concentrated in those early arta& But it turns out that this naive J.lissmirtiptioTi is riot right. Although expert skills
require knowledge that many of us do not have. they often require much lesg. knowledge than do the more
mundane skills and that knowledge is usually easier to represent and deal with inside programs..
Mundane Tasks
PerceptlrIn
s irrn
Speech
Natural language
Understanding
Generation
Translation
Ciwrirnonsenw. roasiirrinE,.
a Robot control
Formai! TaNks
Games
- Che.,5!-;
nackgran rrycn
Checkers -Go
Mathematics
- Gen metry
- Logic
Integral calculus
Proving properties of programs
Expert TitsEliginceri.ng
Design
- Fault finding
Manufacturing planninp
Scientific analr:is
Medical diagnosis
Financial analysis
Before embarkin on a study of specific Al problems and solution techniques, it is important a lmst to
discuss. if not to answer. the following four questions:
1. What are our underlying assumptions about intellig,ence?
1 What kinds of techniques will be useful for solving Al problenTi7
3_ At what level of detail, if at all, are w trying, to moiclel human intelligence
4. How will w know when we have succeeded in building an intelligent program?
The next four tions of this chapter address the questions, Following that is a litriircy or some Al hooks
that may l of inrue-rtst and a summary of the chaptE.r.
A physical symbol system consists of a set or emit ics, callced -symbols. which are physical pal terns that can occur as
components o 1 another type of entity c40 ley..1 au expression (or syrithol strucuire). TitioLi. 41 cymbal strutturt is composed
-
of a number of instances. (or tokens} of s>inItids. related in sonic physical way (such as one token being next to
another). At any instant of time the systcm will contain .a collection cif thcze symbol structures. Besides these
wructures.. the 5y:id:al also contains a-collection Of prcv.:.cmcs that rageon cAprcssions to produce other mprmsions;
x; sex of creaiioni. roodificAliort, reprmiumiari arK1 cicsimciirin. A physical gyntliol synern is a machine that
-
pri. Ndlticesi through film lial evolving. crEllecti on at-swill-Jul situ:110ov, Shah 111 Aystet PI e K I 'fiis in 't wollid (If ithiects wig
than just these sjenall'ollic expressions theriselves_
The Phi livai Symboi Sy.treFir hryprairesit A phyRical synnboi ciysteiri hod; die neces.sxy and se [went means for
general inielligeoz acticm.
This. hypothe si is only a hypothesis.. There appear'S tt I noway to pruve: far dispruive it on Ilitizicm I L. ru Lind....
So ii nnav,i be subjected to empirical vli.lidation. We may find that it is false. We may find. that ilie hulk 4.1in the
evidence says that it is irue. But the only way to determine its truth is by ex..perimentation.
Computers provide die perfect medium for this experimentation since they can be programmed to simulate
any physical symbol systlem we 1[U% -11-IiN ability of Computers io scrim as arbitrary symbol manipulators was
noticed very early in the. history of computing. Lady Love Lice made the following observation about Babbage's
prop oNed Analytical Engi 11 e in 1842,
The opttraii ng rnwhianisrn CP.11 even b thuloorn into action irw,krPendenily of any Libjlect to oparate upon (although of
course no result could then be developed). Again, k might act upon other things besides numbers, were objects
found %gill= mutual fund-arm:mai relations could be clpri.tvgai by thaw {al the abstract scilznice of operations, and
which should bc also sLksceptible of adaptations to dire maim. or art: operating notation and mechanism of thc
engine.. Supposing. for instance, that ine fund:unarml relations cif pitched sounds in the science of harmony and or
musical composition were sustartible of such ex.pression and .i.idapiations. the engine rni&ht compo-sc elaborate and
&derail-1w: pig of wok of any de gret or complex it y or extenc. I Lovel owe, M.; I
As it has become increasingly easy to build computing machines, so it Irns become increasingly possible to
cunduct empirical investigatiuns 424 the physical symbol system hypothesis.. in catch such investigation, 3
panicuIar task that might be regarded as rquiring intelligence is selecled. A prugrain to perform the tack is
proposed and (hen tested. Althoqhvbt- liavc~ not beim completely successful at creating programs that perform
Copyrighted material
What Fsfti rtifical hrteliVepce? 7
,
all the selected tasks, most scientists believe that many of the problems that have been encountercd.
ultimately prove to be surmountable by more sophisticated prognms tha.0 we have yet produced,.
Evidence in supporz of the physical s.ymbol. sysiem hypothesis has come not only from was such as game
ptoyingr, where one might most expect to find it, but also iron] as such a visual perception, where it is more
tempting to suspect 11-ie influence of iubsyrribolii,:.. proces.ses. 14ov:rover, subsyrnbolic models (for example,
neural networks) are byginning to challenge symbolic OFICS at such low-level tasks. Such models Etre discussed
in Chapter I S. Whethei certain sub-symbolic models conflict with the physical symbol system hypothesis is a
topic still under debate (e.g.., Srnolensky1198) ). And it k important to note that ew.n the succ.nss asubsymbolie
systems is not necessarily evidence against the hypothesis_ Ii is afte n possible to accomplish. task in more
chin one way..
One iroteresiin&, attempt to reduce a particularly human Wiivityi the understanding of jokes, to a process or
symbol manipulation is provided in the book Mathematics and Iirmor [Naos, 19801. It is, of course, possible
that the h.ypodicsis will turn out to be only par ti ally true. P'ertiap,s physical symbol systems will prove able to
model some aspects or hu Marl intelligence and nut others, Only time and effort. will tell_
The importance of Om physic:al symbol syste [n hypothesis is twofold. It is a significant theory of the nature
cif human inielligcnee and so i of great interest to psychologists. It also forms the basis of the belief that it is
possible lo build programs that. can perform intelligent tats now performed by people. Our major concern
here is with the latter of these implications. although. as we will soon see, the two issues are not unrelated,
13 WHAT IS AN Al TECHNIQUE?
Artificial intelligence problems span a my broad spectrum. They app qtr to have very little in common
except that they ;re hard. Are there any technique!..; that are appropriate for Ihe elution or a variety of these
problems? The answer to this quastinn is ye:ss alert we. What, then, if anything, can we say about those
iechrikities besides the fact that they manipulate symbols? How could we tell if those techniques migh tbe
useful in solving other problems, perhaps on not. traditionally rcgarried as Al tasks? The rest of this book is
an attempt to answer those questions in detail., But before we begin examining closely the individual techniques,
it is enlightening to take a broad look at them to see what properties they ought to possess.
Orke or the few hard and fast results to come out of the first three decades of Al research is that intelligence
requires knowledge_ To compensate for itc n rig nverpnwcring zuoict. indispensability. Iznowldgr..! ixiissessts
some less di :Arable properties, inctu.din,:
1 It is voluminous_
It is hard to uhanicterize accurately.
It is constantly changing_
It differs from data by being organized in a way that correspond_s to the ways it be used_
So where dots this leave us in our attempt to define Ai techniques? We are (-weed c..onelude that an Al
technique is a method that ex 014.44 knowledgc that shouId bc. rcpreserned in such a way that;
41. The knowledge captures generalizations.. In other words, it is not necessary to represent separately
cach individual situation. Instead, situations that share important properties are gimped together. 11
knowledge does not have this properyjnurdinmtc amounts. of memory, and updating will be required.
So we usually call something without this property `4d '+ rather than knowledge..
It can be understood by people who MUSE provide it. Although for many programs, the balk of the data
can he acquired automatically (for example, by taking readings from a variety of instrumer, is), in many
Al domains, most of the knowledge a program has must ultimately be provided by people in terms they
unrkrsta
Copyrighted material
8 Arty-if-if?! Irmeirligence
1 . 3 . 1 T ic T a c T o e
- -
It this section, pw..4.ent a ..Lieric,i of three pro:...yarns. try play tictacioe. The propLan; in ibis; weios ini:rease
- - -
6
Their 4..-I.Einplexity
Their use. t11 gorteralid.....iticliio
the of their knowlecipu
111C ntijr1SiblillrY 4:Pr the it ....ipprt.5iLch. Thus, they move toward beim1 reproq.imitiuns of what we call Al
6'
r Progrant ti
Data Structures
Lioatd A nine-Q.10 tnent col. re preoe n t i ng the bil3ard.. v hore IN; elements cif the ector correspond
10 the board
1 2 3
4 5 6
7
cicment contains I Eit Nalue 0 if 'lc corrchpc.mdiET, k blank_ l if it L. tilkd with
an X. or 2 if it is 11.1l Li with an O.
..1oveitiblle A large vector of l'...1..6163 elements {39), cach cif which nine--cle[uent
4:o[7terits ot' this; iiectof chosen specifically to idluv, 'the aip.11 31hrn ii.P to.ork_
.
The Algorithm
To make a timovc. t.141 thc: followirry.
1ho 'i tor Board ternai-lie i base three) nu Ill Ise r. Coniiren it I o a decimal nuntht r.
2_ the N.NliiiiraglZ1.1 in ...;skip I IC into the vcctor storcki there.
.
3. jibe ....eol.Pr L.,....14..tclod in ...iterP 2 1c.hpviellts thc way (Ile IA1111c1ipk. the rirloeke tliat hi. is id be made.
Sosc....triciarL10.11.1.;11iLdm!
Conlin en ts-
This program is liele-Fy efficient in terms of time. And. in theory. it could play ari optimal game of tic-tom-toe.
Rut it Eras disadvania.pts:
Copyrighted material
at.1.cArnifield.11.1IFJ(rgilOgr-urCei 9
I •- n.••.- • -'2.:1
7
' .1 -• z
li take...s ;ri.)t ot. spat in stor12- the tobli.! thin specifies the corro...t move 14.1 makc from each board
probition.
S0111C011C w illIlLil•C to do a 1oE of workmx....cifying ul I thi2 enEricy. in (hie. TnnycLihk.
11. i. vcny unlikely that all the required. ninvetable enra-icis ari hi &Nei-rained 'act chilacired withilot
a
ernprN,
1
want TO eXterlii g;.111111,`, SLLy LC) IhrO,' dimensions. 'At wouttl Ira\ e (13.4.3:Lirt fr( and i ai inaC
this techniqui: williId rig) longcr V hrl tai all. since 3 positions viiot.114.1 io thus
47 Vcrwliv]rni Ili, prios.enl ntemlyries.
tecimique embodied ill. (his progn.iitl riteci an) of our requiruttienth for a :12 uod Al
Let `sNee it' wt. Ctirl eifi) tlutcr.
Progrant7;)
Data Structures
Hoard A Rim:Li:km:IA vize[or representing die board, a. EIL:seribix] for Provairi I.. [4w inNtLtihd. of
1,Aing the nu inheN IL I , or 2 in each elem.!: nt, we 2 findicalin.r blank ), 3 iine„Iii..mtiniz Xt.
tir 5 0).
Turn
Aniri[LiTer move or thE game. i alitaut [o h p]ayed; I irdirates arit: First
me„ne,
The Algorithm
Thu moil) algoriairri [a SOS Sitbpruccdirreq:
Retuirri.Li 5 if lid: center of the hoard is blank. thal is;. l3oard[5] = othorv.Ise,
Chic TOLIMk; ;thy blank noncorrwr square (2. 4. 6.. or 87.
Make 2
Rc1MIrl.. if player p can ni.11. ',yin [Sri Ii !Re). otiverob tufri ihe numl)er of 111e
square tlial constitifies nime. Thi% runclion eni.iblc the proTrani
Noss %imp) i i7 ;1 rtirl io Hock the c3pronim['n l'I.Psswiir 1.1.1>eraleti b citeckirT.. tine zit a i i 1 IH. each
of the rows. co.ltimase and diag,onals. Beciluse thlo wxy Ya.14.11:N are nuilit-wred. it {:an tcht
-
Copyrighted material
Artifreithr intorligence
puagrarnss play_ And we Mill cannol generalize any of the program's knowledge to a different domain, such sis
three-di IL tic-tac-toe..
_•a
Program 2'
This program is idEmii,..4.11 ELI. Program 2 excer row one *=hinge in th reprusientation of the baud. We again
represent the board a a 111[0-e]enleni vector, but this time we assign board positions to vector demonic. as
follows:
3 4
5 9
6
2
Notice that this numbering of the board produces a magic square: all the rows, columns., and diagonals sum
up to 15_ Thig means that we can simplify the proces or checking fora pcKsible win_ in addition to marking
the hoard as moves sire made, we keep a limp for each player, of the squares in which he or she has played. To
check fur a pcissi hie. win. ror ono player, we consider each pair of squares. owned by that player and compute
the difference between 15 and the sum of the two squares. this difference is not positive or if it is gutter
than 9, then original two squares were not collinear and o can be ignored. Otherwise., if the square
representing the difference is blank, a move there will produce a win. Since no player can have more than to
squares at a :ime, there will be many fewer squares examined using this scheme than there were using the
more straightforward approach o f Program 2. This show,.; bow the cboice of representation can have a 1119.i0f
impact on the efficiency of a problem-solving program,
Comments
This comparison raisec an iniereRiing question about the relationship between the way people solve problems
and the way cornpuiers do. Why do people rind !lie raw-scan approach easier while the nurriber-couriting
approauh is rflorE..2 efficient for a computer? We do ran know 'enough about how people work to answer that
qu.estion completely. One part of the aris.wer is that people air parallel processors and ean took at several parts
of the and at once, whereas the conventional complier must look at the squares one at a time. Sometimes an
investi alit r o In how people suave. prublerns sheds grcat light on how compuctrs should do so, At other times,
the differences in the hardware of the two seem so great that different strategies seem best. As wc learn more
alvtit problem solving both by people and by machines+ we may know better whether the same representations
and algorithrm are best for both people and rrlachinv.s. We wili discuss this question further in Section 1.4.
Program. 3
Data SInktures
Board Po Ni tion A structure containing a nine-element vector repres.eni ing the board, a list of board positions
thaE could result from the next move, and a number representing an esiima.te of how
likely the board position is to lead to an ultimate win for the player to move..
The Algorithm
decide on the next move, took ahead at the board positions. that result from each possible move.. Decide
which position i best (as described below), make the move that leads to that position, and aSSign the rating of
that best move to the current position_
To decide which of a set of board positions is best,'do the following for each of thcm..
I . See if it is a win. If sot call it the hest by giving it the highe-y4 possible rating_
2, Otherwise, consider all the moves the .pp unerrt could mike next. See %Which of them i; worst for is (by
recursively calling this prizotd.ure.).. Assume Cllr opixoricrit will make that. move. Whatever rating that
move has, assign it to the node we are considering.
3, The best node is then the one with the high.eq rating..
This algorithm will look ahead at various sequences of moves in order to find a sequence that leads to a
win. It attempt.% to rnaximite the likelihuod I winning, while ziNsuming that the opponent will try to minirnize
that likelihood_ This kagorithm is canal ilk minimax prn,cedfire.. and it is; dip-41152;W in &Lila in Cluiptcr 12_
Co rit m en ts
th-lis program will require much more time than. either of the others since it must search 13 tree representing all
possible move sequences before ma: mg etch move.. But it is superior to the other programs in one very big
way: It could be extended to handle games more complicated than tic-utc-ioe, for which the exhaustive
enumeration approach or Ow other programs would completely fat 1 apart.. It i;:in also he augmented by a
variety of specific kind_c. of knoticiedge about garmF and how to play them.. For example, instead of considering
all possible next moves, it might consider only a subset of them that are determined., by some simple algorithm,
to be reasonable. And., instead of following each series cif moves until ere player wins, it L.outd seariA for a
limited time and evaluate the merit of each resulting board position using some static function,
Program 3 is an example of the use. of an Al technique, For very small prrohlons. i i is Ic ufficiont. th.:in
variCty of mar° dircct. methods. However, it sari be tr,s.ed in situations what tholie methods would. rail.
[hen cither cu the following question-answering dialogues might occur (and in fact did occur with the
POLIT1,CS program [Carbonell, 19801j:
Copyriglqted material
12 L• -
Inialinfirrce
Dialogue I
Dialogue ;..)
Miry V: d Ii 111)pring for a new coat_ S 1112 1.4 mirl.Li a (J is r 4rc:uIiy Ntic poi it Nth rc. slie ili,..rovcreai that
rfr•l reel ly with her fa‘nritedres..,
We will also ;Attc....mpt onswer cach of the following, qui..!stions %filth each pro2n.un:
Qh What did Man. go !.11-topping ror?
Q2: "livhiir Mar?: find that
Q3: Di4.1 Mary billy anphin2?
' P ro g ra m i
L_
This program iliternpts V answer question.; usiog the literal input text_ It simply maw bus to.xt this men 1_s i n ihe
questifins against the inpot text.
D151 to Structures
ues[ionPutiorns A set of t•rnplsies thus match ccwrimon gucs.rion forms and proilikre t tic nt to twzd
match 4.1.gDirist inputs, Templates. and patterns (which vi.ri cal] lest pallerizsi arc
that if a template- matches s.k.Jucesst111.14 ail input quem.i[5n then its ii.y.ii:peilitc(1 tee
Copyrighted material
Whirl Arbikicill' Ifl relkcjefitt? 13
paiterrio uwed to try to lin J appropriate 4.1w-iv:cis i ii the For example., if the template
"Wlirp did ,r y" in.atc127, .031 input question, ttic.r: (hie text pattern "x y matched against
OK' imput temt !lie value az, is given al.. the amower to thc. toesricui.
MX( The input .
...timed simply as a itlog cliaracter string..
QUesticilr JIl ctu'r•in yucstion stored u a character string..
The Algorithm
To ansiiver a question., du ihe
I _ Compare each el Line 4.1t.Quostimirriicrro;np..Diml tht~ it t i ;Indtiso thom:thatma11:11
to genierato a Ott of iext patierrri.
each of paiienis through a substicution that 12..eilerdles. alternative form, of oro
for example.. -go" in i on vinigln rnini.ti -Acorn'. in the 1r'.x Tilis.step gc„. ne es a new, ex panda!
set of text patrerns.
Apply each of these text pill:n-1s to Text., and calla:ft all din recalling answers.
4. Reply with the s121 cif unmwer..... just
Examples
Ql: The ierriplato "What slid .1: I' rr<a1 c-hes this -and..,01-1.erates the- text paticril "Mari go shopping
for :." Afiqr thc poth.:..ni-stillsiitutifiri step, ibis pattern is. ex.paw.led to a soli of patterns inclu.ding
hirkppinu for Z. and "Mary trmit slopriug. for .7. tatter pullers]. matOe..... [Etc i
11274.U.: the program, using a convention 'hat variables rnatch the longest poy.,sibl c string up to a!...endenee
!.;.tich as a period )„ assigns z ihc ....Atte, 'Ea new coat.' which is as the ansvccr.
Lillie!..6 [] Ie to %Try larve. allowing. for the in of the ohji.21:1 of 'land- bc.i.v.,eeil
linw 11)(0 [ry imt', plum Nile 1 ikcid.- the. i rr ram or the word "really- in Llic. if. lind I
he iILrti
L.)I.'nkie" for this que!...tim i hut iniswerablc. Trait or Eizeoullted fu
the quemiinn cari. hie answered, then reTonse is 'La rod ont_"
Since no answer to this question. unlitained in tho lext, 2TISWer Wilr be found.
Commenes
'Ilk approach is clearly inadquu.te to answe.r the kirids of questions rpeoplc could ....LIn[•r reading i
E\,
simplc teL t_11 its .
4.1.LISIA'er the 1111:FM qUICSIIIOnS i delicately dependent Ofi the exact forth.
v. Ilia qucsilicirrs arc stakal and on the variations thai .1A•iere in arsign 01. it e terririlatcs hind the
pailern suhslitutirms tholi system tu:Lcs, rao, 111: slu:or inudeljulic.y til tbk program 10 peribrun ffic tea
may m4.1kc you. vifon.Ocr how :such 4311 appro.;Nch coula cv.on b prop-NI:Ai. This prin.rraEri is sub.stantiall!... 11.traier
:away from being useful 1.11.ait thu- program wt. looko,d n foi . tic-tac-roe. Is this just a str.rivinzw.
some other tr...4:11nicitio i 1:1111 ;good in 4.741i1 pari,..1.41?
1
wa5, yes. but it i 'orth ntolieming
that tho 1[11.S.pniErnrarn 1111.171Cly triatellhis palterns, percurniing .5011nlilh.31[Ons. and
then answcrs using-s4raistzloro..ard. combiurmions of canned t.L,...xt serricriax fro&riricnLs !maw(' by
matchE.1., i tilv same approach mat is used in o.n.o. 4 y r 'he mos.' famous Tirogaim..; ever written-
ELIZA, wilLch wt' In 6.43. BiliL vi)i.k 'Dud. thc. rest of this sotiticrice uil prog.int..., it cheiold
• . •
becorikb. clear that vi 11we iiwon c he! tom "iirufkiiLl intL.....111.gcnce" dile% not indt34.1c i,Ls this
except by u substantial Ntretclung
ti
Program 2
This program first (..NArverts the irtpril (ex.' into a structurcd internal form that .1.tterirpis t Ii capwre the
meaning of ihe scrii.cneelq. lt .1.1.sti. cum-cos Liurstiooq intl.} that fon-n_ Ir finds answer.; h TrratchinL2 structured
forms agains! each other..
Copyrighted material
14 Ariifiricif intelligence
M INI=Mil o_
Data Struchires
Engl..kihKum.. A do ription of the words, grammar, and appropriate SC mantic interpretations of a large
enough subset of English o account for the input texts that the system will see. This
knowlmkge of Enslish is used bulbt to map input st.tritenoN in.co an inturnal, meaning-
orien ted form and to map from such internal forms back into English. The former process
is used when English ite.xt is being read; the taller is u_sed to generate English answers
from the marl i n g urn o n m d form that constituaci the progrann; knowledge base.
-
Event 2
iturialire : Finding
rense: Pam
agent ; Alm,.
objee1.... T/ ing I
Thing I
ilisianc C.: CO ltd
color: Red
Event.?
instance: iiking
feinse : Pare
modifie )7 Maori
object; Thing .)
Fig. 12 A Structured Represen ration of a Suntence
it is no( possible to determine ...N.1-Lat thi: word -she- reinrs its without kno.o..ledge ;about the roles of Oustomers
and. &Liles people in mores. To see this., voitirast 01.1-rIO:1 iiTiteCedent INhCIL that L•Xi kill the correct
1.11c,2..-eclelli k:' the first occurrence of "she" in ihe following.
Iii the sin plt case illuqtated our CE }at-buyirt example. i L k pc.)!isi hie to derive correci answers. io our iirm.
o questions without any knowled.2c about stores or CikatS., Una till: fact that sortie :such additional
.
inibrniation may he neccs!..ar .... it!. Support qllnilit)31 answering. has ILInzady been illustrated by the lailLIre of this
Copyrighted material
16 Artificial intelligence
prograin find. au ....)r)mvizr to quizsiion 3. Thus we see that airhough extrad.ing structured repriesemation or
Clic meaning of ihr:: input text k au irnprovctnent over the meaning-II= lipprovuzlo of Program 1, it is by nu
meanglqufficient in general._ Si:' aced co look at an even mare sophislic-amdl (i.e„ know [cd ee-rich) approach!
which i4wliai we do nexl-
I- Program id
This program converts the input text into a structured form Lh L coilnirri the meanings of ihe wnteng.Les in the
tem, and then rt L:Or]lbitleR thaT form with other struo.tured forms [bar des42ribe prior k] at atyout the
otijecEs. and situaiirms invc.ilyod in the to I I u.liswors Lluostions using this .augnitiTted knowledge struclure,
Data Structures
Wored.biludcl A structure.(1 representation of hwk.grotind world knowledge. This. structure contain%
kiinewle44.,e aboui objects. acliOns and siluatic.v... r..ha[ are &scribed in the input text. This
smiciu.n.: is used !{ conm.ruut. Intez,ratulTexit from the input to For. example., Figure 1.3
shows an examplc of a iitructure hu.1 reivrewt)1...s. symertIlli knowledge about shopping.
Th Li kind of stored k now Ii dgc shout stcruitypical exen1L9 is cal I.cd IJ, script and N
discussed in mare dutail in St...citi on 10_2_ 'Ube nomiion used here differ from the one
norm allv iised in !he 1i1r2raitire for of 111c prime nolalion describes ;in
c.)bjed. of the surrie type as tlic unpr mcd syriiiNil that irnay or may riot refer to the
identical object. in the case of oilr text for eximplc, M is a coat and M' is a red coat.
Brunches in the Figure dcs.criht: attemu.rivc paths Ihniugh thL.
1. G enters L
1
2. C beg nu looking Rround
T T
9. C leaves L 10. C buys kr C leaves L 12. go.os6ep. 2
13. C leayes
13 .1 Shopping Script
Bee:dust
But to do so requires knowing that one cannot be al two places at once and then using that fact to conclude
that Mary could nol have been home because s.he was shopping instead. Thus, although we avoided the
inference problem temporarily by building ImegratedText, Which had some obvious inferences built into it,
we cannot avoid it forever, it is simply not practical to anticipate all legitimate inferences. In later chapters, we
look at ways of providing a general inference mialhanism that could he uged to suppart a prugrarn such as tic
last one in ibis series.
This limitation does not contradict the main poi nit of this example though. Ira tatty h. is additional. .11,iderIce
for that point, namely, an effectiii..e question-answering procedure must be one based soundly on knowledge
and the computational use of that 'knowledge, The purpose of Al. techniques is to support this effective use of
know ledge..
With the advent of the Internet and the vast amount of knowledge in the ever increasing wchsites and
associated pages, came the Web based Question Angwering Syqterns., Try for instance the START natural
language question a.nswering. system (impisiart..csailsnit.edul). You wil! rind that both the questions – Whim'
is the ccipital 49f India? and Pr Delhi the capita/ of India? yield the same arudwers. viz. New Delhi is the cailital
of India. On the contrary the question Are ihrre wolves in Korea? yidds 1 don't krieW if thew fire wolves in
Korea_ which looks quite natural
1.3.3 Conclusion
We have just examined two series of programs lo solve two very different problems. In each series,. the final
program exemplifies what we mean by an Al technique.. -These two programs are slower to execute than the
earlier ones in their respective series, but they illustrate. three important Al techniques:
Search—PI-4w idvs a way of solving, problems for which no more direct approach is available as well as
a framework. jut(' which any &r .o. tzchniqucs that au available. can be crnbedded...
Use of [ nowledge—Provides a way of solving comp]ex problems by exploiting the structures of the
objects that are involved.
e AbgraCtitill—PMVidiCS a way fir separating important rcaturvi and variat inns from the many unirripoitimt
ones that would otherwise overwhelm any process.
For the solluiun of hard problems, program that exploit these techniLities have several advantages over
those that do not. They are much Yens fragi[e; they will not be thrown oil completely by a small perturbation
in their input. People can easily understand what the prograrn's knowledge is. And these techniques can work
for large problems where more direct methods break down.
We have still not given a precise definition of an Al technique. it is probably mit possible to do so. But we
have given some examples of what one is mid what one k not. Throughout the rem of this book, we talk in
gicat detail about what one is The definition should then become a bit clearer, or less necessary.
Copyrighted material
What is. Art..Vicici tweak! jorwe? 19
•• .. .
ptvgrams that simply do tho tasks in whawver way appcars easiest? There have been Al projects motivated by
each of the goals..
Efforts lo build prugrams that perform tasks the way peupk do roan be divided into two classes.. Programs
in the first class attempt to solve problems thin do not really lit our definition of an Al tack They are prohlems
that a computer could casily solve, although that ersy solution would exploit mechanisms that do not seem to
be available to people. A classical example of this class of pr rim is the Elementary Perceiver and Memorizer
(EPAM) [Feigenbaum, 1963], wh[ch rnemnrized associated pairs of nonsense syllabtes. Memorizing pairs of
nOnsell se syllables is ewiy for a CuMpUter. Si reply irrpult them. Tu rctricve a resixyrisc syllabic given its a_ssoc iatcd
stimulus one+ the computer just scans for the m.imulus. syllable 'Ind responds with the nn .1.1.0r011 Ilext tr.) it_ But
this task is hard for people, EPA M simulated one way people might rerforro the task. It built a discrimination
net through which it could rind loges of the yEy1.1 able_s it had seen_ It alb !trued, with each Wraith's image, a
cue that it could later pass through the discrimination net to try to Ilnd the correct response image. But it
stored as a cue only as much informaiion about the response syllable as was necessary lo avoid ambiguity at
the time the association was siorcd. This. might be just the first letter, for example:. But, of course, as ihe
discrimination net grew and more syllables were lidded, an ol.d.cue, might no longer be sufficiant to identify a
response syllable uniquely. Thus EPAM, like people, sometimes "forgot" weviously learned responses. Many
people regard programs in this rim class to be uninteresiing., .end to sorne exient they are probably right.
These programs car', however, be usefUl troupl:s for psychologists who want to test theories of human performance..
The second class of programs that attempt to model human performance are those that do things that fall
rnore clearly within ow- definition of Al tasks: they du things that are not trivial for the computer. There are
several reaSOFIS one might likant to model human performance at these sorts of tasks:
l . To test psychological iheories of human performance, One example or a program that was written for
this reason is PARRY iColby. I 9751, which exploiied a model of human paranoid behavior to 5imulliate
the cotiversational behavior of a paranoid person. The model was. good enough that when several.
psychologists were given the opportunity io converse with the prrograrn via a terminal, they diagnosed
its behavior as paranoid.
2,. TEl ena.blz ccirnputen to understand human reiasconi ng, For exiaropic, for a computer to be ahl e to read a
newspaper story and then answer a question+ such as "Why did the terrorists kill the hostages?" its
program must be able lo simulate the reasoning processes of I:pulp.
3. To enable people to undentand computer reasoning. In many circurnstances, people are reluctant to
ray on the outpul or a computer unless they can undermand how the machine arrived at its n....-sallt. lithe
computcrts rea_soning process is similar to that u1 people' then prOduCing an acceptable explanation is
much easier.
4_ Tti exploit wItat knnuledge wc can glean feline people. Since people are ihe hosi-known periormen; of
MOsr of the ta.sks with which we are dealing, it rim kes .a 1E)11 01- Sense IID 111o).. IL) them for clues as to how
to proceed,
This. last motivation is probably the most perVasiiie of the four. it motivated severa1 very eady systems that
attempted to prodUce inte]ligent be by, imitating people at the level of individual neurons . For examples
of this. see thu c-arly illOrATtiCall WWI; of McCulloch and Pitts 119431, the work on perccptrons.., uriginidly
developed by Frank Rosenblatt but best described in .Perneptrools [Minsky and Papert, 1969J and Design for
a Brain [Ashby, 19521, It proved imposible„ however, io product even minimally inielligent behavior with
such simple devices. One rea.son was that there were severe theoreiic-al limitatiorn_s to the particular neural, net
architecture that was being, used. More recenily. several new neural net architectures have been proposed..
Those structures are not subject to the Salle theoretical limitations as were perceptrons. These new architectures
are loosely called connectionist, and they have been used as a basis for several learning and problem-solving
prog.rains. We hags' snort tl II say ahout them in Charier I R. Also,. we must eonsi der that while hunum brains are
highly parallel devices, most current omnputing systems are es..wntially serial engines.. A highly successful
parallel technique rnay be computstion.ally intractable on a serial computer. But recently, ply because of the
existence of the new family of parallel cognitive models, AS well as tecause of i he general prornim of paddle]
computing, there is now sub,stantial i nterest in the design of massively pamllei rnachinv. to support Al programs..
Human cognitive theories have also influenced Al to look for higher-Level (Le, far above the neuron level)
theories that do not requite massive parallelism for their implementation. An early example of this approacit
elm be seen in GPS. which are discussed in more detail in Section 1(5.. This same approach can also be seen in
much current work in natural language undermanding. Tlic fuilure of straightforward syntactic parsing
tnechanisms to make much of a dent in the problem of interpreting English sentences has led many people
who are interested in natural language understanding by machine to look serimtsiy for inspiration at what
Dale we know about how pt,...ople intelvret language. Aid when pop* who are trying to build programs to
an.;,alyzt pictures discover that a filter knciion they have developed is very similar to what we think people
use, they take heart that perhaps they are in the right track,
A you can SCC . this last motivation pe.rvados a great many ;gess 01AI-research. In fact, it., in conjunction.with
the other motivations we mentioned., tends to make the distinction between the guat of simulating human
performance and the goal of building an intelligent program any way we can seem much lesF. different than
they al first appeared_ In either caso, v" hay wr rcilly need is II guod model of die processes involved in
intelligent reasoning. The field of cowl,' Uhl- .1 IC kik T. in which psychologisb, linguists, and computer scientists
all work together, has us its goal the discovery of such a model. For El good. sUPfirCy of the variety of approaches
contained within the field, see Norman [198 I lb Anderson [1985], and Gardner [119851
r Copyrighted material
What Lii; .ArtificbD1 intriligenceP 21
: • i • • 1 ■ I sApqrri;
Ifioleirrc31!a1oi.1 Ytt winieriL4 day. and I do rivil ibink ?Or_ Picloivick would mind
coiriparistiri.
A: I don't think you ltr serious_ L a 'Ivinter*s day or FOLIOS. El typical wintcr's day, rather
than :1 special one like Chrisin-as_
It will. Ih• j lon.e time beforic a computer pak.!,es. the Turing. SC,Ille p42.1.1p1E' I LL1 is vc none VVer will. BM
WC arc Willing i• the for less than a complete imitation of a person.. Can wt I1.' ei-I klu::thc. achievement
of Al in Hum! finmEtin.,5?
Often tho Linsi.s.or 14? Lehi s question is. yes_ Sorni2tirries i1 is possible to. get a fairlv precise measure ihe
a pi-41gram. 'For ex ;ill pile. :1 pr-4.1griim can ackpiiiv Li che in the same as a human
plo,)]..,r, 1104 rating. B. 1111:rating_5 pho....ers whorn din:. program
-
hem_ Alrvigh programs li.,0.12.
.
at'Auired L he taiings hi.,1-102-L. than aic vast majority of. human playon„ jro orti.e.r pr olhlou. dorriairr.„ a .112751.1/4
precise ineasu•c, of 3-4 progranl`,-.a1 h ievemeut I possible._ Fror ;Ltri p I e. I )EN I)R A L is a program 1 bat
organic compounds &termiric stn.' L IL I e_ 1 C i h i I rd III. _21.'1 i.1 Pa Ti c irieiLsttre. 4.}i' AL's le% el of
croirripired 1 hill-flail chemists, hut it liras pro4litcrEl LinHlyses tllra i lthvo ori.,12,inal
re.u.11 Thu:, it is certainli2. pier-funning coirily.n.crill).
ill other le 1:1 inic.01 domains. it is possible to compare the time it takes for a program to cti fnpJC tc a tx.ii; to the
IIi required h y Li per m.lr) ILI LIB the svirrie thing. For example, there arc v1_11 e rhil [mgrativ, in List by compmer
courivinicis t rr 4,:orifi2Liri.. pal-OR:War ...o..slems 10 J reeds cot- v.11114..11 the pioneer was a progrian called
R11. 'Thor.: progriims typically ropin.- ininotes perform laNks that previously required how,. 41t a skilled
c.nr.inecr'N tinic._ Stich priPir.17.1111S art e....-alitoted by 'coking at ithi2 botiorn - wholicr tlicy s.ave {or
makeJ money_
i• marry eiveryday t1101.1.h.itrnair.r.he. IlarLier Co uneasure a pri..wurri's .rfoirmiaili:e. Suppose,
for Wt. u"}(i program ter rrarap11ni.s2 slimy_ For pnthierns such as this, the ho dl. It is
usually prod,:r arri respoitcled hi a dy thai r...rson could !lave.
-
VI
Copyrighted material
22 ArNiceeril ffirPilliD0tIcre
The hiqncry resc arch in arri nein! intelligence laNcinati rigsrory, red Liiet.1 by Pamela. McCordi i 11979.1
in her Priachfilre..11,1w Think. Becii1.144! 41111141s1 i.1111 of what we call AI hits he ti.' dek eloped over he
years.ML:Tori..11,1c1c.was NI conduct her re.sc;irc.11 for the boa. b I ai....tually inicrviewing almost all of the
pcople ...vhosc vr.ork, wa, influential in forming the field_
.1viost cit iht:
1
conducted m Al hati beer' originally reportcl..1 'puma] articles. confercnce proceedlings.
or techilic..11. roporis. Hut some of ihe most intere,.iiing o,r theLe Flpers have later -.pre:Aced rn speciall:allections
published Comploters and Through! [Feigenbaum lin4J Feldman.. 1963] i vory eiirl3. collection of
.
this sort. Litt!' 4.1nc.:.'s. 111.C1k1L11.! Sinvim ant! Siklowv [1974 SA:hank arid. Colby 11973], Iiiihrom. ankl
11975!.. WatQrroo n all Li I ia I197 F i rod 112.1. 119791, Webber and Nil ssgrj. 11191. I I. H.iitpt:rn 1.19861,
Shroh.L. 119K4. and sevoral utllors [bat are mcnri.i.mial in later chu.ptcn; in connection with spociric. topits_For
nev....er AI parudigtrio; t.1-1c2 hDak .F.Intehat.torto h.. r411( • .1.r0ficire [Tnshincpri. P)9SI
a good one.
Thr2 major journal of Al research is culled Nimply inielli:;,ence. To addition, Cogairfre Sejetrue
dccorcd [0 paper:, deu.]ing the overlappinE. areas of psycholo . gy. arid art i intelligence. Ai
Magtizine is a E1101-43 ephemeral,. IcAs technical rru.ig.w.cirbo that is published by the Anwrican Assoiziation for
Artificial intelligence (A AAI). f.EPE Erperi. 'PER Tronliarrimrs. on SIIWIrefriSt Man tilnel CyhrTiljfIre , /EFE
Tarn enstrairmA pri Neural .verwrirkv sevcr;il oitier journal!, pilbli.,11 poiper.... a broad per [rurn or A
application EL Perb;iiih.
Si nc I 969. licit: hx... been a major Al con the. hi tcrnati oint CCillforenc....c: on Artificial I rite I igence
.
arCA Iii hdd every two iv ears. prooceding.s u t rh se conferences give a good picture. of the work. that was
itakine plaice ;it the time. The other imporiliirit Al conference_ held three oat tvery four VCIEDI sialitiu
. -
1980. is s11.orp,11100 k 1.1 k: A A Al. ;And its proo.hoclings,14.30. ;ire puhlkhed.
ln u.ddii.jun 10 iiiicse 2 eneru.I rcrerenon, them 12-74.isc!...rr wholc irray ni papers and hook,; dncribing individoal
Al projbas. Rather than trying to lit them all hero, t1u arc refer-J.12d to op; 4pppopriale. Ifiri.K.igliouo the
this. book.
What crodusiow; ean we draw from ibis hurried. introduciion to the major questions of AP 'Mc problems are.
varied, in[cresiiimg. arid hard_ scl]ve them• w will have ti chi! programs anti p rhap al miter u - 'tag
of human thoulit. M1t1 .114.11 Elk; ihe best we inn lo iteria Lr amt e cwiri 1X11 ir wi havc soivcd the
problems, wind then vie must try in (14.1 so.
1-1i-iw actually to go about golviny think: problem!, iN the topic tsar the rest or this hoc k. Virre need mizthods. to
hdp LIN Mik Ar s serious dilemma:
J I Ain rrii3!;.t contain ;.I Lou of knowledge if it is to handle. anythirlp bull trivial toy prublornis.
EhLt al.. the' 4.irn 0 u litol.k rto od":212. Lirows. it becomes. h.arder mss the u.ppropriate things when
needed, so mc,reknotAilledge fl uNt EL LLIdo..1 io
Y
H ut now Ebert t even mart: knowledge tc a inanN.re,
s() V1111112 itlUsl 110.;' Jitliled. and r forth_
Our in Al is 10 construe! working. proE,rrarns that solve the problems we are interested in.. Thruughout
MOM tar !his. book. Wt` ftacus. tan [h• design of repro:.;eniatitHi rnechliniNms :Lrid algorithms that Carl USCCI by
pl'OrFallik; WE solve the problem., We do not sivrid much time discth.sinE the provrarrrrning proc‘iss ptquired E ti
turn chew Eile6igns into working pfogranh. in theory, it does nE 5E ]rrat ter how thih. process is carrioil oul ill what
language it k Mont, or can What machine the product is run. In practice, of course. it i5 Oflett much eiNier
paxioce as program uF.ing of ceJti rather than another. Specifiru.11y, Al prtrgrrnrI1 apa easiest to build using
larkpiap:s that Iu e been designed io uppert syrnb4.1tie ruttier th:.in prirnarik,... numeric computatiorn.
Copyrighted material
WWI is Artifrard lasehrigence? 23
Istrithm IMF
For a variety of reasons, LISP has hisiorically been the most commonly used language for Al programming.
We say little explicitly about LISP in this book, although we occasionally rely on it as a notation.. There used
io be several competing dialect of LISP. but Common Lisp is now accepied as a standard. 1 fyou are unfamiliar
with USK consult any of the following cur s; LLYP1Winston and Horn, 1989]. Common Lisp [Hennessey,
1989.11. Common LISPvraii IWilensky., 19861. and Common Lisp: A °elide introdliction to Symbolic
Compiraation rfourevlcy, 11989a I. For a complete description of Corm-ion Lisp. see alitinnat± Lisp: The Reference
[Sleek. 1990]_
Another language that is often used for Al progranuning is PROLOG, which k described in Chmptcr 25
And increasingly, as AI makes its way into the conventional. programming world. Al systems are being
written in g c-nend purpose programming languages such as C. One reason for this is that Al programs arc
ceasing to be standalone systems; instead, they are becoming components of larger systems, which may
include conventional programs and database-s of various forms. Real code (foes not form a big paxi. of ibis
book precisely because it is possible to implement the iechniques we discuss in any of several languages and
it is important not to confuse the ideas with their specific implementations. But you should keep in mind as
you re-ad the rest of this hook that both dm knowled,gc structures and the problem-solving strategies we
discuss must ultimately be coded arid integrate,d into a working program_ This process will definitely throw
morre light into real world problems faced in the implementation of A] techniques.. It is for this reason we have
imroduced Prolog to cnsure that you ink, not end up just reading and believing_
AI is still a young discipline possibly in the 5CUISC ii Et Nile has been achieved as compared to what was
expected. However one must admit a I Lt more has been learnt about it_ We have learnt many things, some of
which are presented in this book. Rut it is still hard to know exactly the perspective from which those things
should be viewed. We cannot resisi quoting an observation made by Lady Lovelace more than MO years. ago:
In considering any Rev; subject, there is frequently a tendency, first. to eiverrizie what we firvJ to bc al wady
interesting or tr markable; and, secondly, by a mill of natural reaction, iowiderrobte the true pitate or the case,
when we do diwavcr That 1;:par maim.; have .itivia_ssed thusc that wcrc rcailly teriabic. 'Lovelace, 1961 1
She was talking.about Babbage's Analytical Engine. But she could have been describing artificial
intelligence.
While defining Al in terms of symbol processing it would only be right for us to inspect the problem of
Symbol Grcnindirit {Stevan Hamad„ IWO. The Symbol Grounding Problem, Physics, D42. 335-3461 and not
forget about it whilo grasping any claw concept_s. discussed in this book. Harmad defines the symbol grounding
problem citing the example of the Chinese Room [Searle, 19801. The bask assumption of symbolic Al is that
if a symbol System is able to exhihii behavioni which are indistinguishable from those made by a human
being, then it has. a mind. Imagine such a systorn subjected to the Turing teal in Chinese. If the s.ystern can
respond to all Chinese symbol siring inputs in just the manner as a native Chinese speaker, then it mem
(seems) that the system is able to comprehend the meaning of the Chinese symbols just the way we all
comprehend oar native languages. Searle argues that this cannot be and poses the question — If he (who
knows none of Chinese) is given the same strings. and does exacily what the computer did (maybe execute the
program intunially!), would he be undemianding Chinese? The. rhetoric 4.inly leads to one tinambiguou_i inference
— The compakt does WI undo-2;1'mM a I hini,... It is thus important to note that the symbols by themselves do
not have any intrinsic meaning (like the symbols in a book). They derive their meanings only when we read
mid the brain comprehends it. Et goes to say that if the meaning of the symbols used in a symbol system are
extrinsic, unlike the meanings in our heads. then the model itself has no meaning. As the symbols themselves
have no meaning and depend on tither N.yrritiols whose meanings arc al.so i:...x mimic., 01: SOCITI Iti) he reasoning
around tricaningless entities Which ir,42.11' is a m(2._aningless affair! This k the symbol grounding problem.
In the context of the meaninglessness of the use of symbols, Hamad provides a classic example of learning
Chitties_ ASRIUSTie you tin' not know Chinese aril had 10 learn it using a Ciiiilem ri.) Chinece dictionary. You
Copyrighted material
24 Artificial intellbence
would compare character by character of a given word and find the corresponding word in the dictionary only
to find many more (meanings) written in the iiarne language alongside, for which you would repeat the same
task. The process would put you on an endle-is merry-go-round_ I i would be only by trauslaiing it to a language
that31.Loij uhderttand that your brain can finally per what it Fricari&_ The Chinese symbols in the present
ease ate not grounded to its meaning. The moral of the example is simple — You cannot round the meaning
of a symbol. with tither meemingien symbols_ Hamad 4.-11so dies that cryptologists are able to comprrehend
ancient languages and symbols because their eftbris are grounded in their real world domain knowledge as
also on ..orne previous language that forms its has is_
Robots form the ultimate test-bed for Al. While Al. researchers have brought forth a reasonably large
repository of techniques and programs that are based on the symbol system, implementing them on robots
have posed several prohlern_i.„ Though this irriay be beyond the 14:ape of thig book we niu41 exercige caution
n it implement in 5.yrnholic Al.. Tar instance an board a robot a Nymbol 'red' has to be actually grounded to
inmc value_q rep nod by, die camera or a colour sensor..
Finally one should riot forget that research in Al is multidisciplinary. People have been using AL techniques
to reap benthis in a gamut of applications.. There are still a lot more autrodden paths to be di seeverrd. In the
quest 10 find better techniques, the reader is. ihavised lo give imagination a free Tun r that the marginal and the
peripheral are ac-Vo rn oda ed without losing the grounding of each symbol.
EXERCISES
- IV- 1% • .••• • AIIIINIVE •
1,. Pick topic within the scoric of Al and use the 144. antcs described. in this chapter to do a
21 SpeC[tiC
preliminary literature search to determine what the current Azle of understanding of that topic is. If you
cannot think of a more novel topic. try one of the following: ex peri systetn:i for some spec ilk domain
(e.g_,c,..ancer therapy, computer design, ri nAnc Lai planning), recognizing motion in images, using natural
(i.e.., hum aftlike) method', for pro v ing mathematical theorems. resolving pronominal veferences in natural
language texts. representing sequences of cveniz in tin:, CT designing a memory organization scheme
for knowledge in a computer system has on our knowledge of human memory organization.
2, Explore Ow spectrum fmm stalif: to Al-bo.sed techniques fora problem other than the two digcussed in
this chapter. Think of your own problem or u,se one of the following:
I Tnuisluding an English sentence inro Japanese
Teaching a. child to subtract integer;
Discovering patterns in empirical data taken from scientific experiments._ arid suggesting further
experiments to find more patterns
3. Imagine that you hail been to rn aquarium and wen a sharl..;. and an octopus. Describe these to a child
who has never secn one. What rcsources and modulo isms dues -the child use to comprehend thn Tatum
of these marine animals?
••7••1.1..1.1 ■ . • .1 ■ is • .M.M.Pid41.1T1.■111.11.
2
PROBLEMS, PROBLEM SPACES, AND SEARCH
!-C fitnr (/rij I :V 2;0 Mart.. *ft dia /slat y' FroMwitt- kweier
—Albert Einstein
(1879 195).. German-t)4.mi thucProlcitl pad Nisi
–
l ii tho chapter, we gave a bric t al:m..6[1.6.km of Iry kinds of prohli:ms. with v. hich Al is. iypicillki
...c.]1 ;is a 4...1.11.3p le of example-s of the uuhrripii it offers 10 Nolvc I hitim.! problems. To build .L.L s....slem11.]
!Alive Ii particular problem. we need to do toter things:
I . Dofine the- pry bli,.rm prin:iselv. This WHS.!! iriclude precise specifications of Mini the initial
situation is! will Lc what firbill situation.s. cons.tituit! aceeptable solution:, to the problem.
.
Analyze the problem_ A few very important reLourl....s can have an irtunense impact on the appropriaten1.157%
or various pmsible rochniqucs Lir solYing thc pmblern.
1. Lind reprcNcnt iask knowledge that is ni.,..4:12sNary to salvo the problcm.
4_ rbooNc the hest problem•soiving technique.' r.,11 and apply it (them I. tO the particular problem_
n this ch;ipter arid the next, we 4.1isciris ihe first two and the Ilhese issues. Then, in the chapter; in
Pilot l I, we focus. on die issue of knowledge representation..
appro pilaw pitzce in E 41 official elins opening position. \Vt c,:an Licririe us. our goal any heard position in v. h ich
the opponent doe!..; not have a letza I move Lind hi...J. or her king is undcr attack_ The legal moves provide the way.
L getii D L! from the stale to a. goal state_ They can he described easiViy as a set of rules corisititig of two
pail k: left side. that serve.... a Filtern to he maiched against the current board position ;And right that
Copyrighted malerial
26 Artificior 1i reilligence
describes the change to be made to the board position to reflect the move_ There are several ways in which
these rule..., can be For example, we could write a rule such as that shown in Fig. 'lir'',
8 14 A 10•94 gli 1 ii.slir Lit /PIA alz
7 i 1 A 2. ' .±. I .1k.1A 1 : L I i i I
I I
. . i J
5 1
. ! I I
4
3 I •
1
1
1 1 1
2 A nHai A
i
We have just defined the problem of playing chess as a problem of moving around in a slate sparer where
each :-;taie corresponds to a legal position of the board. We can then play chess by stalling at an initial state,
using a set of rules to move from one state to another, and attempting to cad up in one of a set of finial states.
This state space representation seems natural for chess because the set of states, which corresponds to the set
of board positions, is ;Artificial and well-organ i zed. Tilk same kind of representation is also useful for naturally
occurring, less weil-structured prrobierns, although it may be necessary to MC more cornptex strueturrs thacl a
Copyrighled material
Prqu'vrn Spaces, curd Search 29
The eNtre.Trke of this approach Is shown in the first tic•Inc. toe prcll:rain of Chaptcr I_ Each (...-ritry in
ector Q.oliTospocii.ici. IL) a rale
art rati 4)J1.1111... I rt side.tifi each 02.L.cri gurat I E1
ctpresented implicitly by th.c. iridcx position_ The right side. of each rule. diz!,cribes. the upc...T.idin.n. to be
perforthod and is reprrsented by nin:: elenicini vector that ctErre.spomis ti the
-
Each of them...! rules is maximally Npecitic, it applies only to .i sinyle Niard. and, vis is result. no
required whcn Kuch rulcs are used. However, the drawback to thiK exirerne approach r !hat t he
problem solver earl take: ric 4.1.4.:Eitan. at all. in a novel siination. lrr tact, c2.gseritiftilv no prohlrrn 5.49/1.-ing really
occurs.. For iliiC-C4.14.:-.toe playing program, (hi.,l I R F d prLiblim, since it i ible criiirnerate all the
- .
Nickwion.4 tH.vord ions) Oral may 4 11.:k.:I ki. TIM fir Inriom prt11 51121111b;.. this. k nilt Ihq 4.71...e. In orddr to
so] VC nevi. problems_ more .E.cricr:11 inusi
1, .
1 1 second is ex.c..mplified tly rules 3, slid .1 in kr.. 2..3. Shtltilli [1105. Or should they not ki inctuded i r5 tho
)ist or avvilahlc operators') Emptying an tutnicastiroi amount ot-v..-aior onto the gintind is cc rtain]y allowo3 hy
;tic pnibluni sti.i[ernent_ BuI a superficial prolirriiilarir analysis. of [1.3e proble3I1 311akE'S it clear doinp eta v ill
clever ,..Lbt i1111Y dEPNer [0 a solutinn. Again.. we sec. rlkc IL LP1 k. 111114t dehailV
j1.3S.1 the prObieni ItseIC. 4124 Oppi.X41,.'d Li) nil problcm ;Ind sonic. kriovilcidgc
solution.
Itu.1 11 and 12 &Lisa-aft. a Third issue. To sec to dratthi250 Lepre.seni..
look at the 1w :it tiao Noluition.....ihown in Fig_ ()nee the! ctale (4, 2) is re lied, colivintis h
-
n 1
ki dinne- 1.11. 12:1,114111.; produced, but tl ilev ;tic. in Ow.ii.k...rcon.v. St} the thiriL., IL) (Ii) i
111,:nr 3 RIM bcfon: IhNE cHri be 4101112, the water 111;it i Areacli.. L]m2 4.2.;il1on jug ri51INIIN: crilphicd
out (rtlk r ). The iLica bellind these speciat-parpose vuks is to capium the 1,:now[edge that can kv
usiv,.1 this stage the probli2rn_ Thcs..;,.. rules do not nctuully acki privicr to the s•sti.:rn since the
up21;:itic.)rts they describe. are already rim% [clod b) ru.L.- 9 the ca,e of rule 1 I and 1-5) rule 5 fin the c.a.s.e of ruk
12). fiut.. dept-nti* on lie ciairo] strare.:4). that is. ustLi for selerliryi i l to tr y [luring pmblem
Ole Lhe 111 in.ay klil-gra4,1,,.. perform:mix. 111.31 irk: use (11 th..2...e. rulc,.. rimy also improve puTiorrilance ir
preicri.mco is siktial casc. rules (as viirc discuss. in Seciiogi
-
We have row discussed two quite different problern,:. chess and thc tivater 11.1.11. problem'. From
cIiscus siorlc. it should be dear that the 1)P:it Li.terP toward the deslgnora progr:im to solve a problem' must he the
crealiiin fit- a formal and manipulable. Lte!..cription of the. prol-,11.1m 11.; [Ornately, we 'would like to he uhie to
write programs I E•i a[ can ploducc such forinal descripaorp. 111.11111 infL51 Ogle S. Th i rprocess is
called f.tpuraffoo[rfir-Ntriort. h. is no! ot tL 1 lwon -uncler:,ii lww lo SLICT1 progrorm. hmt sce Scction
17_1 fur a (14,:cri pt i or tine prugruni. Lbw pleci: prflbICT11. Until ft h.:curries possible ID) autuniate.
tills process, it must hi cifinc hi... baud, however_ For :cimplo prohl SLIch a che:is he wa[er jug., this is not
very difficult. Tile problem!, art: artificial
- .
h
..ILi' i
]..5111. l) structured. For oiticr probliins_ varlicularly
occurrine, tines, [his step is much MON tlie tw..1., of vecifying precisely
1112a11%; onlersuirid an Eliniglish Szlitencc_ such a specification must sonieliow provided bcfore
we can deLiig.ri a program to s.olve the problem, producing, such lx.Fcific'ation i itsclf ven.. hard problem.
.A.h.hough our ultimate goal is to be able to solve difficult. unstrilemred prubleins. such naruiral language
Lifiderstimpiing, it is t12.1111 1E-3 cimpTor problem,._ ...1.14.:11 as the waler.iti..4. prolliern, in order to gain, insigto
into tlle details of mileillE)LIN t ha I t u i I 1 Ionia the bor,k for !hie hardL.I.
Surm-ruziwirrig%Oral h;ivc ji.ht said. in ordor to provide ;1 form..11 (tc.scripritm of a problem, we rims! do tile
following':
1. Detine stale %pace that contain!, all thy: possillk configurations of ti k,. (511:jc2Clh
.44)1110 nne..e.), ti'si2, I L ihlt 141 c.kfille this KINI.Ce With() Lrt cxpl ii:itly eniurniffa [ins all
or UR: SU.NicS ii cuntains.
Copyrighted material
30 Artirmial meelligerIce
2_ Specify one or more tai wirhin that space that deicribe possible situatinris rrom which the problem-
solving process may start. "Flint states are called ihe
3, Spcciry cm: mom swics that would he aixtriptablc 21:S. 14"Flutions to tho prohlm -11hes zitates are callcd
goal &rates,
4. Specify a set of rules that describe the actions. (operators) aNailable. Doing this will require giving
thought to the following iNsues:
I Whart unstated assume ions are present in die [nformal problem description?
How general should the riles be`.!
How much of the work required to fiolive the problem Ai rim Id prot:,mi all repi :. ntiii cad i n the
rules?
The problem can then be solved by using the rules, in combination with an appropriate control orategy, to
move through the problem space until a path from an initial state to a goal state is found. Thus the process of
sciitch i fundarntitall to the problem-solving prortm.... The fact that. search provides the- ba.si: for I proces&
of problem-solving does not, however, incan that other. more direct approaches cannot also be exploited.
Whenever possihie, they can be included a steps in ihe search by encoding them into the mks. For exairipte,
in the water jug prithlenrt. we use the siandani ariihrnefic operations. as single step% in the rules. We do not use
search to find a number with the property that it is equal to — (4 — -E Of course, for complex problems,
more sophisiicatcd computatiorm will be reek,]. Scarch is a general. mechanism that can be used when no
more direct method is known. At the same limo, it provides the frarrwwork into which more direct methods for
,solving subparts or a problem can he embedded.
This currieentiuri fur the use of and right sides avowal fur furwarti rules. As WC wilt sec timer, man!, I1J Le
systems reverse the sides_
Copyrighted material
Problems, Prahicerp Sp -Km, ar' ,ceive....11 31
Ali of thesc systems. provide the overall architecture: of a rpnxi action system and allow the prugroi-rirncr v..) wri(c
rules that iiefine particular probtem5 to be solved. We di 5f„..uss priAlunion systcrri i...isLIC5 further in Chiiptcr ti.
We havi: now ...een chat in order to solve a problem. we must Erse reduce it to one for which a precise
SIOIMIll L,:an he gi‘err. Tlii-L can be done by delinlng the problern's sratib.space (includinis. ihe mart and Qoul
st9 to si anti 21, Y.L.'t UT opt:Jailors for moving. in t hat 5pace. The problem can then be solved hy sears ii n LI In4 ar ;I path
through the spnce from i:kri initial state in. a goal s.tate. The pcocesN of solving the problem can userully ht
modeled LS a prod LiCtiOrl Systerit 111 the. rest u r th is suction. wo look at the problem of-choosing the appropriate
control structure for [hi. production soystern _so tha4 IFic search can he Sys. efficient Lis possibt:.
(0,0)
.11)..0)
0.0.) (0 3)
(4: ) . I 0.3) 1 1 ac o
Fig. 2,5 One LvvEll ola arcoatti- Fig. 2.6 Boat Levey vrr./ Braga -
First -Search Tme FirsSer.r.re...1r Tree
'' Rule ,. 4, I ]. Einii12 have t.i.Lerr 4;11ored ill cons.tructilip. the ....Lbk.i.puli litu.
Copyrighted material
36 inteiiiigence
l•
the purpose o a houristic function is. lo guide Ow s.tmrch process. in [fig must profitable direcikm by
suggesting which pill [a fallow first when ]ncire than ono is aledil.nhk_ The more accurately the hourisiie
function cskiniates the truc iirierits of each no dc in the :se;Arcli Ina- (or g..raph.i., iht mole direct the holution
process_ In thc extreme, the he function would bc so .trod Lhat essentially no earth would he required.
The system would move directly 1rN a. solution, But for many problems, the cost of computing the value of
such a functivil would cidunweiei the effort saved in dtc: pror.vs.s .., Atter MI, itwuuld Ix possible to
compule peirkLt 111121.1fiLLCM fiirliA14.1[1 hy doirlv C.:4J-inplete SC4Jrc1 frEyrn the. node in question and determining.
whrthri- It 'cads to El Ili N. HI solution_ En general, there is a wade-oil- liciween the cost of evaluating a heuristic
furiciion and the saviriFs in search time thlt the functinn proyirics,
the- previous. soctinn, th• solutions Du Al problems wen.- descrit-ted u LITRICring On a search process,
Front !he dim:m.04mi in this i[ -should be dear lila it colt wore preci!,ely he desizribed [Ls a prucesh rat-
h e
uristic. search_ Some hiairistics. im used to define the control structure that guides the application of
rules in the se4.1.rch proc.c.s.s_ Others. as we shall .e. will he erioxled in iirc rulo thernschres_ In both casts., they
will represeni cithor general Icyr specific wurlid krxmledge that makes the ,soikition iuf hard prublerns feasible.
This 1es11N to an way that could define artificial iniellivencv.: the .study K r [ectiniqucs for solving
exponcntially pro'1111:Trrs polynomial time h.). exploiting 1,;nowlvige iiNiut the problcin
Copyrighted material
ProbJenig Probirce7.1 sp 4 ceN, tarrci Scrr-Vh 37
: - -10 - OrALM4 - 1 IlmiiiMule•Ibli.no Jo PIK m•mbININ mIrim •••
Copyrighted material
38 Artificilil geoli -1:
Nu. Ever). t hint we need to know to prove the ihcorcriri is still true and in me rnc irk'. if it ever was_ Any ruks
tliat hark e been applied Lit tiw outset can. still Ise applied. Vic can just procted al. Nier Ilw.Eve the
.
first plkice. All we Kaye luist i ihe efrorl that vi expioring the blind 41.114,!y.
Now consider a different p14.3111en.7.
Copyrighted material
Prohliertv..„12mh.rernSpores,and Secirch 39
to dui Is to plan the 'entire. hand before [hulking that first play. I Lit Bow it is foil possibk to do midi planning
with cerhaility since We' cimnot loriLm ex:Act!). he,211` Al the c.iirds arc. what ihe phi]. ers; will do on itwir
'urns, The hicst we Call 'Lit) iptVW[gatC vcra pimp.. and use probtahitilits of ou[coriles Liu
chcww..c- tt plan 'hat has the higl icsi estimatod probability of lcading tc a gui.a.d1 scurt!n I b the- hard
-
Thine illustrate the difference be1...y.1_42-n certain-o titcome le} and 11 riccriui ri-ouworne
brjdge problizrns.. Orie way or plarming is thiLit it is problem-solving without rc-c..dhack from
the environment_ For solving CC nairl-outeonio problems_ this open-loop approzich %%AI work rim!
rcshil[ of an a.cli c.iin be piedkted planni112 L.P-121.I111gchlkhriik. ci]xbrithrn,
that i trivall teed to lcn d. solution. For 10[14:421 rtin-orit..21 H1re prc 511)1C UN, liowc.ver,*lining. can it —helm 42.,2-11 crate
-
tI soqi.pcnct: of opersiors that has a good probability of 1.12...itliiirg to a solution, 'a) oIve Sill:11 problems, vire ilecd
for ;1 process of plan rerfgon to takc ploce the plan k carried out arid the nocnsary feedback iN
provided_ In uddition to pr i vi di ng gtirantev of an ;iota milution. planning iur u.ncerhain-raiii [come prublemn
has1.11,2 ▪ ithed it is (ii[en very expenqive shrhee the number 41.1 soklion pi.oliK That need tiF h explfired
t MI al ] y 'OrMilt thc., nuimtihe` I L1 f poirns ;it c.arinot
The labt two problem characteristic!. we have di-ig.i..1,,,;e4.11, iginon.thIc vcrstli. roc over:Able in-ccovcrablL,!.
and certain-outconic vcrso!. unceriain-outconle.. into raLi in an in tc.n::....ting. way_ .As DIrcu.dy been mcnitioncd.
one way to irr.e.erovuraible b terns is. to plan an entire soil ution b• [urn ie. tub:irking on an imp] Li nee tai i on
-
f..)f pkin. But alb. planrling process can only he iluite kiTectively for 6:E.:mini-Lim too no Thus (me o
the hurc.le:L.t types Of problem., til solve k M1 e irrr..b.cove.rablth. tinvvrtniii-ntilcorne. A Fink: cvainplos 01 such
proble ms aro;
Playing. brid2e. hut can kill vhe h; the lable acciaraw csiiniutc.... of the probabilities
of L:15cli of 1 1.14 ixIssiblc
COrarolling a robot The tuttcome Iv; uncertain Ibr a 'variety or masoiri.... 54.1i7ic-one might nurs.c:
sometling. in tiro the path or the arm. The :Lcars of th• ann might Mick. crnir LIM Id cause thc. air It
to knock ovcr a whole stick of thirigN.
lliwyer decide hiya t4.1 deren4 his client against a nutnier oharge. Herr4 we probably canclut even li.st all
the po...:sible outcomes. much PrOhilbili6CS.
2.3.4 Is a Good Solution Absolute or Relative?
Considur the problem) of iuti...vcriET Lased on it such (Fic
. :..1.1.reus was
\kircu:..,..c7.1s 13onipeiart.
1%.14.7-reu:...'bry.;.r.ibornin40A.D.
-
4. Ail mr.fn
5_ All Rompeia_ns died %%hen ii.okano erkirpted in 79
6. 'ii ink hk.in 1.50
7- Ii is now 1'19] A-D.
Copyrighted material
40 Artificial intelligence
111. 1.filla7 7 U.. • Z ' t 7 . . . _or r.0
Suppose we ask the question Is Marcu..:, ;Ali\ e'?'` By rRm sc ❑ti n L2. Cach 01.1.19.9.2...14.cis in a formal languagc.
as predicate and then using formal infcrence methods we can fairly easily derive rr1 u.nswer to the
7
qu&stion. I t7 fact, either of two reasoning pHtlis will leml to ihe ag. shown in Fig, 113. Sint.. all we ku-e
interost.cd in is the ilinlywcr to the toe,tilari, it s liot minter which pallh 1. foilov, If vie do follow onie path
successfully in the answcr, then.: is nu rc asuri to ri bark arid. see if some other path [ni?ht also lead to a solution..
-
von
Man:us was a ITILM.. axiom
4_ All men are mortal. it)M 4
8. Marcus is morial, I4
3, Marcus NA as born in 40 .A.D. axiom 3
7. It is mil.): 199! A.D. itic.i.o!rt 7
9, IMari,lis` age is 1951 years. 3. 7
6 . N o rm i r i a l l i v e s l o n v i e r i l i a c 1 5 0 ' f e a r s ,
10. Marcum :ii dead. S. 15.. 9
(JR
- i.i.A.join
7 . It is ni Pv.. 199] A D.
5. Pal Poirlxians died in 79 A.D. ax ion] 5
I I . All Pornivian...; are de4.1.ii now. 7„
2. IVIdruils. wits. a 1"4111rpeiiiii. axio Ml 2
12. .Marcus is dead. 11, 2
Fig, 2,13 Tom ways cif Duricithne,1 Mot ittorco. Dead
But nrpor- consider aErain the travoling sali...:siman problem. Our goal is to firki the shurtest mute that visits each
city exActly 011CM_ Supprise the Lilies to be visiArd arid [fro distances. he[woon U112111 are as s.hown ill Fig_ 2_]4_
Boston New York Miami Dallas 1 _ .S:F._.
. Raton 2.50 1450 17(x) 3000
New York 250 I:IVO j 115EKI "291113
Mizn9i 1 1.--150 1241.X1 I tial 11011.1
DmIla...: [ 1700 15.1M1. 1600 11700
S.F. ' 3000 . 290.} 31011.1 1710{)
,
Fig.. 2.1.4 ein instance of 01E' TrETVeirir?,e) Sidie-SM GUIPrublierrr
Uric place the, saksiman could start v....Boston. lit chat case, one path that mipht be followed is the one shown
in Fig_ 2. [ 5 which is 8850 -milts lung. But is (Ili!, the to the prohlern0 The answer is th..,i( W e canrint
be sure uriles.s: we .iLls.o 1 ry all 4,1ther 1).151.11S It) Makr2 t, r [11.0L 11.11 no {if than is sh itri c}r_ In (hi% 1..7411S1:, be see n
from Fig. 2.16, the firm path is; definitely not d solutimi. Ui Eh; sulestriart's prublem.
Thy sc two cmumples. Ulu:in ate thk... difference Scimitar any path problems and bes( path problems. nest-
- - -
path problems; are, in general, carnputaiimmlly imrder than an) path prohlems._ Any-path prnhIcrris mil alert -
be solved in a reil:sunable ..irriount of time by u.sin hcoristics that !-..ogge,..i 12.Dof.„1 paths to expkne. (See the
discussion of sc:arch in Chapter 3 for one wiiiy of doing this.) 1.1 the heuri2itics. arc not perfeg...t, tltc
search for a solution rnav not be a Ltiro2ct a pal..,sible, but that doe% not matter. For true best-path prohterns,
however! no hturistic t hi t t ald possibly 11t i tlic br.:Nt Ma I tats t fn czn hr used. SO a much more exhaustive
arch will lbe. periclirried.
7
Of coursc. rcpresenting thcbc Lii.;iiurnen.I..seta Clot a rrireciKeiical procedure could cApIniE thcm ti ui the 4.[Licsticyri. also
ret.v.tirr.....4.theexplicit uf other facts. such as. "cit.:A implics nEwt alive \kir rat, ihi, i>> Clr.i.pler
Gopyrigillted material
PrOtWenTS. Pr'*Or? Spaces, luau Search 41.
1.1■146!4•11%mil-.17111`011111044.11.6•.; r"1:11••=1■31ilinilk
1
Elosloni
LTosion OM))
[30.00) [San Francisco I
C174X)/
(171:11:1)
D.ail6i-
I Callus I
0500)/
(15010)
I NewYorki
(120D) 11200)
Miami -I Miami (1450)
(1450}/ acrslciri
-stark
Total! (B850) Total: (775a)
Tok[; (8650)
Fig.. 2..16 7147.1.Puth...;mi.' Cities
Fig. 2.15 One Path or: wo],w arc. Ciffir....
There are swctual comporierukti f t hi..ientenee, euch which., in isolatiun, muy more than Oirie
inierprelikliron. Hui Eh: 4...ornporionts It1kl.t form. CCALlient h e • 1. 11 -1 : 1 they constrain e.cich (51.1itr'S
1 1 41 1
Copyrighted rnalerial
Problems,. Prohipin Space.% our Search 43
. 'n• 4 1 % , •P- I IM7 :'. , 7.'111_;:•••••-, r6r,emt•IFIFT'r
Solilary, in which the con-puRr is givuo a problem doscrip(ion and produces i:in answer with no
intermediate communication ;und with no dornand for an cxplanotion of the n2asoning prmess:
conversatic vial, in which there IN. iniennledliare .L.i.iirirnunication 11).121.0A:cm a [J ii. and itw carnpuiff, either
to provide addition.;31 as.sis.tancic in. !biz :i la or to provid4...-Ackliti4.mal inforrnarion to alit user, or both
Of course, this distinctiori is not a sixict one de gibing particular problem dormins. As. lhiC jkiSt 7...h.Gwed,
mathematical Ihe-rirern priivirIg could he regarded as either. Bui fOr n Tranicular Atli oat ion, one Dr the other of
these types ..ii.sysrerris wiil Lis.ually he dc...ireld ;midi that dt..ei:don 'Ain he i irifvt tam in the choice of a problem-
soNing method.
of solvinr all problems. But neither 'mist each nevi; probit.rn he considered totally .r2/3 initio. Instead, irwe.
analyr.e our problems carefully and sort our problem-solving methods by the kinds or problems t‘oir which
they are '!-Juitable. we will. be at to bring to each new pmblIcrii much or what we havo teamed from solving
ol her., similar prohlem.;.
I. Can production systems, lil,... proble mi. be described by ii Set or chuacteristicb Eiliat stir somt light on
how they can easily be implernentuir
2. if ......a. lelLhat relationg.hip. art. Lhere betvi. eel) pfoNcrn .1....-pos 4.tritl ch• types of pre 1-&Action 9. stern!, hest
st.iitcd to solving the problems"?
Ille answer to the First quoilim is yes_ forulider the following deimitions c.)f cipNws. of production .systerns..
A rrre•are.i.trir prt iduc I i an .1;2.-v !ern is .ii, prildklellicM s)slerir in which ihic appliCation or a rule never prevents the
latur appliwaiion of another rule; thait could aliwii have. boi:41 applicd al tlic ti iliac the firm rule was seleckqi. A
rrunintinotonic produer ion Postern is one in which [his is riot true. A paniany corninutaiiVe7 1311901i1CtiOn .sysrelir
is a production system with ihe propely (hit if the :application of a particular .sequm:.-e. of roles transforms
state .r into !init.: v then any pormulation of those rule_s. that is allowable (i.e.. each n,fle's preond.itions are
satisfied when it is applied) also man s.forin s. stale x i mu slum:. y. A cfmninscirefice po-iduciiim SySieni is a production
symern that r both monotonic and partially commutotive
3
This corre!prinds to the definition of :a commutative production. syitehni g,3... en Ii NI.ISSOJ1 I C901.
Copyrighted rnalerial
44 Artificial inteigence
Alan' .1:1m-li- alleor- lial I- 1. 1 WEI
The signiricartce of these categories or pruditetion .hyht.einsI ie in the relationship ti-oween the categories
and ti.ppropriuie implemcmation srratellies. Ilut bcfare cligeusgint.2, that rtlaition.ship.. it may be helpful to make
the mmningsgat the dotinitions ulcarcr by showing how they relate to specific problems.
Thits u arrvipie cli che
- queslion above, which as.kei..1 whether there i. an interesiing relaiiorKhip
heivilecn classes of prodki.ction systenn_s and Ehiise!.; prohluns. For any SA.)1 problem.. the exist an
in number tif production. systeAris that doc:ribe ways to find solution)._ Some will be in re natural or
efficient than tabu rs. Any problem [hat can be solvcd by an priyinctiun system earl bc... solved by zi commuuktive
one0011.11- reSirjA,:teA ci:INS), but thQ i.iirriniintativt. One may he s.ri unwieldy
to be practicu.ily uselenis, CL
use individual in represent crnire scqucrices or applicatic.ms of rifles of a chirnpler, noncorrimetaitive
systent. Sk} formal seriht. there is no relationship between. 1k..inas of problems .iinct kinds or production
systems since all problems can be !...o.b.cd 1-iy all kinds of Aystems. But in a !indicth there definitely is
such a rr2daticmchlp bet' een kinds of problems and the kinds of s.ystems that lend tlhernselves naturally to
describing t1io....;4.3. pi-oh-len-lc. soc this, LI us look a few examples. Fig. 2.17 Nhoi..k.s four riaregories.
_sys(tmoi produced try the I c dichfitomies. monotonic verFus nonrannoionic partialiv
11/411.111(11onic N.:130[]101U C
it europ proving. Robot navizatinn
comtnutath.e
Not Chemical synthe,iiii. Bridge
corrimuiati‘e
commuLativ verus.
g.. 2.17 The Four Categarfes of Prothaliorh Systeri.
nonpartio.111) commutative, diong ith sonic prcEblerns that 1.4L11 naturally be solvci.1 1)). each iype of system.
The upper lef corner reprcsenu commutative s.ysternN.
Parti;illy cow mutati vv, proLlu:.-tion ;UV1.1As'ilal -1011%111V ii2norillhic. problems. This is.
ric)i surprising sin o: [1]4: 4.1r the Lwvo arc omvellijally the same, Rut recall that ignorable problems tire
those for which a natural formulation lads it' solution. strop; that Can be lenored. Such El natural frinnulation
will then /IC a portially commutative, monotcNtic system_ Problems that involve ercaling new things rather
than ehanLiink!, old ones are z.encrally iLinotable..-Ilieorezro prrI w int! _ We have. described. it, i one ex.:ample tar
!LiLICK a rreutive procch.s. Mak.in2 klekliiciions from some "mown ram% is a !.iirnitar creaiive process. Beath
those prixesses can camil.)• be iniplumented. with a partialLy commutative, monutonk sysicin.
Partially C011111atitZtive, monotonic- production symi:ms are important from an irriplemewAion standpoint
because they can be implemen.ted i thou( I tie ability to bar:lama Lu preiviou& states whet) it is dint over that
an incorrect path has been follovied. Although It i <t1 c]1 io implement such systems with backiracking
in order to guru-andel: ti sysioirmiic thw databaNe mpre:Lienting ihe problem stale need noi
restored. This often results in a4...u.ci!..idcrable increase in cfficicncy. panicularly br.,C rinse since the database
will never have to be restored. it k no; necessary to keep track of where in the .1.24.-irch process every change
was. yriaik.
'Wehivve NrEially c4.1.111101.1iative pr.Lidur tioli sy....burn.... that T.irc also nLoriotorlic_ llwy are good
for problems where things d.ci. nnt chungc -, ncvi thin gct crcared. Nonmonatonic. pariially commutative
yclrern it, mil the other band.. are useful for probion is in which chwges. occur but eon be reversed arid in which
- -
order or operations is nut critical_ This.i usually the case in physical itanipulu.tion path Lem', such as robot
riavi gai ion on a flat plan e„Slippc.15.e that a robot Ii the following operators: go nEIrth (N.), go east (E), kto south
(5). arid g.0 wcst (W). To reach its goal, it does not rnaurr whether thc robot cxccutes N-N-E. N-F.-N.
Copyrighted rrialerial
Problems.. Probivm Spaces,. mill Search 45
1•1 aw.■ mr- swizemmirs■ I m ■
on how the op.12riatorsuri: choscri. Ehi8Plizzli2 arid thL. blocks world problcm can also he considcncd
-
partially commutative.
Both types of partially commuititive production systems aro sigaificant from an implementation point of
view because. they lend to lead to many duplications 1111 individual state., during the gea.reh procesl. This is
discussed furalcr i n Sc.ctinn 2,5.
Production sy,stems that art. not partially commutative are irseful for many problems iii which irreversible
changes occur. For ex consider die problem of derxraining a, process produee a. desired (..temieal
-
coil wound. The operators avail:1111c include such things as -Add ric ti: the pot' or "Orange the
temperaffire to I degrees.- TheNe Liperators. may cause irreversiblt changec to tht potion being brewed. The
order in which they :ire performed can tie very importarit in the final output. it is possible that if
x is add to y. a stablc cotripotLnd will be formed. so later addition of .z will have no effect; if .: is added to v,
howl! VCIT. a different stable compound may Ix formed. so later addition of will. have no effect, Nonpartially
commutative production !...yAi:rris. are less likely to produce the same node marry limes in the search process.
When r.iealing wilit ones that iik-i.cribc irreversihle p[43.cesses, it ii poirticLihrly imrportasit to make correo
the Ii Est i i ri lc, aliliiaugh inilicitniver,c i Jil rLl ic lc, planning can hi: w make !hal les!, important.
through the state space From the start state to a goal vi.c. can .search backward from the goal.
i
[W lk ruk 1. Prvidlicti I. lin gystenu., [ypic a] ly spend nooLbt of their time looking
for roles to apply. so it is critical to haw efficient proccdurcs for malichin.FP ru.lcs against states.
[14:0.1,' to represent. aid] node or the search process (the knowledge rcpresenrafivri intibfcrio and the
firaMe problem). For problems likc chess, a node can be folly Npresented by A simple —r y_ hi more
Climplcx probluin soIvinE.r, huwever, it is i,rlorlicient antilor itnpossillic to repre-serri of the facts in the
world and to determine u.111 ;if' the side etTects an motion may have.
We discuss the knowledge representation and time problems further in Chapter 4. We in vest ip,ate matching
and forward vers..u.!.: backward re-asoning w here wo return to productitin systems in Chapter 6.
Copyrighted material
46
One other issue we should consider al this point is that of Neurich trees versus search graphs. As rn.entione.d.
above, we can think of produciion rules as gencraiing nodcs in a se.arch tire. Each node can he exparded in
tam, generating a set of successors_ This process continues until a node representing a solution is found.
implementing such a procedure requires little bookkeeping. However, this process often results in the same
node being generated Ds pail of _.+.1.:veral paths and so being processed more than once. This buppens. became
the search space may really he an arbitrary directed graph rather than a iree.
For example, in the tree thciwn in Fig. 2.18. the node 4,3)., representing 4-gal1fins or wailer in ',me jug and
3 gallons in the other, can be generated tither by first filling the 4-gallon jug and then the 3-gallon one or by
filling than in the opposite order_ into the order does not matter. continuing to process both these node
would be redundant.. This example also illustrates another problem Mat often arises when the search process
operates as a tree walk. On the third level. the no.cL (0, 0) appeam (In fat.-t, it appears twice.) But this is the
same as the top nods or the tree, which has. already been expanded. miadasiimaim
PCI*
1 . An' dicirel
Those two paths have not gottcn Us anywhere_ So we would like irrilteirligeo
to eliminate them and continue only along the other bnAnches. E t ce
at the expense of additional storage, to retain in criernory nodes that. have been expanded and then backed-up
over,. :Since all nekleS Mt riced in thc search graph, we must DSC the following algorithm instrad. or simply
adding a new node to the graph,
Alistoritiurn Check Duplicate Nodes
I . Examine ihe se of nodes thEti have been crewed so far to see if the new while already exists..
2_ if it does not-simply add it to the graph just as for a iree.
3_ if it does already exist, ihen do the following:
(a) Set the node that is being expanded to point to the already cxiaing.-nuidc corresponding to ils
Successor rather than to the new one, The new one can simply he thrown away.
(b) If you are 'keeping traclk of the hest (shortelt or otherwise least-cost) path lo each node, then check
to see if the new path is biter 4.1T worse than the otd one. 11 worse . do nothing. lf better, record the
new path as the correct peth in UsA: to gct 10 the node and propagate the corresponding change in
LLo,st down through successor nodes as mcessary
One problem that may arise here is that cyeles may he introduced into the search graph. A Q.,cire is a path
through. the graph. in which a given node appear.; more than onf.m. For example, the graph of Fig. 2.19 contains
two cycleF. of length two One includes the no deg (Os in and (4+ 0): the other includes the nodes (0, 0) and (0.
3,n Whenever there is a cycliz, there can bo paths clr arbitrary length. Thus ii may become more difficult to
how that a graph traversal zilgorithrli is guaranteed to tcrrninaie...
Treating the Fiarth proecss as a graph search rather than as a tree search reduces the amount of effort that
is spent exploring essentially the NRITIC path scyerall times. But it mcwires additional et-Tort each time a node is
Copyrighted material
Probl'ems„Per 5paccs, and Search 47
7 •" '0 . -.11".'• ell le• 6
• r '- • ' -11 •' •' •ir
generated tit see if it has beer; generated berure. 'Whether this effort is jusiilled depends on particular
problem. If it k likely that the sanic node will be generated in several different ways, then it is more
worthy:hire IR.) use a graph procedure than if 5Aich duplication will .happen only rarety.
Graph. searcli procedures arc- csixcially useful for dealim! with parzia1.11,.. crirnmurative production system
in which a set uif operu.iions win produce the same re..4ilt regardles!... of the order in which the operations.
are appTied, A systematic search procedure. v. ill try marry of the permutationLi of thi...se operators and so will
generaie ihe K.aire node manyI i ii1 4, Tills is e.x.i.o..113....1/41Lat harsivned i.11 w.iirier jug ex.iimplif shown at.H.yve.
24 ADDITIONAL PROBLEMS
Sever41 pmblernK hnve been discus-ie4.1 ihR-roighout this chapter. Other pi.t.thlerns have not yet been
mention . hut itre common.' throq.1.14.11.0 ihe. AI iiiirruture Some haihr kwuume....• classics Lint no AI book
could be 41:11PLYIPlelleEti1 [it their!, SO Vve preseni
~ in this section_ A u..eful exercise+ at this pint, 'would !-w:
to evitinint each uf them in liFht tile teriNitic..; we have 'jug discuseti_
A h•ic I j List i catior) is poy1.1i.ipi rqui red he rare this parade of toy problcms is pi esonied. Arti
,
LcIlivcno..!
is not nieftly a scion= of in problimis and rnicroworlds (uch EIS OW blocks world ). or the [it h n ique
thm ha' bccn vc Io ii for r hi,' so problems. have~ he t~ the con' Of sy_stc[ns ill a1 sotve very novo cv prib I ems.
So think about these. problenis not a.2.: defining the scope of Al but rather as providing a core from which much.
!nun: has deivelitped.
Copyrighted material
4K • A rtifluirili inleNcien ce
SUMMARY
• a r • . • . • •I .r • • • — ..rirre 1 • nrimmimir:mpdAm■tkergq. •PC P 0171R110141•4111MMIllb War
44.4r, • • L• • • •. • 1 Ft e 1-f•fl Ihri 11 -
. • r i• • ••• - b_'.1.1. ..11.1311:rwiri
this chapter. we have discussed the first two steps that must be taken toward the design of a program to
soliye a particular problem!
1. Define the problem precisely. Specify the probleni space, the opemiors tor moving within the space,
;Ind the starting and goal statc(s).
2. Analyze the problem lo determine where it fall!. with respevi tu seven important issues,
The last two stcps for x...icieclopiris a program to solve that problem are. of course:
3, Identify and represen1 the knowledge required by (kiosk..
4. Choose one or more techniques for problem solving, and apply those techniques to the prob]cm.
Several gieneral-purposti ttehniques are presentedill the next chapter, and sevcral of
them have already been ;alluded lo in the discussion (if the problem characieristics in this chapier. The
relationships. between problem characieristic$awl .-pecitic techniques should become even clearer as we go
on. There, i n Pan II, we discuss. the issue of how domain knowledge is to be represented.
EXERCISES
..arn..11% car L r • •aerk•lar •■• • rm ml m lm i ll o rm le -f re a ge r r i.T T . •- r do • • a &i t o r r ". 1 • . • . +.0.44
Analyze each of them with respect.to the seven. problem characteristics discussed in. Section 2.3.
2. Before we c:4111 Wive u pritiblem using state space sorch, we most define an appropriate state space_ For
each of the pmblerns mentioned above for which it W ;1-; not done in the text. find a good state space
representat Eon.
3. Describe how the branch-and-bourid technique email be used 10 find the shortest solution IL, a wafer
Jug Problcul
4 . For each of the following types of problems. try to describe at food he function'.
(.a,1 world
azi) Theorem prkwing..
(c) Missiorrarics. n d cannibals
5. !Give an example of . problem far which hreachill-tirst search would veni.1.: better thin depth-firm search_
Give an example of. a prohlc n r ror which tic earch would work: boiler (ham breadth-ftrst search_
. Write an i4orilhorl to perform breadth-first :44:.-iarch of a problem xraph. Maki: sure your algorithm
works properly MI hen a single node i generated a[ more than one level in the graph.
7. Try to construct an .r4.,oritl-im for solving blocks. world prob]rns., s-uch the in in Fig- 2_10_ F ri nnt
cheat by tool.....ing ahead Chapter 13,
Copyrighted material