You are on page 1of 37

ARTI

FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

DEFI
NITI
ONOFAI
 Sy
stemst
hatt
hinkl
ikehumans
 Theexciti
ngnew ef forttomakecomput erst hi
nk… machi
neswith
minds,i
nthefullandlit
eralsense………………. Haugeland1978.
 Theautomationofact ivi
ti
est hatweassoci atewithhumanthi
nki
ng,
act
ivi
ti
es such as deci si
on-making, pr obl
em sol
vi
ng,
l
earni
ng..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
..
...
..
..
..
..
..
..
..
..
..
..
..
..
..
bell
man1978.

 Sy
stemst
hatactl
ikehumans
 Theartofcr eat
ingmachinest
hatperf
orm f
uncti
onst hatrequi
re
i
ntel
l
igencewhenperfor
medbypeopl
e……………kurzwei
l1990.
 Thestudyofhow t omakecomputersdothingsatwhi ch,atthe
moment ,
peoplearebet
ter
………………….Ri
ch&Knight1991.

 Sy
stemst
hatt
hinkr
ati
onal
ly
 Thestudyofment alacti
vit
iesthrough t
heuseofcomput ati
onal
model
s………………………………. .charnai
k,McDermott1985.
 Thest
udyoft hecomputerscomput ati
onsthatmakeitpossibl
eto
per
cei
ve,reasonandact
………………………….Wi nst
on1992.

 Sy
stemst
hatactr
ati
onal
ly
 Computat
ionalint
ell
i
genceisthestudyofthedesignofintel
li
gence
agent
s………………………………………………. Pooleetal1998.
 AI…isconcernedwi t
hint
ell
igentbehavi
orinarti
craf
t..
..
..
..Nil
sson
1998.

ACTINGHUMANLY:TURI NGTEST
i
tist
estbasedonundi
sti
ngui
shabi
l
ityf
rom undeni
abl
eint
ell
i
gent
ent
it
ies-humanbei
ngs.
 Thecomput
erpassest
het
esti
fahumani
nter
rogat
or,af
terposi
ng
cer
tai
nquest
ions,butcannott
ellwhet
herwr
it
tenr
esponsescame
f
rom per
sonornot
.

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 1
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

 Tur
ing(
1950)"
Comput
ingmachi
ner
yandi
ntel
l
igence"
:
"
Canmachi
nest
hink?
" "
Canmachi
nesbehav
eint
ell
i
gent
ly?
"
 Oper
ati
onal
testf
ori
ntel
l
igentbehav
ior
:theI
mit
ati
onGame

Fi
gur
e1.
1Tur
ingTest
 Capabi
l
iti
esr
equi
redf
orcomput
ert
oper
for
m Tur
ingt
esti
s:
a)Nat
uralLanguagePr
ocessi
ng:t
oenabl
esi
ttocommuni
cat
e
successf
ull
yinEngl
i
sh.
b)Knowl
edgeRepr
esent
ati
on:i
tist
ost
orewhati
tknowsandi
t
hear
s.
c)Aut
omat
ed Reasoni
ng: t
o use t
he st
ored i
nfor
mat
ion t
o
answerquest
ionsandt
odr
awnewconcl
usi
ons.
d)Machi
neLear
ning: t
o adaptt
o new ci
rcumst
ancesand t
o
det
ectandext
rapol
atepat
ter
ns.
e)Comput
erVi
sion:t
oper
cei
vet
heobj
ect
s.
f
)Robot
ics:
tomani
pul
ateobj
ect
sandmov
eabout
.
I
tav
oidsphy
sicali
nter
act
ionbet
weeni
nter
rogat
orandt
hecomput
er,
because phy
sicalsi
mul
ati
on ofa per
son i
s unnecessar
yfora
i
ntel
l
igence.
I
tisusedbyWr
ightbr
other
sandot
hersci
ent
ist
s.
THI
NKI
NGHUMANLY:COGNI
TIVEMODELI
NG

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 2
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

 1960s "
cogni
ti
ver
evol
uti
on"
:inf
ormat
ion-
processi
ng psy
chol
ogy
,
Requi
ressci
ent
if
ict
heor
iesofi
nter
nal
act
ivi
ti
esoft
hebr
ain.
 Weneedsomewayofdet
ermi
ninghow humanst
hink,i
fwesaya
pr
ogr
am t
hinkl
i
keahuman.geti
nsi
det
heact
ualwor
kingofhuman
mi
nds:
I
ntr
ospect
ion:t
ryt
ocat
cht
het
hought
sast
heygoby
.
Psy
chol
ogi
calExper
iment
s.
 Oncewehav
easuf
fi
cientpr
eci
set
heor
yoft
hemi
nd,t
heni
tis
possi
blet
oexpr
esst
het
heor
yasapr
ogr
am.
 Gi
vet
hepr
ogr
am i
nput
/out
putandt
imi
ngbehav
ior
s:i
fitmat
ches
wi
thhumanbehav
ior
s.
So,someoft
hepr
ogr
am’
smechani
smscoul
dal
sobeoper
ati
ngi
n
humans.
 Al
l
enNewel
landHer
ber
tSi
mon,dev
eloped“
Gener
alPr
obl
em Sol
ver

whi
chcompar
est
het
raceofi
tsr
easoni
ngst
epst
otr
acesofhuman
subj
ect
ssol
vi
ngt
hesamepr
obl
ems.
 Cogni
ti
ve Sci
ence br
ings t
oget
hercomput
ermodel
sfr
om AI&
ex
per
iment
alt
echni
ques f
rom psy
chol
ogi
cal
l
ytot
ryt
o const
ruct
pr
eci
se andt
est
abl
etheor
iesoft
hewor
kingoft
hehumanmi
nd.

Wi
l
son&Kei
l1999.
I
tisusedi
nneur
ophy
siol
ogi
cal
evi
denceandcomput
ati
onal
model
s.
THI
NKI
NG RATI
ONALLY
 Ri
ghtt
hinki
ngi
sir
ref
utabl
ereasoni
ngpr
ocess…Ar
ist
otl
e.
 Hi
s sy
ll
ogi
sms,pr
ovi
ded pat
ter
ns f
orar
gument
s st
ruct
ures t
hat
al
way
syi
eldedcor
rectconcl
usi
onswhengi
vencor
rectpr
emi
ses

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 3
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

Ex
:“Socr
atesi
saman,Al
lmenar
emor
tal
,Socr
atesi
smor
tal
”.
Thi
siscal
l
edasLogi
c.
 Logi
