C 88: Atiicil Intllignc Fll 009 Lctu : A* ch 9//009 Pit Al UC Bkly Mny slids om Dn Klin Announcmnts Assignmnts: Pojct 0 (Python tutoil): du Thusdy /8 Wittn (ch): du Thusdy /8 Pojct (ch): to lsd tody, du Thusdy /4 You don t nd to sumit nsws to P discussion ustions sli dys o ojcts; u to two ddlin Ty i ogmming, not divid-nd-conu tudy mtils lids, ction mtils, Assignmnts Book Oic hous, ction Do-in l tims: Wd /6 4-m in 7 od Oic hous ostd on th cous wsit ctions stting this wk: Woking though xciss ky o you undstnding ction hndout contins svl xciss simil to wittn olutions will ostd Wd m (t lst sction) ction 0: Tu -4m ction 04: Tu 4-m ction 0: Wd -noon ction 0: Wd noon-m Tody Ittiv dning Uniom cost sch A* ch Huistic Dsign Rc: ch ch olm: tts (conigutions o th wold) uccsso unction: unction om stts to lists o (stt, ction, cost) tils; dwn s gh tt stt nd gol tst ch t: Nods: snt lns o ching stts Plns hv costs (sum o ction costs) nd Algoithm Comlt Otiml Tim c m tis w/ Pth Chcking Y N O( m ) O(m) Y N* O( s+ ) O( s+ ) s tis nod nods nods s nods ch Algoithm: ystmticlly uilds sch t Chooss n oding o th ing (unxlod nods) m nods
Ittiv Dning Ittiv dning uss s suoutin:. Do which only schs o ths o lngth o lss.. I ild, do which only schs ths o lngth o lss.. I ild, do which only schs ths o lngth o lss..nd so on. Algoithm Comlt Otiml Tim c ID w/ Pth Chcking Y N O( m ) O(m) Y N* O( s+ ) O( s+ ) Y N* O( s ) O(s) TART Costs on Actions d 8 OAL Notic tht inds th shotst th in tms o num o tnsitions. It dos not ind th lst-cost th. W will uickly cov n lgoithm which dos ind th lst-cost th. c 9 8 h 4 4 Uniom Cost ch Pioity Quu Rsh Exnd chst nod ist: Fing is ioity uu Cost contous d 4 c 6 9 h 7 c 0 8 c 8 d 9 h 8 h 7 0 c 6 A ioity uu is dt stuctu in which you cn inst nd tiv (ky, vlu) is with th ollowing otions:.ush(ky, vlu).o() insts (ky, vlu) into th uu. tuns th ky with th lowst vlu, nd movs it om th uu. You cn dcs ky s ioity y ushing it gin Unlik gul uu, instions n t constnt tim, usully O(log n) W nd ioity uus o cost-snsitiv sch mthods Uniom Cost ch Uniom Cost Issus Algoithm Comlt Otiml Tim c UC w/ Pth Chcking Y N O( m ) O(m) Y N O( s+ ) O( s+ ) Y* Y O( (C*/ε)+ ) O( (C*/ε)+ ) Rmm: xlos incsing cost contous Th good: UC is comlt nd otiml! c c c C*/ε tis * UC cn il i ctions cn gt itily ch Th d: Exlos otions in vy diction No inomtion out gol loction tt ol
ch Huistics Huistics Any stimt o how clos stt is to gol Dsignd o ticul sch olm Exmls: Mnhttn distnc, Euclidn distnc 0. Bst Fist / dy ch Bst Fist / dy ch Exnd th nod tht sms closst Wht cn go wong? A common cs: Bst-ist tks you stight to th (wong) gol Wost-cs: lik dlyguidd in th wost cs Cn xlo vything Cn gt stuck in loos i no cycl chcking Lik in comltnss (init stts w/ cycl chcking) Comining UC nd dy Uniom-cost ods y th cost, o ckwd cost g(n) Bst-ist ods y gol oximity, o owd cost h(n) d h=6 h= h= c h=7 h=6 A* ch ods y th sum: (n) = g(n) + h(n) h= h=0 Whn should A* tmint? hould w sto whn w nuu gol? A h = h = B h = No: only sto whn w duu gol h = 0 Exml: Tg ng
Is A* Otiml? Admissil Huistics A h = 6 A huistic h is dmissil (otimistic) i: h = 7 h = 0 wh is th tu cost to nst gol Wht wnt wong? Actul d gol cost < stimtd good gol cost W nd stimts to lss thn ctul costs! Exml: Coming u with dmissil huistics is most o wht s involvd in using A* in ctic. Otimlity o A*: Blocking Otimlity o A*: Blocking Nottion: g(n) = cost to nod n h(n) = stimtd cost om n to th nst gol (huistic) (n) = g(n) + h(n) = stimtd totl cost vi n *: lowst cost gol nod : noth gol nod Poo: Wht could go wong? W d hv to hv to o suotiml gol o th ing o * This cn t hn: Imgin suotiml gol is on th uu om nod n which is suth o * must lso on th ing (why?) n will od o Potis o A* UC vs A* Contous Uniom-Cost A* Uniom-cost xndd in ll dictions tt ol A* xnds minly towd th gol, ut dos hdg its ts to nsu otimlity tt ol [dmo: countous UC / A*] 4
Cting Admissil Huistics Tivil Huistics, Dominnc Most o th wok in solving hd sch olms otimlly is in coming u with dmissil huistics Dominnc: h h c i Otn, dmissil huistics solutions to lxd olms, wh nw ctions vill Huistics om smi-lttic: Mx o dmissil huistics is dmissil Indmissil huistics otn usul too (why?) Tivil huistics Bottom o lttic is th zo huistic (wht dos this giv us?) To o lttic is th xct huistic Oth A* Alictions Pthing / outing olms Rsouc lnning olms Root motion lnning Lngug nlysis Mchin tnsltion ch cognition T ch: Ext Wok! Filu to dtct td stts cn cus xonntilly mo wok. Why? h ch In, o xml, w shouldn t oth xnding th cicld nods (why?) d c h h ch Id: nv xnd stt twic How to imlmnt: T sch + list o xndd stts (closd list) Exnd th sch t nod-y-nod, ut Bo xnding nod, chck to mk su its stt is nw Python tick: sto th closd list s st, not list h Cn gh sch wck comltnss? Why/why not? c c How out otimlity?
Otimlity o A* h ch Poo: Nw ossil olm: nods on th to * tht would hv n in uu n t, cus som wos n o th sm stt s som n ws duud nd xndd ist (disst!) Tk th highst such n in t Lt th ncsto which ws on th uu whn n ws xndd Assum () < (n) (n) < (n ) cus n is suotiml would hv n xndd o n o n would hv n xndd o n, too Contdiction! Consistncy Wit, how do w know nts hv tt -vlus thn thi succssos? Couldn t w o som nod n, nd ind its child n to hv low vlu? YE: h = 0 h = 8 B g = 0 Wht cn w ui to vnt ths invsions? Consistncy: A h = 0 Rl cost must lwys xcd duction in huistic Otimlity T sch: A* otiml i huistic is dmissil (nd nonngtiv) UC is scil cs (h = 0) h sch: A* otiml i huistic is consistnt UC otiml (h = 0 is consistnt) Consistncy imlis dmissiility ummy: A* A* uss oth ckwd costs nd (stimts o) owd costs A* is otiml with dmissil huistics Huistic dsign is ky: otn us lxd olms In gnl, ntul dmissil huistics tnd to consistnt 6