0% found this document useful (0 votes)
23 views

Unit 1

Ai unit 1

Uploaded by

R Rahul
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
23 views

Unit 1

Ai unit 1

Uploaded by

R Rahul
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 25
*Seorching Strategeet I= q *) Backiword chotng oo te dente shoulel be made » Work backer looking for Sustsfteatton for the deetton. [ada i-—_, P charackertytfes OF Problem :- Chavackerurtcs Tt > i the prblm decomposable int a See oF Smaller Subproblems 7 > Can sl” sees be tgnoved OY Undone i they do nd- move proach A M19 > D the prbim Unrvese predictable PDS the dugad soi Poth or stake # exhaustive Search'- (ynsfoem , Bl&rol Search) +~ ee The Unfform — Starch doetnot Cantata aay coma Ieroudledye Such 04 laseney , thy lecadlon of the goal, > FE cpeaks ty 0 brute sfce lay fey tt tacuc, Soh abt how to travese the sree (no odetionl eds) DT Charming — each 4 ev node until % swachep goal nsde. 9) Breadth fat scorch + (g¢s) SH) te mut Common Seorch — Strdlgy for Laaversing a dee ov graph. > Te do searches breadth worse fm a free oF geoph, 50 7 called breadth fst Search. Spreadth fick Search starts Searching from the vot hook of the {ree & expand all GucceHoY node at the Current level before moving {fo hoe Of hot — level. 7 BES % an ekompk of geneval graph Seorch aljoxithm 7 BEs emplem ented wig FIFO Queue — data. Shructure. Ades > Bes will provide a Som 9% any engt STF thee Ge mre than one Iwo ar level | - — Ib — Iw 3 orda (A784 0-704 62F,5 451) & find {hy vouFe trom S46, T depth fiat Seoth toss) :— ST 4a tecursie algo Ay Hovering a tree oF graph. Tt & Called Dfs bee tf Slorts from the wot 4 follows cack path to tks quake depth node before moving to te net. DDFs Wes a stack data structure for fs plementation. Advy- Soe smut, vou lex memosy al ?e Only Med} > shre a stack OF nedd on {ie path fiom wot nocle & (uyrent ave OTE tate teh time fo reach t the goat necle Can Aft plgedvi- > Thos % the Posrbil?ty that —mrony sledet feeep on & i p D “. rauring £ thos % np Guarantee of fend Zag {te aC > High chance of tnPintte loops % graph ty lovge (olepth), or — lego oa > lds pat actos) L A) 6 — lwo 0) Vie Alp —> lw TE terminate hen Gt gob node veache, # BEs vs dfs > A groph traversal algo “that = fn algo that Starks with the Stards braversting the gaph fom inetal node of the graph € the Yoot- hode ¢ explores all then Jou deeper & deeper the neighboring nodes, Until the dweuteed nocle &% found or there & no further chrlel. > Breadth £5 2 DEM £5 > Vs Guue 2? Wu Stack 7 Consume mos — memo sy ? Cnsume (ey hemody focuses on vBrag the D> focur ey on ViPling the Ver Beg Olde Onvated vertra figt ng. the eye the Lty lel 0 4 me eo fH O rrwat (wd ] Ore > Jeet oe [evel veachu €, Depth fist ‘Neraltre dleeperfy Search > T % a combhratlon of Bhs 4 DFS. > TE will fil Goal node at aay Way > Both Adv of Be & DFS wu acheuedl. > Tt find goal node > Tt Consume lew memory. aa: > wi Find goal node > Tt Conume fen memo sy Dl s- BE fw modu am vVietledl again & again @ <— lwd 0 8 2 lh yp tek Goo node © 0 wt € 6 by = lovete t OO < lols How the procew & clone [wel by (evel. at levd o a bepth | oterattwe r th Seach A oe UE oe a A oa J lose 4 i. ——— > \poceao@ a ‘ > oe Gea! node fatinel, O¢ eerste ak level2 i— — Y, Xi (aie Hence no further Search 2D ABECL Got # Bidkrectonal Seach : TE Yung two Slmultaneoul Seorchey they are One fom the tettal node called a forwarcl Search ¢ other from goal node Called backotord search, > The search Stops When there -4v00 graphs or Searcher erterseet each Other Ai Thu fot > Lt requtra ley memosy Bi- > Dinplementaton % — obetreall > One shoull know Goo state i advence aqrttal node. fora soorch ey . af 53638 backwd Search, HBSS (Breadth fest Seorch) > Uniabormnedl Search Teehntoyy Fito (quetie) of OP tinal of > Shallowat Node Time Got — > Complete a Adv. hem mah toy il - 0-6 Aud = i j flfo 7a Bee E +(getl< i Level Storch Techntque aan K ZEGHL Lm FGHTTK | Xun # Deth fist_such (Of) Urine Soh Tet stant > Stack Lifo) — [> Non- opdinal : > Deeput node > 7, , “4, Tine. Complex ty Complete o( vté) QL we, oC) bo AD y b = banc fa cl reaener ‘ye oe, hows ray no. of. cle Ax an clam H BidleecdZonal Stevchh ONO + eatenston of Bs 4 DES [SPI Kind of techy, 5 Teo Sultaneous Search from an fattial node -to goal and backward fiom Joal -to fatal, flopping When WO meet. : z = Time. Complentty I Lh) (R\, G ( 4 Goal — lomplete breadth fect Search (stort) VY) , > Not in ckpth fest search 3 + Tne lomplerty & suduced Compand to Bes & dfs. # 8- Puggle Problem Without Heurtrtte Search +- Ce > Blind Search (uninformed ) Te] 3 feu > Bs ete u ls 6 > o(b4) lals[#] [ele Ss : Gq 74 move Cup, down, leet, NS 0 (3%) R v b + Ttle fa 2/2 tek & U4 lé LA ls Te lons to 19 ole 7 x x SBE —| > Uda eyes bey /¢ 7 (Wed) eq =b.6] =) \ 4 x A ‘ i i oe [Rds 3 “ fm H What 4 Heurtitte & ar [why coe Ue Heurttte [| Hovd 4 Glee # Heurestic & at (Rule of dumb) [whot, why, How] PPE dechotque eitgneol fo solve .o- problem dfckly. 8 Pusile Ispugse AY Poaze to 1 : B a L ob) to to { NP— p i io Te > Recltrce ia, 2 Bo > €ucldedln Didonce, =< 3 bel ane) NO y ape = Ope mal (X) é ¥ Mashable Ditonte, . FROOF Me Placed tile F : laced [ 3 fx aRE ell [Mls 16 a + afe[ | . . 4 Ot] el 424042 th +0, H 9 Pur%le Problem lwith Heurdstte , CIndornel Seorch) : Earl Upet3 F heuskHe values Ate 3 a Tet; = x18 +8 ot > no of meplaad fete ie 3 8 els [2 [ie 4 Lu Ce xtels le} yh Tels J \ he Heurtite Search :~ Dyfed) q STE wed omar Kndtaledge , the prelim fafomadlon & avatet Which can gutde the Search. > Trormd search Sbraleyy Fey Con Contctent than an cintnformed Trformedl Search 4 alo calteol teurtstfe Search. a way whech mofght -nol aloaayy, be quarented. finol a 501% mode 3A heute & for the bet 0)" Seosonable time, solve much Complex prblms whtch Guld nok be 3Tt Ct Savecl % another Woy. LD) General - Purpose Hearertte t= > Ths used to sesolve the prbln Uhen thee Oe may noolel » time 4 Ploclng Shorter path corlt be dttfeculb. ID Hee we we the nearut netghbour dyo that by SUectag rearyt one 7 sped, the Search protey to find the 0/4, one © good! i © Wot sure good or bad | 3) Branch and bound Search | ontforen lost Search t- > oniform Cost Seovch Con be tueol 7 the Git of éeavel lg from one node to anotha % avotlable. > unflorm lost Seorch —aloays — Pond! the. lowat Cat noele to another & available. > fist Sol” % guasontecd to be Cheopyt One becowe a hapa ow & expanctal —cariter and so would be found frat. Adi TL Y optimal becawe at every State the path ons (ow Cos % Chosen. byi- PE doem'e Cae hate =the no. of = Sters. > fpttal a 2 L (a lo ® © B 4 L Oo, oat node ee po i Ucs Selec A2BFE =ll AQD2 €= lote=h a 7 aa / # AF algo: - 3 A® georch ayo finds the Seorch Space UWthg the heurtitle shortuk Path through the functor « TLE provides optimal Soludten foster D Film) = gla) + hin) J v Cost to vecech Cheepert ae fom node n to goal node Or n fom Stare state Step-1 t- place the starting node é open lu, Sep-vi- check 1 the op Ite comply ov nok Th she (aE Y empty then gafum faclure & Stop, Lie noole from tue Open lat whtch hey aes select evaluation functton (eh), 2 the Small value of node n % goal necle then sutom succed £ stop olw. Steps expand node n & generede all Hs SuCeMor & Put n fato cloteh let. SEBOS i= TE node & qlready %m Open lut & close lyk then # 0 wn ft should Le attached! to back potter ota), stepodim sep ead From step 2 AbLS- > TED bat algo then other Tra o (el) > Optimal 4 Complese — way > Tt Gan solve Complen — rb ws. FTE donot always prgcluce shortat pouh. PTE YU mot practical By Vartous — lorge prbins, else 8 et or) es heurtite valle I 7. |e & a |é Ie = aan Cc ( Gool 2 . 2 eC ravelltag Cost fe) = gla) + hn) Ly table value eon e TS ee: POW LS B5OE Y Shorty from S2R3C7ID from 53 2 fly a 146 => PTO = (urets) tot, from ¢-) B esc > fo) - Utr= 6 Wow SIB & shy tat fom SOROC 2 Fay = lest =? v) Bat fest Search i~ 3 TL Y Gmbinaltor of DFS & BFs > At each step, Using 4n approach hearglte furCtton, The most promting node % selected. Staré node a= 2 Goal node We We Concept of Open & Clore lak y eae pat at teed £ SEPLE AS -6 yeast now cael (Al, ie closed Iyt > 6 opn lut A & 5 3 Clored tut 3 A Open Lut > Ben stf3% As 3 Y least how — exprnol Closed (§t 3 Ad CAI oor _ open [Ub bCEeE i Spey: WOW UY least how enPond TI. cied 4 3 4 dB 4 o ©, Opn Ite =) Gcek f @ © © * + 38 Ste-or- now CEG ha © lee wh Gnutolen Close luk 3 ABCD Open ltt > Guet Cloed t+ 3 Agcn H Open at BD EL Yeeese cf A%e7 HG, (oe douncl goal noodle Note Opn (Ut o- tahtch Can be further Svicted! Closed (ybi- Which Cannoe be further dtvioleol Hen ce + D) fl climbing 2— TE &% a type oF Generate § tut Algo :- genote & dat stodgy, > Stat ra > Yenevate a pasfble sol” % D> Tut % i & a goal Jo n TF not goal goto nent Stork D> else gure > ep Algo: > Lntifate Curent Stee = Start state Stale % the gool state then > TR the start yetom & gut, > Select © apply a new operator /action [rule to Jererate new state. > evahucttor of new state oe (i clan Joal slate) then gupt 7 TE batten than Curvert State than current Slate reser ry become new Currant stode S37 TF not better move t Step -3, + prbln with hell Clemberg « %) Load moxfmnum :- TE & a State better hon rely sh bu not better thon Other slate for Quscy we) gar 4 Gol j Hon tt thtaly that fs goo! state but not A/\ actually | Solns- Backtrack & follow other pathy i) plakeau s- Pe 8 a Alot cua Where all the neighbouring Stabe have the same vale whee we Connot Posirble detewtoe the bet state. poet SPI moke a big Sump to some divecttona- try to get. new Sectton Of the search Space. mf) Ridges DE % a Spl kta of local mantmur, LL Slope very gently dour the goal. po in 2 ir r Solutfon | mov fy several dl recttony at once Ly opplvay uso ox mo%e Operatfont. moving Lack > S73 ADB = (lp)t2 =r DS 2AXC SD (Hs) tle F =) SHAD 2) (Hey E0 =b reached, S~APcr2pD=l S94 B30 =f, SIARMD= LR S?A3B3p Wh be the optimal path. # Beratie_Deepeotg A* (ao 4) > Tt Performs depu, first search with Ifmpted to Sone £- bound, > Use #0) ~ 90a) + hin) SHP-Ut- fst Set the thruhotel the (cost Value £ln) Wher — for) = tn) + htny SEP-2 §- wow by checking ff the thrahold & the cheld then cxpard ele check for nent feat Cn). SHP=3'- Continue Gt Und#l Jou reach goo! rode, Step 2 All Resecked or stopped value added fato P value Hib, fou <> finds an Optimal Sel” (Shorter no of step) > Loy Storage Space. ‘ ols $ — @st £ Computation tHme mos ht) A ee c © € £ ae Pprly fn) = 9lny +hln) @ B updated diagram $ - eh 3 143 oH R 6 © © Ge © @ 6 7 Bx" — os { oe leat valle =3 +44 hente thvehotd =3 Expand 4 : Start at A ara y uy now Ba toh ds nent feat we thretheld= 46 Start at gauche y Expord 6 +t@ Nene feask threthold = 9. + Slot ok Ay gagy 6 80> a eyy bur no furtay refum back now ¢5 aebv Henle we socked fhal goal node. t Constram — Sattsfactéon ¢- q based technPene >The 3 heurtste > Ths & ment fo Sve @ problem Which ha to be Salve by Salisfying Some — Constra habs (con dtfons) Few popular problem Send ) Cypbarthmelte ( rmorw ) money #) 1 Queen m2) cvs Word — (Fn news paper ) ») Mop Gloting ROB Cnot matching olor) v) lala Saare (mint sudoku) Ox) vi) Sudoku Cava) 3 key words varfable - our Selected seé which we place domain - whae fo place that Space /plaw , Gnstrot, — — Condetton 2) map Coloring RGB t- —_— Rule :- no same clors adfaaut Fill RGB (dfagonal allowed) q 72 XS 4) MN Ween +- & Qan EEEE a oe come Tip ty ayarn Ge sant 0101 agonr’’ nok OT aes * Ween a Yow, Column, dtagoml not obiwed « #) Cryptaytthmedic_Prblm :- Senp yule d + more = Assign each [etter a value fom 0779 MONEY STF guen Azd thn & all HE eat >t should exactly solve > No Sapeaded value Ayq=3 Xx ArG23 Xx update step by hep to 0 UE Be J{G [8.)S) of 6 3 = = 4 Grame Playing <- ne an tmportané domaty of AL. => Game playtag 4 > Gamer — donot we ned fo provide Of Winning or ostag © daw > malt? player Jame 3 50 goth playess ‘by tr Wh the game. 350 both of then dy fo make the but move Poss?hle gaquive mach kaotoleje the Only Itnovoledge 4 the rales , légal mov & Gneltiong at each time [tums Storching -techwrwe- ike Bes (may rot be Effretect) 2 > | >The mart dommon Searching dechntgue axel Y Min may Seng) Status at ay movemerdt win “tas draw + Minmax procedure i- max = 4 00 7M? = > Minmax algo g a secursfve oY & wel & deezton back backig qo. wht, making € Jame theory — TE prvi an Optimal move fr the Playey ating dd OPponent ¢s Playing Optimally, Minoox algy 2 mostly tee for fame Phyng Ar, En;- = hey, te tack ~to, Vaviout favo player, game , Hee one player % called May & Other player % called aly 7 Both Compete ¢ ty bh why 9 Hee MIN Setects mi taimtZecl Valle € MAK Selechs Maraatae Value. (ma. x) 2 Y (mir) mag (-1,4) =4 pmax (2,6) 26 step-L t- rite 4" Shep-b i- min 4 NASD: S © Crema 4 ie eG See StepBt- Mf gai max Perfect @rdex to wt 639bB>rPOT, seally Complex dk - > TE Game fre % large te Wil be > (ke we che > ere gach node & checked. # Alpha Beta Paving }— Advanced version oF Minmax 7 Diradvantage of Mermax axe geemoviea! Hoe d= mae to, Bemin=-© Fe >P neglet Some pore Of — MOnerare Protedure . may Min may Min AAAKA te ch gang gerhunth?lo 7, cc 2$t \se change

You might also like