cians i
nthe 19th cent
ury dev
eloped a pr
eci
se not
ati
on f
or
st
atement
saboutal
l ki
ndsoft
hingsi
nthewor
ldandaboutt
he
r
easoni
ngamongt
hem.
 By1965,pr
ogr
am exi
stedwhi
chcansol
veanysol
vabl
epr
obl
em
descr
ibedl
ogi
cal
not
ati
on.
 Pr
obl
ems:
 Notal
li
ntel
l
igentbehav
iori
smedi
atedbyl
ogi
cal
del
i
ber
ati
on
Whati
sthepur
poseoft
hinki
ng?Whatt
hought
sshoul
dIhav
e?
ACTI
NG RATI
ONALLY
 Rat
ional
behav
ior
:doi
ngt
her
ightt
hing
 Ther
ightt
hing:
thatwhi
chi
sexpect
edt
omaxi
mizegoal
achi
evement
,
gi
vent
heav
ail
abl
einf
ormat
ion
 Comput
eragenti
s
 Somet
hingt
hatact
s.
 Oper
atesunderaut
onomouscont
rol
.
 Per
cei
vest
hei
renv
ironment
.
 Per
sist
sov
erapr
olongedt
imeper
iod.
 Adapt
stochange.
 Capabl
eoft
aki
ngonanot
her
’sgoal
s.
 Rat
ional
agenti
sonet
hatact
ssoast
oachi
evet
hebestout
comeor
,
whent
her
eisuncer
tai
nty
,thebestexpect
edout
come.
 Tur
ingt
est
ingski
l
lsal
l
owr
ati
onal
act
ions.
 Hence,
weneedt
heabi
l
ityt
orepr
esentknowl
edgeandr
easonwi
thi
t

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 4
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

becauset
hisenabl
esust
oreachgooddeci
si
onsi
nawi
dev
ari
etyof
si
tuat
ions.
AIPREHI
STORY
• Phi
l
osophy Logic,methodsofreasoning,mi
ndasphy si
cal
system foundat
ionsoflearni
ng,
language,
rat
ionali
ty

• Mat
hemat
ics Formalrepr
esent
ationandproofalgor
it
hms,
computati
on,(
un)decidabi
l
ity
,(i
n)t
ract
abil
i
ty,
probabi
l
ity

• Economi
cs ut
il
it
y,deci
siont
heor
y
• Neur
osci
ence phy
sical
subst
rat
eforment
alact
ivi
ty
• Psy
chol
ogy phenomenaofper
cept
ionandmot
orcont
rol
,
exper
iment
alt
echni
ques

• Comput
er bui
l
dingf
astcomput
ersengi
neer
ing
• Cont
rol
theor
y designsyst
emsthatmaxi
mizeanobj
ect
ive
functi
onovert
ime

• Li
ngui
sti
cs knowl
edger
epr
esent
ati
on,
grammar
HI
STORYOFAI
• 1943 McCul
l
och&Pi
tt
s:Bool
eanci
rcui
tmodel
ofbr
ain
• 1950 Tur
ing'
s"Comput
ingMachi
ner
yandI
ntel
l
igence"
• 1956 Dar
tmout
hmeet
ing:
"Ar
ti
fi
ci
alI
ntel
l
igence"adopt
ed
• 1952—69 Look,
Ma,
nohands!
• 1950s Earl
yAIpr
ograms,incl
udi
ngSamuel'schecker
s
pr
ogram,Newel
l&Simon'sLogicTheor
ist
,
Gel
ernt
er'
sGeometryEngine
• 1965 Robi
nson'
scomplet
ealgorit
hm f
orlogi
calr
easoning
• 1966—73 AIdi
scov
erscomput
ati
onal
compl
exi
ty
MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 5
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

Neural
networ
kresear
chalmostdi
sappear
s
• 1969—79 Ear
lydevel
opmentofknowl
edge-
basedsyst
ems
• 1980-
- AIbecomesani
ndust
ry
• 1986-
- Neur
alnet
wor
ksr
etur
ntopopul
ari
ty
• 1987-
- AIbecomesasci
ence
• 1995-
- Theemer
genceofi
ntel
l
igentagent
s
AGENTSANDENVI
RONMENTS
 Agenti
sany
thi
ngt
hatcanbev
iewedasPer
cei
vi
ngi
tsenv
ironment
,
t
hroughsensor
sandact
ingupont
hatenv
ironmentt
hroughact
uat
ors.
 Humanagent
:ey
es,
ear
s,andot
heror
gansf
orsensor
s;hands,
l
egs,
mout
h,andot
herbodypar
tsf
oract
uat
ors.
 Robot
icagent
:camer
asandi
nfr
aredr
angef
inder
sfor
sensor
s,v
ari
ousmot
orsf
or
act
uat
ors.

Fi
gur
e1.
2agent

 Asof
twar
eagentr
ecei
veskey
str
okes,
fil
econt
ent
sandnet
wor
k
packet
sassensor
yinput
sandact
sont
heenv
ironmentbydi
spl
ayi
ng
ont
hescr
een,
wri
ti
ngf
il
esandsendi
ngnet
wor
kpacket
s.
 Ter
msusedar
e:
a)Per
cept
:Iti
sagent
’sper
cept
ual
input
satanygi
veni
nst
ant
.
b)Per
ceptsequence:I
tist
hecommonhi
stor
yofev
ery
thi
ngt
he
agenthasev
erper
cei
ved.
MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 6
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

c)Agent
’sf
unct
ion:Agent
’sbehav
ior
.Iti
smat
hemat
ical
descr
ipt
ion.
d)AgentPr
ogr
am :
Impl
ement
ati
onofagentf
unct
ionf
oran
ar
ti
fi
cial
agent
.Iti
sconcr
etei
nfor
mat
ionr
unni
ngont
heagent
ar
chi
tect
ure.
VACUUM-
CLEANERWORLD

Fi
gur
e1.
3Vaccum Cl
eanerWor
ld
 Thi
spar
ti
cul
arwor
ldhasj
ustt
wol
ocat
ions:
squar
esAandB.
 Thev
acuum agentper
cei
veswhi
chsquar
eiti
sinandwhet
hert
her
e
i
sdi
rti
nthesquar
e.
I
tcanchooset
omov
elef
t,mov
eri
ght
,suckupt
hedi
rt
,ordonot
hing.

Fi
gur
e1.
4AgentFunct
ion
 Onev
er ysimpleagentfunctioni
sthefoll
owing:
 Ifthecurrentsquareisdir
ty,
thensuck.
 Ot her
