C 188: Atiiil Intllign ing 009 Ltu : Quu-Bs 1//008 Jon DNo UC Bkly Mny slis om Dn Klin, tut Russll o Anw Moo Announmnts Pojt 0: Pyton Tutoil Post onlin now Du nxt Wnsy, Jn 8 T is l toy om 1m-3m in o 75 T l is otionl, ut t ssignmnt is not I you sumit, you won t gt n mil yt Pojt 1: Post tonigt Du in two wks: Wnsy, F 4 tt ly n sk ustions. It s long tn most! 1
Mo Announmnts tion tion stts Mony tion 104 om 5m - 6m will l in 9 Evns Tims n lotions will on t wsit sotly Oi ous My nw oi ous: Tus 3-4 n W 11-1 GI oi ous (o will ) on t wsit Toy Agnts tt Pln A Polms Uninom Mtos (viw o mny) Dt-Fist Bt-Fist Uniom-Cost Huisti Mtos (nw mtil) Gy
Fom Lst Tim: Rlx Agnts Rlx gnts: Coos tion s on unt t n mmoy Do not onsi utu onsuns o ti tions Cn lx gnt tionl? How goo ws ou gnt om lst lss? Rmin: t oo i it ws t; voi gosts Aginst nom gosts: won 31% o t tim On t oiginl Pmn m: 5% win t Aginst lx gosts on smll m: 3% win t Gol Bs Agnts Gol-s gnts: Pln Mk isions s on (yotsiz) onsuns o tions Must v mol o ow t wol volvs in sons to tions [mo: ln st/ ln otiml] 3
Polms A s olm onsists o: A stt s A susso untion N, 1.0 A stt stt n gol tst E, 1.0 A solution is sun o tions ( ln) wi tnsoms t stt stt to gol stt How Big is t tt? Polm: Et ll o t oo Pmn s ositions: 10 x 1 Foo ount: 30 Gost ositions: 1 x 1 Ditions: u, own, lt, igt, sto 4
Ts N, 1.0 E, 1.0 A s t: Tis is wt i t o lns n outoms tt stt t t oot no Ciln oson to sussos Nos ontin stts, oson to PLAN to tos stts Fo most olms, w n nv tully uil t wol t tt Gs Fo vy s olm, t s osoning g o t stt s T susso untion is snt y s G W n ly uil tis g in mmoy Lugly tiny s g o tiny s olm 5
Gnl T Dtil suoo is in t ook! T Initiliz t oot no o t s t wit t stt stt Wil t unxn l nos (ing): Coos l no (sttgy) I t no ontins gol stt: tun t osoning solution Els: xn t no n its iln to t t Imotnt is: Fing Exnsion ttgy: wi ing nos to xlo? Exml: T G 6
tts vs. Nos tt s gs v olm stts Rsnt n stt stt o t wol Hv sussos, n gol / non-gol, v multil ssos ts v s nos Rsnt ln (t) wi sults in t no s stt Hv olm stt n on nt, t lngt, t & ost T sm olm stt my in multil s t nos Polm tts Nos Pnt Dt 5 No Ation Dt 6 tt Gs vs Ts G E NODE in in t s t is n nti PATH in t olm g. W lmost lwys onstut ot on mn n w onstut s littl s ossil. G G 7
8 Rviw: Dt Fist G G G ttgy: xn st no ist Imlmnttion: Fing is LIFO stk Rviw: Bt Fist G G G Tis ttgy: xn sllowst no ist Imlmnttion: Fing is FIFO uu
Algoitm Potis Comlt? Gunt to in solution i on xists? Otiml? Gunt to in t lst ost t? Tim omlxity? omlxity? Vils: n Num o stts in t olm T vg ning to B (t vg num o sussos) C* Cost o lst ost solution s m Dt o t sllowst solution Mx t o t s t DF Algoitm Comlt Otiml Tim DF Dt Fist N N N N O(B Ininit LMAX ) O(LMAX) Ininit TART GOAL Ininit ts mk DF inomlt How n w ix tis? 9
DF Wit yl king, DF is omlt. 1 no nos nos m tis m nos Algoitm Comlt Otiml Tim DF w/ Pt Cking Y N O( m+1 ) O(m) Wn is DF otiml? BF Algoitm Comlt Otiml Tim DF BF w/ Pt Cking Y N O( m+1 ) O(m) Y N* O( s+1 ) O( s ) s tis 1 no nos nos s nos m nos Wn is BF otiml? 10
Ittiv Dning Ittiv ning uss DF s suoutin: 1. Do DF wi only ss o ts o lngt 1 o lss.. I 1 il, o DF wi only ss ts o lngt o lss. 3. I il, o DF wi only ss ts o lngt 3 o lss..n so on. Algoitm Comlt Otiml Tim DF BF ID w/ Pt Cking Y N O( m+1 ) O(m) Y N* O( s+1 ) O( s ) Y N* O( s+1 ) O(s) Costs on Ations TART 3 1 1 3 8 9 8 4 4 15 GOAL 1 Noti tt BF ins t sotst t in tms o num o tnsitions. It os not in t lst-ost t. W will uikly ov n lgoitm wi os in t lst-ost t. 11
Uniom Cost Exn st no ist: Fing is ioity uu Cost ontous 4 6 11 3 9 1 13 5 7 8 11 G 10 1 17 11 3 0 G 1 15 8 9 8 1 16 G 1 Pioity Quu Rs A ioity uu is t stutu in wi you n inst n tiv (ky, vlu) is wit t ollowing otions:.us(ky, vlu).o() insts (ky, vlu) into t uu. tuns t ky wit t lowst vlu, n movs it om t uu. You n s ky s ioity y using it gin Unlik gul uu, instions n t onstnt tim, usully O(log n) W ll n ioity uus o ost-snsitiv s mtos 1
Uniom Cost Algoitm Comlt Otiml Tim DF BF UC w/ Pt Cking Y N O( m+1 ) O(m) Y N O( s+1 ) O( s ) Y* Y O( C*/ ) O( C*/ ) C*/ tis You n mo out uniom ost s s ilu in t ook, o y sking us 5 Minut Bk A Dn Gillik oiginl 13
Uniom Cost Issus Rmm: xlos insing ost ontous T goo: UC is omlt n otiml! 1 3 T : Exlos otions in vy ition No inomtion out gol lotion tt Gol [mo: us ontous ] Huistis Any stimt o ow los stt is to gol Dsign o tiul s olm Exmls: Mnttn istn, Eulin istn 10 5 11. 14
Bst Fist / Gy ttgy: xn t losst no to t gol G =8 =0 1 8 =5 =4 5 =11 3 =8 9 1 9 =4 1 4 =6 5 =1 15 4 3 =11 =9 =6 [mo: gy] Bst Fist / Gy A ommon s: Bst-ist tks you stigt to t (wong) gol Wost-s: lik lygui DF in t wost s Cn xlo vyting Cn gt stuk in loos i no yl king Lik DF in omltnss (init stts w/ yl king) 15
Gon Wong? Ext Wok? Filu to tt t stts n us xonntilly mo wok (wy?) 16
G In BF, o xml, w souln t ot xning t il nos (wy?) G G G Vy siml ix: nv xn stt ty twi Cn tis wk omltnss? Wy o wy not? How out otimlity? Wy o wy not? 17
om Hints G s is lmost lwys tt tn t s (wn not?) Imlmnt you los list s it o st! Nos ontully ts, ut tt to snt wit stt, ost, lst tion, n n to t nt no 18