wise,mov etotheothersquar
e.
RATI ONALAGENT
MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 7
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

 Anagentshoul
dst
ri
vet
o"dot
her
ightt
hing"
,basedonwhati
tcan
per
cei
veandt
heact
ionsi
tcanper
for
m.Ther
ightact
ioni
stheone
t
hatwi
l
lcauset
heagentt
obemostsuccessf
ul.
 Per
for
mancemeasur
e:Anobj
ect
ivecr
it
eri
onf
orsuccessofan
agent
'sbehav
ior
.
Example:per
formancemeasureofavacuum-cleaneragentcoul
dbe
amountofdirtcl
eanedup,
amountoftimetaken, amountof
el
ectr
ici
tyconsumed,amountofnoi
segenerated, et
c.

 Rat
ionalAgent
:Foreachpossi
bleper
ceptsequence,
arat
ional
agent
shoul
dsel
ectanact
iont
hati
sexpect
edt
omaxi
mizei
tsper
for
mance
measur
e,gi
vent
heev
idencepr
ovi
dedbyt
heper
ceptsequenceand
what
everbui
l
t-i
nknowl
edget
heagenthas.
 Agent
scanper
for
m act
ionsi
nor
dert
omodi
fyf
utur
eper
cept
ssoas
t
oobt
ainusef
uli
nfor
mat
ion.
 Anagenti
saut
onomousi
fit
sbehav
iori
sdet
ermi
nedbyi
tsown
ex
per
ience.
 Whati
srat
ional
atanygi
vent
imedependsonf
ourt
hings:
a)Theper
for
mancemeasur
ethatdef
inest
hecr
it
eri
onofsuccess.
b)Theagent
'spr
iorknowl
edgeoft
heenv
ironment
.
c)Theact
ionst
hatt
heagentcanper
for
m.
d)Theagent
'sper
ceptsequencet
odat
e.
THENATUREOFENVI
RONMENTS
 ForSpeci
fyi
ngt
het
askenv
ironment,
wehadt
ospeci
fyt
he:
 Per
for
manceMeasur
e
 Env
ironment
 Act
uat
ors
MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 8
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

 Sensor
s
PEAS(
Per
for
mance,
Env
ironment
,Act
uat
ors,
Sensor
s)ar
ethet
ask
env
ironmentspeci
fi
ers.
AUTOMATEDTAXI

Agent Per
for
mance Env
ironment Act
uat
ors Sensor
s
Type Measure
Taxi Saf e, Roads, Steeri
ng, Camer as,
Dri
ver Fast, OtherTraff
ic, Accelerat
or, Sonar,
Legal
, Pedestr
ians, Brake, Speedomet er
,
Comf or
tabl
eTrip, Customers Si
gnal, GPS,
MaximizeProf
it
s Horn, Odomet er
,
Di
splay Accelometer,
EngineSensors,
Keyboard
Fi
gur
e1.
5aut
omat
edt
axiPAES
Per
for
manceMeasur
e:Desi
rabl
equal
i
tiesar
e:
 Goingtocorrectdestinat
ion;
 Minimizingf
uel consumptionandwearandtear;
 Minimizingt
het ri
ptimeorcost;
 Minimizingv
iolati
onsoftraff
iclaws&dist
urbancest
oot
her
dr
iver
s;
 Maximi zi
ngsafetyandpassengercomfort
;
 Maximi zi
ngprofit
s.

Env
ironment:Anyt axidri
vermustdeal wit
h
 Av arietyofroads,rangingf r
om rurall
anes&ur banall
eysto12-
l
anef reeways.
 Ther oadscont ainothert r
affi
c,pedestr
ians,
strayani
mals,road
wor ks, pol
icecars,
puddl esandpot hol
es.
 Thet axi mustalsointeractwithpotenti
alandactual
passenger s.
 Ther ear ealsosomeopt ionalchoi
ces.
Itcoul dal waysbedr i
vingont heri
ght,wemi ghtwantitt
obe
fl
exibleenought odri
veont helef
twheni nBrit
ainorJapan.
MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 9
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

 Obvi
ousl
y,t
hemorer
est
ri
ctedt
heenv
ironment
,theeasi
ert
he
desi
gnpr
oblem.

Act
uat
ors:Theactuat
or sforanaut omat edtaxiishumandr iver
:
 Controlov
ert heenginet hroughtheaccelerator
.
 Cont r
oloverst eer
ing.
 Cont r
oloverbr aki
ng.
I twil
lneedout puttoadi splayscreen
 Voicesynthesizertotal
kbackt othepassengers.
 Somewayt ocommuni catewi t
hot hervehi
cles,poli
tel
yor
other
wise.

Sensor s:
I ncl
udeoneormor econt r
ollablev i
deocamer assothatitcanseet he
road;
I tmi ghtaugmentt hesewi t
hi nfraredorsonarsensor stodet ect
 di stancest oot hercar sandobst acles.
 Toav oidspeedi ngt i
ckets,Itshoul dhav easpeedomet er&Odomet er
 Tocont rolthev ehicleproper l
y,especiall
yoncur ves,i
tshouldhav ean
accel eromet er
.
 Todet erminethemechani calstateoft hev ehicl
e,i
twil
lneedt he
usual arr
ayofengi ne,fuel,andel ectri
calsy st
em sensor
s.
 Agl obal positi
oni ngsystem ( GPS)sot hatitdoesn'
tgetlost.
I twillneedakey boardormi crophonef orthepassengert orequesta
dest i
nat i
on.

AGENT TYPES&THEI
RPEAS

AgentTy
pe Per
formance Env
ironment Act
uat
ors Sensor
s
Measure
Medical Heal
thyPat
ient
, Pati
ent, Displ
ay Keyboardent
ry
Di
agnosis Mini
mize Hospit
al, Questions, ofsymptoms,
Sy
stem Cost
s, Staf
f Tests, Fi
ndings,
LawSuit
s Diagnoses, Pati
ent’
s
MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 10
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

Treat
ments, Answer
s
Refer
ral
s
Satell
it
e Cor
rectI
mage Downl i
nkf
rom Displ
ay Col
orPixel
I
mage Cat
egori
zat
ion Orbit
ing Categor
izat
ion Arr
ays
Analysis Satel
lit
e ofScene
System
PartPi
cki
ng Per
cent
ageof Conveyerbel
ts Joi
ntedAr
m& Camera,Joi
nt
Robot par
tsi
ncorr
ect wi
thpart
s, Hand Angl
eSensors
bi
ns Bi
ns
Refi
nery Maximize Ref
inery
, Val
ves, Temper at
ure,
Contr
oll
er Pur
ity
, Operat
ots Pumps, Pressure,
Yi
eld,Saf
ety Heat
ers, Chemi cal
Di
splay
s Sensors
I
nteract
ive Maximize Setof Display Key
boar
dEnt
ry
Engli
sh St
udent’sScor
e Student
s, Exercises,
Tutor ontest Testi
ng Suggest ions,
Agency Corrections
Fi
gur
e1.
6AgentTypesAndThei
rPAES

ENVI
RONMENTTYPES

• Ful
lyobser
vabl
e(vs.par
ti
all
yobser
vabl
e):Anagent
'
ssensor
sgi
vei
t
accesst
othecompl
etest
ateoft
heenv
ironmentateachpoi
nti
nti
me.
• Det
ermi
nist
ic(
vs.st
ochast
ic)
:Thenextst
ateoft
heenv
ironmenti
s
compl
etel
ydet
ermi
nedbyt
hecur
rentst
ateand t
heact
ionexecut
ed
byt
heagent
.
• Epi
sodi
c(vs.sequent
ial
):The agent
'
s exper
ience i
s di
vi
ded i
nto
at
omi
c"epi
sodes"
.Eachepi
sodeconsi
stsoft
heagentper
cei
vi
ngand
t
henper
for
mingasi
ngl
eact
ion.
Thechoi
ceofact
ioni
neachepi
sode
dependsonl
yont
heepi
sodei
tsel
f.
• St
ati
c(vs.dynami
c):Theenvi
ronmenti
sunchangedwhi
l
eanagenti
s
MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 11
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

del
i
ber
ati
ng.Theenv
ironmenti
ssemi
dynami
cift
heenv
ironment
i
tsel
fdoesnotchangewi
tht
hepassageoft
imebutt
heagent
'
s
per
for
mancescor
edoes.
• Di
scr
ete(
vs.cont
inuous)
:A l
i
mit
ed numberofdi
sti
nct
,cl
ear
ly
def
inedper
cept
sandact
ions.
• Si
ngl
eagent(
vs.mul
ti
agent
):Anagentoper
ati
ngbyi
tsel
finan
env
ironment
.
 Theenv
ironmentt
ypel
argel
ydet
ermi
nest
heagentdesi
gn.
Task Observabl
e Agent
s Det
ermi
nist
ic Epi
sodi
c St
ati
c Di
scr
ete
Env i
ronment
Crosswor d Full
y Si
ngl
e Det
ermi
nist
ic Sequent
ial St
ati
c Di
scr
ete
Puzzl e
Chesswi tha Full
y Mul
ti Det
ermi
nist
ic Sequent
ial Semi Di
scr
ete
clock
Poker Parti
all
y Mul
ti St
ochast
ic Sequenti
al St
ati
c Di
scr
ete
Backgammon Full
y Mul
ti St
ochast
ic Sequent
ial St
ati
c Di
scr
ete
Taxidr i
v i
ng Parti
all
y Mul
ti St
ochast
ic Sequenti
alDynamic
Medi cal Conti
nuous
diagnosi s Parti
all
y Si
ngl
e St
ochast
ic Sequent
ialDy
nami
c
Conti
nuous
Image Full
y Si
ngl
e Det
ermi
nist
ic Epi
sodi
c Semi
analy si
sPar t
- Conti
nuous
pickingr obot Parti
all
y Si
ngl
e St
ochast
ic Epi
sodi
c Dy
nami
c
Conti
nuous
Ref i
nery Parti
all
y Si
ngl
e St
ochast
ic Sequent
ialDy
nami
c
contr ol
ler Conti
nuous
Interactive
Englisht utor Par
tial
ly Mul
ti St
ochast
ic Sequent
ial Dy
nami
c
Di
screte

AGENTFUNCTI
ONSANDPROGRAMS

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 12
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

 AnAgentpr
ogr
amsal
lhav
ethesameskel
eton
 Theyt
aket
hecur
rentper
ceptasi
nputf
rom sensor
s.
 Ret
urnanact
iont
otheact
uat
ors.
 Agentpr
ogr
am t
akescur
rentper
ceptasi
nput
,becausenot
hing
mor
eisav
ail
abl
efr
om t
heenv
ironment
.
 whi
l
eagentf
unct
iont
akesent
ir
eper
cepthi
stor
y.
Tabl
edr
ivenagent
I
tisi
nvokedf
oreachnewper
ceptanr
etur
nsanact
ioneach
t
ime.

functi
onTABLEDRI VENAGENT(per cept)r
eturnsanaction
statc:per
i cepts,asequenceiniti
all
yempt y
table,atableofacti
ons, i
ndexedbyper ceptsequence
appendper ceptt
otheendofper cept
s
action->LOOKUP( percepts,
tabl
e)
returnaction

Exampl
e:Tabl
e-l
ookupagent
:
input
{al
gori
thms/t
able-
agent-
algor
it
hm}.
 Dr
awbacks:
o Hugetabl
e
o Takealongti
met obuil
dthetabl
e
o Noautonomy
o Evenwit
hlear
ning,needalongti
metol
ear
nthet
abl
eent
ri
es

AGENTTYPES
 Fourbasi
ctypesinorderofincreasi
nggener
ali
ty:
 Simpl
er efl
exagents
 Model-basedref
lexagents
 Goal-
basedagent s

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 13
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

 Ut
il
it
y-basedagent
s

SI
MPLEREFLEXAGENTS
 Thesi
mpl
estki
ndofagenti
sthesi
mpl
eref
lexagent
.
 Theseagent
ssel
ectact
ionsont
hebasi hecur
soft rentper
cept
,
i
gnor
ingt
her
estoft
heper
cepthi
stor
y.

Fi
gure1.7
Si
mpleRefl
exAgent

Exampl
e:t
hev
acuum agentwhoseagenti
sasi
mpl
eref
lexagent
,
becausei
tsdeci
sioni
sbasedonl
yont
hecur
rentl
ocat
ionandon
whet
hert
hatl
ocat
ioncont
ainsdi
rt
.
 Si
mpl
eref
lexbehav
ior
soccurev
eni
nmor
ecompl
exenv
ironment
s.
Exampl
e:i
nthedr
iveroft
heaut
omat
edt
axi
.Ift
hecari
nfr
ontbr
akes
andi
tsbr
akel
i
ght
scomeon,
thenheshoul
dnot
icet
hisandi
nit
iat
e
br
aki
ng.
I
.e.somepr
ocessi
ngi
sdoneont
hev
isual
inputt
oest
abl
i
sht
he
condi
ti
on
fcar
i -i
n-f
ront
-i
s-br
aki
ngt
heni
nit
iat
e-br
aki
ng.
 Theagentpr
ogr
am,
isshowni
nFi
gur
e1.
8

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 14
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

 TheI
NTERPRET-
INPUTf
unct
iongener
atesanabst
ract
eddescr
ipt
ion
oft
hecur
rentsl
atef
rom t
heper
cept
.
t
heRULE-
MATCHf
unct
ionr
etur
nst
hef
ir
str
ulei
nthesetofr
ulest
hat
mat
chest
hegi
venst
atedescr
ipt
ion.
 act
ual
impl
ement
ati
onscanbeassi
mpl
easacol
l
ect
ionofl
ogi
c
gat
esi
mpl
ement
ingaBool
eanci
rcui
t.

functi
onSIMPLE-REFLEX-AGENT(per cept
)ret
urnsanact
ion
stati
c:rul
es,asetofcondit
ion—acti
onr ul
es
state INTERPRET-INPUT(percept
)
rule RULE-
MATCH( stat
e,rul
es)
act i
on<—RULE-ACTI ON[r
ule]
ret nact
ur ion

Fi
gur
e1.
8Si
mpl
eRef
lexAgentPr
ogr
am
MODEL-
BASEDREFLEXAGENTS
 Themostef
fect
ivewayt
ohandl
epar
ti
alobser
vabi
l
ityi
sfort
heagent
okeept
t rackoft
hepar
toft
hewor
ldi
tcan'
tseenow.
i
.e.t
heagentshoul
dmai
ntai
nsomesor
tofi
nter
nalst
atet
hat
dependsont
heper
cepthi
stor
yandt
her
ebyr
efl
ect
satl
eastsomeof
t
heunobser
vedaspect
soft
hecur
rentst
ate.
Exampl
e:
 Fort
hebr
aki
ngpr
obl
em:
o Thei
nter
nal
stat
eist
hepr
evi
ousf
ramef
rom t
hecamer
a,
o al
l
owi
ngt
heagentt
odet
ectwhent
wor
edl
i
ght
satt
heedgeof
t
hev
ehi
clegoonorof
fsi
mul
taneousl
y.
 Forot
herdr
ivi
ngt
askssuchaschangi
ngl
anes:
ot
heagentneedst
okeept
rackofwher
etheot
hercar
sar
eifi
t
MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 15
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

can'
tseet
hem al
latonce.
f
oranydr
ivi
ngt
ohepossi
bleatal
l
,
ot
heagentneedst
okeept
rackofwher
eit
skey
sar
e
 Updat
ingt
hisi
nter
nal
stat
einf
ormat
ionast
imegoesbyr
equi
rest
wo
ki
ndsofknowl
edget
obeencodedi
ntheagentpr
ogr
am.
A.Fi
rst
,weneedsomei
nfor
mat
ionabouthowt
hewor
ldev
olv
es
i
ndependent
lyoft
heagent
.
Exampl
e:anover
taki
ngcargener
all
ywi
l
lbecl
oserbehi
ndt
hani
t
wasa
momentago.
B.weneedsomei
nfor
mat
ionabouthowt
heagent
'
sownact
ions
af
fectt
hewor
ld.
Exampl
e:whent
heagentt
urnst
hest
eer
ingwheel
clockwi
se,
thecar
t
urnst
other
ight
,ort
hataf
terdr
ivi
ngf
orf
ivemi
nut
esnor
thboundon
t
hef
reeway
.
 Thi
sknowl
edgeabout"
howt
hewor
ldwor
ksi
scal
l
edamodel
oft
he
wor
ld.
 Anagentt
hatusessuchaMODELNTMODEL-
BASEDmodel
iscal
l
ed
amodel
-basedagent
.

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 16
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

Fi
gur
e1.9
ModelBasedRef
lexAgent

 Fi
gur
e1.
9gi
vest
hest
ruct
ureoft
hemodel
-basedr
efl
exagent
.
 Theagentpr
ogr
am i
sshowni
nFi
gur
e1.
10.

funct i
onMODEL- BASED- REFLEX-AGENT( percept)r
etur
nsanact
ion
static:stat
e,thedescripti
onofthecur rentworldst
ate
rules,asetofcondi t
ion—acti
onr ules
action,themostr ecentacti
on,i
nitial
lynone
state  UPDATE- STATE(stat
e, act
ion,per
cept)
rule  RULE- MATCH( stat
e,rules)
action RULE- ACTI ON[rul
e]
returnact i
on
Fi
gur
e1.
10ModelBasedRef
lexAgentPr
ogr
am
t
hef
unct
ionUPDATE-
STATE,
whi
chi
sresponsi
blef
orcr
eat
ingt
he
newi
nter
nal
stat
edescr
ipt
ion.
 Thedet
ail
sofhowmodel
sandst
atesar
erepr
esent
edv
arywi
del
y
dependi
ngont
het
ypeofenv
ironmentandt
hepar
ti
cul
art
echnol
ogy
usedi
ntheagentdesi
gn.
GOAL-BASEDAGENTS
 Knowi
ngsomet
hingaboutt
hecurr
entst
ateoft
heenv
ironmenti
snot
al
way
senought
odeci
dewhatt
odo.
 Exampl
e:atar
oadj
unct
ion,
t
het
axi
cant
urnl
eft
,tur
nri
ght
,orgost
rai
ghton.
MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 17
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

Thecor
rectdeci
siondependsonwher
ethet
axi
ist
ryi
ngt
ogett
o.
 Theagentpr
ogr
am cancombi
net
hiswi
tht
hemodel
-basedr
efl
ex
agentt
ochooseact
ionst
hatachi
evet
hegoal
.
 Fi
gur
e1.
11showst
hegoal
-basedagent
'
sst
ruct
ure.
 Somet
imesgoal
-basedact
ionsel
ect
ioni
sst
rai
ght
for
war
d.
Exampl
e:whengoalsat
isf
act
ionr
esul
tsi
mmedi
atel
yfr
om asi
ngl
e
act
ion.
 Somet
imesi
twi
l
lbemor
etr
icky
.
Exampl
e:whent
heagenthast
oconsi
derl
ongsequencesoft
wist
s
andt
urnsi
nor
dert
ofi
ndawayt
oachi
evet
hegoal
.
 Sear
chandpl
anni
ngar
ethesubf
iel
dsofAl
dev
otedt
ofi
ndi
ngact
ion
sequencest
hatachi
evet
heagent
'sgoal
s.
 Thedeci
sionmaki
ngoft
hiski
ndi
sfundament
all
ydi
ff
erentf
rom t
he
condi
ti
on-
act
ionr
ulesdescr
ibedear
li
er,
int
hati
tinv
olv
es
consi
der
ati
onoft
hef
utur
e—bot
h"Whatwi
l
lhappeni
fIdosuch-
and-
such?
"and"
Wil
lthatmakemehappy
?".
I
tisshowni
nfi
gur
e1.
11.

Fi
gure1.
11
GoalBasedAgent

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 18
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

UTI
LITY-
BASEDAGENTS

Fi
gur
e1.
13Ut
il
it
yBasedAgent

 Goal
sal
onear
enotenought
ogener
atehi
gh-
qual
i
tybehav
iori
n
mostenv
ironment
s.
Exampl
e:manyact
ionsequenceswi
l
lgett
het
axi
toi
tsdest
inat
ion
(
ther
ebyachi
evi
ngt
hegoal
)butsomear
equi
cker
,saf
er,mor
e
r
eli
abl
e,orcheapert
hanot
her
s.
 Goal
sjustpr
ovi
deacr
udebi
nar
ydi
sti
nct
ionbet
ween"
happy
"and
"
unhappy
"st
ates.
 Amor
egener
alper
for
mancemeasur
eshoul
dal
l
ow acompar
ison
ofdi
ff
erentwor
ld st
atesaccor
ding t
o exact
lyhow happyt
hey
woul
dmaket
heagent
.
 Anagent
'sut
il
it
yfunct
ioni
sessent
ial
l
yani
nter
nal
i
zat
ionoft
he
per
for
mancemeasur
e.
I
fthe i
nter
nalut
il
it
yfunct
ion and t
he ext
ernalper
for
mance
measur
ear
einagr
eement
,thenanagentt
hatchoosesact
ionst
o
maxi
mize i
ts ut
il
it
y wi
l
lbe r
ati
onalaccor
ding t
othe ext
ernal
per
for
mancemeasur
e.
MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 19
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

 i
ntwoki
ndsofcases,goal
sar
einadequat
ebutaut
il
it
y-based
agentcanst
il
lmaker
ati
onal
deci
sions.
i
. whent
her
ear
econf
li
cti
nggoal
s,onl chcanbe
ysomeofwhi
achi
eved(
forexampl
e,speedandsaf
ety
),t
heut
il
it
yfunct
ion
speci
fi
est
heappr
opr
iat
etr
adeof
f.
i
i
. whent
her
ear
esev
eralgoal
sthatt
heagentcanai
mfor
,
noneofwhi
chcanbeachi
evedwi
thcer
tai
nty
,ut
il
it
ypr
ovi
des
awayi
nwhi
cht
hel
i
kel
i
hoodofsuccesscanbewei
ghed
agai
nstt
hei
mpor
tanceoft
hegoal
s.
 ar
ati
onalut
il
it
y-basedagentchoosest
heact
iont
hatmaxi
mizes
t
heexpect
edut
il
it
yoft
heact
ionout
comei
.e,t
heut
il
it
ytheagent
ex
pect
stoder
ive,onav
erage,gi
vent
hepr
obabi
l
iti
es&ut
il
it
iesof
eachout
come.
 Theut
il
it
y-basedagentst
nichi
reappear
sinFi
gur
e1.
13.

LEARNI
NGAGENTS

 Al
ear
ningagentcanbedi
vi
dedi
ntof
ourconcept
ual
component
s,as
showni
nFi
gur
e1.
14.
 Themosti
mpor
tantdi
sti
nct
ioni
sbet
weent
hel
ear
ningel
ement
,
whi
chi
sre-
sponsi
blef
ormaki
ngi
mpr
ovement
s,
 t
heper
for
manceel
ement
,whi
chi
sresponsi
blef
orsel
ect
ingext
ernal
act
ions.
 Theper
for
manceel
ementi
swhatwehav
epr
evi
ousl
yconsi
der
edt
o
bet
heent
ir
eagent
.
MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 20
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

 i
ttakesi
nper
cept
sanddeci
desonact
ions.
 Thel
ear
ningel
ementusesf
eedbackf
rom t
hecr
it
iconhowt
heagent
i
sdoi
nganddet
ermi
neshowt
heper
for
manceel
ementshoul
dbe
modi
fi
edt
odobet
teri
nthef
utur
e.
 Thedesi
gnoft
hel
ear
ningel
ementdependsv
erymuchont
hedesi
gn
oft
heper
for
manceel
ement
.
 Whent
ryi
ngt
odesi
gnanagentt
hatl
ear
nsacer
tai
ncapabi
l
ity
,the
f
ir
stquest
ioni
snot"
Howam Igoi
ngt
ogeti
ttot
eam t
his?
"
 but"
Whatki
ndofper
for
manceel
ementwi
l
lmyagentneedt
odot
his
oncei
thasl
ear
nedhow?
"
 Gi
venanagentdesi
gn,
lear
ningmechani
smscanbeconst
ruct
edt
o
i
mpr
oveev
erypar
toft
heagent
.
 Thecr
it
ici
snecessar
ybecauset
heper
cept
sthemsel
vespr
ovi
deno
i
ndi
cat
ionoft
heagent
'ssuccess.
Exampel
:achesspr
ogr
am coul
drecei
veaper
cepti
ndi
cat
ingt
hati
t
hascheckmat
edi
tsopponent
,buti
tneedsaper
for
mancest
andar
d
t
oknowt
hatt
hisi
sagoodt
hing;
theper
cepti
tsel
fdoesnotsayso.I
t
i
simpor
tantt
hatt
heper
for
mance

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 21
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

Fi
gur
e1.
14Lear
ningAgent

Pr
obl
em-
sol
vi
ngagent
s

Fi
gur
e1.
15Si
mpl
ePr
obl
em Sol
vi
ngAgent
MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 22
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

Onholi
dayinRomani
a;curr
entl
yinArad.Fl
ightleavestomorrowf
rom
Buchar
est
Formul
ategoal: beinBucharest
Formul
ateprobl
em: st at
es: v ari
ousci ti
es
acti
ons: dr i
vebet weenciti
es
Fi
ndsolut
ion: sequenceofcit
ies,
e. g.
,Arad,Si
biu,
Fagar
as,
Buchar
est
Fi
gur
e1.
16Exampl
e:Romani
a

Pr
obl
em Ty
pes

1)Det
ermi
nist
ic,
ful
l
yobser
vabl
e si
ngl
e-st
atepr
obl
em
Agentknowsexact
lywhi
chst
atei
twi
l
lbei
n;sol
uti
oni
sa
sequence
2)Non-
obser
vabl
e sensor
lesspr
obl
em (
conf
ormantpr
obl
em)
Agentmayhav
enoi
deawher
eiti
s;sol
uti
oni
sasequence
3)Nondet
ermi
nist
icand/
orpar
ti
all
yobser
vabl
e cont
ingencypr
obl
em
per
cept
spr
ovi
denewi
nfor
mat
ionaboutcur
rentst
ate
of
teni
nter
leav
esear
ch,
execut
ion
4)Unknownst
atespace expl
orat
ionpr
obl
em
Exampl
e:v
acuum wor
ld
MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T, Si
BANGALORngLe-
E state,
s
2t
3arti
n
#5.Sol
uton?[
i Right
,
Suck]

Sensorl
ess,startin
{1,
2,
3,4,
5,6,
7,8}e.g.,
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

Singl
e-st
ate,
star
tin#5.
Sol
uti
on?

Sensor
less,
star
ti 1,
n{ 2,
3,
4,5,
6,
7,8}
e.g.
,Ri
ghtgoesto{2,
4,6,
8}Sol
ution?
[
Right
,Suck,
Lef
t,
Suck]
 Contingency
 Nondet er
mini
st i
c:Suckmaydi r
tyacleancar
pet
 Parti
all
yobservable:l
ocati
on,dir
tatcurr
entl
ocat
ion.
 Percept:[
L,Clean],
i.
e.,st
arti
n#5or#7
Sol
ution?[Ri
ght ,
ifdir
tthenSuck]

Fi
gur
e1.
17v
accum wor
ld
Si
ngl
e-st
atepr
obl
em f
ormul
ati
on
 Apr
obl
em i
sdef
inedbyf
ouri
tems:
1.i
nit
ial
stat
ee.
g.,
"atAr
ad"
2.act
ionsorsuccessorf
unct
ionS(
x)=setofact
ion–st
atepai
rs
e:S(
Exampl Arad)={
<Ar
ad Zer
ind,
Zer
ind>,
…}
3.goal
test
,canbe
expl
i
cit
,e.
g.x="
, atBuchar
est
"
i
mpl
i
cit
,e.
g.Checkmat
, e(x)
4.pat
hcost(
addi
ti
ve)
e.
g.,
sum ofdi
stances,
numberofact
ionsexecut
ed,
etc.
c(
x,a,
y)i
sthest
epcost
,assumedt
obe≥0
 Asol
uti
oni
sasequenceofact
ionsl
eadi
ngf
rom t
hei
nit
ial
stat
etoa
goal
stat
e.
MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 24
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

Sel
ect
ingast
atespace
 Real
wor
ldi
sabsur
dlycompl
ex.
  st
atespacemustbeabst
ract
edf
orpr
obl
em sol
vi
ng
 (
Abst
ract
)st
ate=setofr
eal
stat
es
 (
Abst
ract
)act
ion=compl
excombi
nat
ionofr
eal
act
ions
Exampl
e:"
Arad Zer
ind"r
epr
esent
sacompl
exsetofpossi
ble
r
out
es,
det
our
s,r
estst
ops,
etc.
 Forguar
ant
eedr
eal
i
zabi
l
ity
,anyr
eal
stat
e"i
nAr
ad“mustgett
osome
r
eal
stat
e"i
nZer
ind"
(
Abst
ract
)sol
uti
on=setofr
eal
pat
hst
hatar
esol
uti
onsi
nther
eal
wor
ld
 Eachabst
ractact
ionshoul
dbe"
easi
er"t
hant
heor
igi
nal
probl
em.

v
acuum wor
ldst
atespacegr
aph

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 25
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

Fi
gur
e1.
18v
accum wor
lsspace

 st
ates?i
ntegerdi
rtandr
obotl
ocat
ion
 act
ions?Lef
t,Ri
ght
,Suck
 goal
test
?nodi
rtatal
ll
ocat
ions
 pat
hcost
?1peract
ion
Exampl
e:The8-
puzzl
e

Fi
gur
e1.
19t
he8-
puzzl
e

 st
ates?l
ocat
ionsoft
il
es
 act
ions?mov
ebl
ankl
eft
,ri
ght
,up,
down
 goal
test
?=goal
stat
e(gi
ven)
 pat
hcost
?1permov
e

Exampl
e:r
obot
icassembl
y

Figure1.
20roboti
cassembly
st
ates?
:real
-val
uedcoor
dinat
esofrobotj
ointangl
espar
tsoft
heobj
ectt
o
MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 26
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

beassembl
ed.
act
ions?
:cont
inuousmot
ionsofr
obotj
oint
s
goal
test
?:compl
eteassembl
y
pat
hcost
?:t
imet
oexecut
e
Tr
eesear
chal
gor
it
hms
Basi
cidea:
off
li
ne,
simul
atedexpl
orat
ionofst
atespacebygener
ati
ng
successor
sofal
ready
-expl
oredst
ates(
a.k.
a.~expandi
ngst
ates)

I
mpl
ement
ati
on:gener
alt
reesear
ch

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 27
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

I
mpl
ement
ati
on:st
atesv
s.nodes

 Ast
atei
sa(
repr
esent
ati
onof
)aphy
sical
conf
igur
ati
on
 Anodei
sadat
ast
ruct
ureconst
it
uti
ngpar
tofasear
cht
ree
i
ncl
udesst
ate,
par
entnode,
act
ion, hcostg(
pat x),
dept
h
 TheExpandf
unct
ioncr
eat
esnewnodes,
fil
l
ingi
nthev
ari
ous
f
iel
dsandusi
ngt
heSuccessor
Fnoft
hepr
obl
em t
ocr
eat
ethe
cor
respondi
ngst
ates.

Fi
gur
e1.
218-puzzl
e

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 28
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

Sear
chst
rat
egi
es
 Asear
chst
rat
egyi
sdef
inedbypi
cki
ngt
heor
derofnodeexpansi
on
 St
rat
egi
esar
eev
aluat
edal
ongt
hef
oll
owi
ngdi
mensi
ons:
 compl
eteness:
doesi
tal
way
sfi
ndasol
uti
oni
foneexi
sts?
t
imecompl
exi
ty:
numberofnodesgener
ated
 spacecompl
exi
ty:
maxi
mum numberofnodesi
nmemor
y
 opt
imal
i
ty:
doesi
tal
way
sfi
ndal
east
-costsol
uti
on?
 Ti
meandspacecompl
exi
tyar
emeasur
edi
nter
msof
 b:
maxi
mum br
anchi
ngf
act
oroft
hesear
cht
ree
 d:
dept
hoft
hel
east
-costsol
uti
on
 m:
maxi
mum dept
hoft
hest
atespace(
maybe∞)
Uni
nfor
medsear
chst
rat
egi
es
Uni
nfor
medsear
chst
rat
egi
esuseonl
ythei
nfor
mat
ionav
ail
abl
eint
he
pr
obl
em def
ini
ti
on
 Br
eadt
h-f
ir
stsear
ch
 Uni
for
m-costsear
ch
 Dept
h-f
ir
stsear
ch
 Dept
h-l
i
mit
edsear
ch
I
ter
ati
vedeepeni
ngsear
ch
Br
eadt
h-f
ir
stsear
ch

Expandshal
l
owestunexpanded
node

I
mpl
ement
ati f
on:ri
ngei
saFI
FO

queue,
i.
e.,
newsuccessor
sgoat
end
MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 29
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

Expandshal
l
owestunexpanded A
node
B C
I
mpl
ement
ati f
on:r
ingei
saFI
FO

queue,
i.
e.,
newsuccessor
sgoat
D E F G

Expandshal
l
owestunexpandednode

I
mpl
ement
aton:f
i ri
ngei
saFI
FOqueue,
i.
e.,
newsuccessor
sgoatend

B C

D E F G

Expandshal
l
owestunexpandednode

I
mpl
ement
ati f
on:r
ingei
saFI
FOqueue,
i.
e.,
newsuccessor
sgoatend

B C

D E F G

Propert
iesofbr eadth-
fi
rstsear
ch
 Complet
e?Yes( ifbisfi
ni t
e)
2 3 d
me?1+b+b+b+…+b +b(
 Ti bd-
1)=O(bd+1)
 Space?O(bd+1)(keepsev er
ynodei nmemor y)
MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 30
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

 Opt
imal
?Yes(i
fcost=1perstep)
 Spacei
sthebi
ggerpr
obl
em (morethantime)
Uni
form-costsear
ch
Expandl
east
-costunexpandednode
I
mpl
ement
ati f
on:ri
nge=queueor
der
edbypat
hcost
Equi
val
entt
obr
eadt
h-f
ir
sti
fst
epcost
sal
lequal
Compl
ete?Yes,
ifst
epcost≥ε
Ti
me?#ofnodeswi
thg≤costofopt
imal
sol
uti O(
on, bceiling(C*/ε))wher
eC*i
s
t
hecostoft
heopt
imal
sol
uti
on
Space?#ofnodeswi
thg≤costofopt
imal
sol
uti O(
on, bceiling(C*/ε))
Dept
h-f
ir
stsear
ch
Expanddeepestunex
pandednode
I
mpl
ement
ati f
on:ri
nge=LI
FOqueue,
i.
e.,
putsuccessor
satf
ront

Expanddeepestunexpandednode
I
mpl ement
ati
on:fri
nge=LIFOqueue,
i.
e.,
putsuccessor
satf
ront

Expanddeepestunexpandednode
I
mpl ement
ati
on:f
ringe=LIFOqueue,
i.
e.,
putsuccessor
satf
r

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 31
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

Expanddeepestunexpandednode
I
mpl ement
ati
on:f
ringe=LIFOqueue,
i.
e.,
putsuccessor
satf
ront

Expanddeepestunexpandednode
I
mpl ement
ati
on:f
ringe=LIFOqueue,
i.
e.,
putsuccessor
satf
ront

Expanddeepestunexpandednode
I
mpl ement
ati
on:f
ringe=LIFOqueue,
i.
e.,
putsuccessor
satf
ront

Expanddeepestunexpandednode
I
mpl ement
ati
on:f
ringe=LIFOqueue,
i.
e.,
putsuccessor
satf
ront

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 32
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

Expanddeepestunexpandednode
I
mpl ement
ati
on:f
ringe=LIFOqueue,
i.
e.,
putsuccessor
satf
ront

Propert
iesofdept
h-fi
rstsearch
1.Compl
ete?No:
fai
l
sininfi
nit
e-dept
hspaces,spaceswi
thl
oops
2.Modi
fyt
oav
oidr
epeat
edst
atesal
ongpat
h
 compl
etei
nfi
nit
espaces
3.Ti bm)
me?O( :ter
ri
bl fm i
ei smuchl
ar hand
gert
buti
fsol
uti
onsar
edense,
maybemuchf
ast
ert
hanbr
eadt
h-f
ir
st
4.Space?O(
bm)
,i.
e.,
li
nearspace!
Dept
h-l
imi
tedsear
ch

=depth-f
ir
stsear
chwi
thdept
hli
mitl
,
i.
e., hl
nodesatdept hav
eno
successor
s

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 33
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

I
ter
ati
vedeepeni
ngsear
ch

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 34
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 35
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

I
ter
ati
vedeepeni
ngsear
ch

 Numberofnodesgener
atedi
nadept
h-l
i
mit
edsear
cht hdwi
odept th
br
anchi
ngf orb:
act
o NDLS=b0+b1+b2+…+bd-2+bd-1+bd
 Numberofnodesgener
atedi
nani
ter
ati
vedeepeni
ngsear
cht
odept
h
dwi
thbr
anchi
ngf orb:
act
b0+db^
1 2
 NIDS=(
d+1) +(
d-1)
b^ +…+3bd-2+2bd-1+1bd
 Forb=10,
d=5,
o NDLS=1+10+100+1,
000+10,
000+100,
000=111,
111
o NIDS=6+50+400+3,
000+20,
000+100,
000=123,
456
Pr
oper
ti
esofi
ter
ati
vedeepeni
ngsear
ch
 Compl
ete?Yes
me?(
 Ti b0+db1+(
d+1) d- b2+…+bd=O(
1) bd)
 Space?O(
bd)

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 36
ARTI
FICI
ALI
NTELLI
GENCE–06CS764 UNI
T1:
I
NTRODUCTI
ON

 Opt
imal
?Yes,
ifst
epcost=1.
Summar
yofal
gor
it
hms

Repeat
edst
ates

Gr
aphsear
ch

MRS.GAYATRIVKANADE,
ASST.PROF.
,CSEDEPT,
RNSI
T,BANGALORE 37

You might also like