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

Aiml Module 1

Artificial Intelligence and Machine Learning

Uploaded by

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

Aiml Module 1

Artificial Intelligence and Machine Learning

Uploaded by

Lakshmi Lakshmi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 15
Definition: Artificial Intelligence is the study of how to make computers do things, which, at the moment, people do better. According to the father of Artificial Intelligence, John McCarthy, it is “The science and engineering of making intelligent machines, especially intelligent computer programs”. © scanned with OKEN Scanner Branches of Al: {isto ances of A pve low Howenr sme branches ying eats a ‘nc Wt them ye Some os maybe ep os ones pe i an ‘ance Logical A1— tn gnc he cs fhe pie taste which ita at ans palate tl wesoued by srses of waatel lied ngs: The pram deco Search — Arif nlgece prin fin ceamine ge suber of poetics ~ for cle menace ne nce a we Ping ra, Dh Patten Recognition — When appr aks beatin so kin i fe pln ‘occur wat secs wt pate Fee xan, avs ph mat UO ah pate ‘yer and a ut eome ore Gal foe, Mev comes pore av ie ata {tnpnge te,» chs poston ohh Matyas event The mie cos patent eu ent mts th he pe ptr that an bon lh Representation — Usaly pugs of mattis fg te we test thefts abt Inference — Ores can te nr fom some fate Mathai Ink satin 6 ‘lion fr ae pup, bt ew med auton rece hve Best al 19 {heap sce he 19% Th spt Lind fremont son stank rng ‘nic concasin oe ined y dt he eneishn ean he witha he Sone det Fer, hn aon th can anclson may have foe widen th cnsiacs fhe novstonn har the ‘cing Neal lpi fenoning toon ato encase be ve frac of promises te monte hceasing Teton eh pomiesCensespon smth menenoine eanoie. Camon ene koe and Ressoning — This is these ia which As fares am the una even pia he at tha has boc a ae eset tea sce he 19808 We thee hn bee cemsierbl peepee in dvckpig snl mtn rewonig Leorning frm experens — Thre re ane res eesti i lean Progra "inom ium wha eso” beuo hi foram ean eyes runt ig Syste ae los ll tse ery led beso eps na Panning — ning str wih evel fc abot he worl (spilt ab he st ‘taconite aa th ania stuacon an scent of goa From hse, peng roztams gore» sat) frst el Inthe sean nese Sate Epitemalogy — This ica wady of he kinds of knoe that ae rei fo sing bts ia the word Ontology — Onno the study ofthe Kind of things ta xin AL the potas and Senne: del with vou Kinds objss anne sty wha hse Kind re ad Wt ie as proper a ally astumed importance ro he 19908 © scanned with OKEN Scanner Task Domains of Al Mundane Tasks: Formal Tasks Perception Games : chess, checkers etc Vision Mathematics: Geometry, logic, Proving Speech properties of programs Natural Languages Expert Tasks: Understanding i Engineering (-Design, Fault finding, Generation | Manufacturing planning) Translation Scientific Analysis Common sense reasoning Robot Control Medical Diagnosis Financial Analysis © scanned with OKEN Scanner Applications of Al AL has applications in all fields of human study, such as finance and economics, environmental engineering, chemistry, computer science, and so on. Some of the applications of Al are listed below: © Perception = Machine vision @ Speech understanding = Touch ( tactile or haptic) sensation * Robotics © Natural Language Processing a Natural Language Understanding Speech Understanding m Language Generation = Machine Translation Planning Expert Systems Machine Learning ‘Theorem Proving Symbolic Mathematics Game Playing © scanned with OKEN Scanner 234 State Space Search ‘Nae space eres ble inems.saes and pers th cha sts, ‘Rete ue const 1 A revesetion ofthe snes th system canbe in. Fr example oar gamete oud yes cue ue of he ah ‘+ Asetsfoperarars ht an chang este aote sto bord ‘Bane theyre ae th el eves oman vn sate OMe he {pen repeals Poza can aterep Se reyes he nw sate Aninol sae 1 Asctr/nat stares some o hse maybe dstable, tes dsb ‘Tisset len epeseedinpicly by a rogram 2.2 The Water dug Peabo Ins pobien, we e1wo ascii four thee our de a manu of feu gallos amass of he plo war How cn att galls eaten ‘These space ia st of stnge sits ning the umber gallons warn th pio Lis tants eeu, thee whee foe =A 1,2, Toedand hee 0.30} ‘he start stati (0,0) sh ale 2.) whee m yb ny ba imi thee alg eam 049 3 ss wae oem. Tec and ta shuns hs mes mane ue haste wan jogs sing tao pba Thea rection sf sling ts problem as shown bw teenie, tree oer <4 (Steer fom ap 2 ten ets} {Gur 3) wee oma 4 tine eo ow >0 {Crdece copy our ne dain tia ce > 0 {tar vey es ne ain 5a te i+ ect (tur tree Dems eo 6 tn te i + esd (Gor +t) mayen ec 200,010 tee >0 {tres ey cinta ou tie itr {0\an ey ort tee Sai €2.d)empy tee far Go {0.2.empy tain Tae ce itor 4 {tec rit ur in 12 (ie, fou irtee <3 ‘vee es ur ana seat henbekow hurts ne (i 22 Proucon Bef the Gaon in Four Jue (e238 One Slaton wth Water Proton) © scanned with OKEN Scanner 2.4 PRODU ron ‘TEMS Production systems provide appropriate structures for performing and descr processes. A production system has four basic components as enumerated below. ng search ‘* A set of rules each consisting of a left side that determines the applicability of the rule and a right side that describes the operation to be performed if the rule is applied, ‘© A database of current facts established during the process of inferen + A control strategy that specifies the order in which the rules will be compared facts in the database and also specifies how o resolve conflicts in selection I rules or seleetion of more facts module, ‘The production rules operate on the knowledge database, Each rule has a precondition—that is, cither satisfied or not by the knowledge database, If the precondition is satisfied, the rule can be applied. Application of the rule changes the knowledge database, ‘The control system chooses hich applicable rule should be applied and ceases computation when a termination condition on the knowledge database is saistied. © scanned with OKEN Scanner Example-1: Tic-Tac-Toe fst approach (simple) The Ti-TaeToe game corsss of a nine cloment vector called BOARD; it represents the umber 1109 in hes rows ay 2 la}sTe T/S]9 ‘An elma contains the val fr blank, for Xand 2 for. A MOVEABLE vectr consist 6 14488 element ("and is neds what each clemea isa nine element yet. The costes fofthe yea especialy chseh to elp the aati, Te algeithm makes mvs y pursuing the flowing: View the yet aya ley number, Convert to decimal amber 2 Use th decal number seamen MOVETABLE and acer he vector A. ScrHOARD tothe veto nding os the Hoard Inks er the move. Tic pci ‘pst inte Bul ih sever daaragey Te aks more space and feu sna fit aot the decimal numbers. This method i psf to this ame ard camot be mle. 1.2. The second approach The stuctue ofthe dai as foe bat We ws 2 fra Bank, 3 fa a X and $ for a8. A sarah called TURN iis I Yor the Rist ve and 9 fr the ast The alg esis thee stn MARE? which tur $i he cere agai blak; here it tums any blank on ‘eornr square, ie 24 6 & POSSWN fp) Flan OA player p cannot win on the Bex! mee anton fetus the ner of tho squat ia gies a wn ae {ar 0, an the wining move fh older of the blank, GO im) makes # move wosqaae m seing BOARD[a}to Sor. Tas lg is owe ave and thes loge bis mone ecient in storage which ‘compenses or its longer tine. depend on the programme's sil La The approach “The sete ofthe ta consists of BOARD which consis nine sent sect, ist oF toa postions ht cul et forthe next move aaa nh representing an enalion of hot ‘he bd potion ess tan lina win fe the payer to move sarin lake shel ta mates dace on the ot move by deciding which hemos ‘romising move othe mes tle move any stage would be and sls the ae, ‘Consider al posible mows ar vepis hat he program can make. Comins process foe slong ie permits et winsr emerges, ben chose the move leads Ihe compar ogra wining. psi the shrest ne ‘Acaly hsis mos dic oprogra by good int at sas at the technique can te evend ain any game, Ths method males rely fewer leas on th presamse fe ‘ofthe ge tecigu but the vel pms state must eho the aise. © scanned with OKEN Scanner Mill Climbing ill Climbing is hewiste search used for mathemat Autti Iligence Given a large st of inputs and a good heuristic function, tres wo finda sufficirly good solution to the problem, This solution may not bs the global eptimal mana, ‘Inthe above delnition, mathematical opinzation problems implies that hill limbing. sles the problems where we need! to maximize ot minimize a given ral function by ‘haosing values Fm the given inputs, Fxample-Lvelling salesman gvoblem where we faced to minimize the distance traveled by salesman + ‘Hust search means that tis search algorithm may'not find the optimal solution to the problem. However, wil give a good solution in reasonable time ‘+ Avheuristie fuetion is function tht will rank all the possible alternatives at any tramching step in search algorithm hase onthe avaiahle infomation. It helye the gorithm to select the het route aut of possible routes Features of Hill Climbing 1. Variant of generate and test algorithm It is a variant of generate and test algorithm. The ‘generate and test algorithm sas follows pimization problems inthe fel of 1. Generate a possible soltions 2 Test 10 se if hist the expected solution. 5. fhe solution has been fn quit else go t step 1 Hence we eal Hill elimbing 35a variant of generate and test algorithm as it takes the feedback {rom test procedre. Then this Feedback is wilized by the generator in deciding the next move in search space 2. Uses the Greedy approach At any pont in state space, the search moves in that diecton ‘only which optimizes the cost offanetion with the hope of ining the optimal solution st the end. 1. Simple Hill ctimbing: It examines the neighboring modes one by one and selects the frst neighboring node which optimizes the curren cost as next node, Algoxith foe Simple Hill lining Step 1: Evaluate the nunal state. sa goal state then stop and retun succes. Others, ‘make intial state as current sate. Step 2: Loop until she solution statis found or there are no new operators present which can be ‘applied ro curren tae 4) Selecta sate that has not been yet applied to dhe enrrent state and apply tw produce a mew 1) Perform shese 10 evaluate new state {-dfthe curren state 1 a goa! state then stop and return succes. 1 ft is beter than the current state, then make it current state and proceed further fi Ifa i nt better than te current state, then eomunue inthe lop tna soation 1 fo Shep 3: st © scanned with OKEN Scanner 2. SteepestsAscent lll ctimbing: I fst examines ll the neighboring nodes and then seletls the node closest the selon state as nest nod, Sep 1 Sip 2 Repeat these steps uni solution found or curren state des not change {Let arg” bea sate such that any suecesvorof the curren state willbe beter than it {i Jor each operator that applies ta the curren stale ‘appl the nes operator an ereare a mew state evaluate the new state 6. this state is goal sate then quit else compare with “target” if this state is heer than target’ set this sate as target € sftarge is beter than curren state set currem state to Target Step 3: Exit 3, Stochastic ill climbing : I does nol examine all the neighboring nodes before deciding ‘hich node a select. just selects neighboring node a random, an decides thased on the mount of proven in ht me wheter Wo move tt ig oo examine another State Space diagram for Hill Climbing State space diagram i a graphical representation ofthe set of states our search algo each vs the value of or ebjctive tutions ftion which We wish to mani Evaluate the initial state {fi i goal state then exit ele make the current state as initial objective funtion obama loca masini sate space Different regions in the State Spee Diagram [Local masimam: Itisiastate whichis etter than its neighboring state however the exists state which i eter than (global maximum), This state is beter because here ‘value of objective fanetion s higher than ts neighbors, “ © scanned with OKEN Scanner 2. Global maximum : 11 is the best possible state in the state space diagram. This because at this state, objective function has highest value 3. Platewa/fat local maximum : [is a Mat region of state space where neighboring states, have the same value, 4, Ridge : Itis region whieh is higher than its neighbours but itself kind of local maximum, 5. Current state : The region of state space diagram where we are currently present during the search. 6. Shoulder: Iisa plateau that has an uphill edge. Problems in different regions in Hill climbing ich the optimal’hest state(global maximum) if it enters any of the aslope. Itis a special following regions 1. Local maximum - Ata local n worse than than the current state. Since hill climbing uses greedy approach, it will not imum a neighboring states have a values which is the worse state and terminate itself, The process will end ev solution may exist. ‘To overcome local maximum problem : Utilize backtracking technique. Maintain a list of visited states, Ifthe search reaches an undesirable state, it ean backtrack to the previous ation and explore a new path, 2. Plateau : On plateau all neighbors have same value , Hence, itis not possible to select the best direction, To overcome plateaus : Make a big jump. Randomly select a state far away from current state. Chances are that we will land ata non-plateau region 3. Ridge : Any point on a ridge can look like peak because movement in all possible directions is downward, Hence the algorithm stops when it reaches this state. To overcome Ridge : In this kind of obstacle, use two or more rules before testing. It implies moving in several directions at once. n though a better © scanned with OKEN Scanner 6° algeitam :- flrs Yen lthtn) Stepr Stort cotih pol A raul Band F re) z6teelu AOR Flr) 2346 =@) -. AF 0 Shovited stp, ADF-OH ADF OG Flu): 347432: 19 .ADFOH pla)e 3414S 2 @ + ADF OG u Sepu- Qopoaot How thew & no det Eon © scanned with OKEN Scanner Ple)2APFOUDTOE = HIF SASH IANS EU: APF PHOTOS = THIET 240-0) > Shortet pld)s APFP 4D TOM 2 Bt lt FH 2UAIBZAI2 Steppe: F(T): AVFIGITOT wBinal stele, thee & no deton nbole ©® Scanned with OKEN Scanner jy (nets Ao sltbe pe 6 yao 4 ice) - Whe S aCe) Hie) ba 0ST KCDY= 12 HB= Kinde ¢ (Ete) = 462 F Cr istest Yeaets- age thr )= Weed sroplace by # saated 4 propagate bac Catevtake | CA- B) = gCosy4 hpy= bee’ then neplace 5 "by sok phd TAT, Fis smalbest one (e-@= aed \ 2 ‘ a. Slee a de ee Sak Aas ye alneody J Co-s)= ro Propegcde 3 vegies 2 vs) Propegede k gek \Er-e-p)= ge Hc crepes = year eS © scanned with OKEN Scanner Heuristic search oper time rather than a complete solution in unlimited time we use istics. "A heuristic function isa function that maps from problem state descriptions to measures of desirability, usually represented as numbers’, Heuristic search methods use knowledge about the problem domain and choose promising operators first. These heuristic search methods use heuristic funetions to evaluate the next state towatds the goal state, For finding a solution, by using the heuristic technique, one should carry out the following steps 1. Add domain—specitic information to select what is the best path to continue searching along 2. Deine a heuristi function h(n) that estimates the ‘goodness’ of a node 1 Specifically, h(n) = estimated costo distance) of minimal cost path from nto a goal state 3. The tem, heuristic means ‘serving to aid discovery’ and isan estimate, based on domain specific information that is computable from the current state deseription of how close we are to goal Finding a route from one city o another ety isan example ofa search problem in which different search orders and the use of heuristic knowledge are easily understood 1. State: The current city in which the traveller is located. 2 Operators: Roads linking the curren city 10 other cites. 3, Cost Metric: The cost of taking a given road between cities. 4. Heuristic information: The search could be guided by the direction ofthe goal city from the current city, or we could use airline distance as an estimate ofthe distance to the gos Heuristic search techniques or complex problems, the traditional algorithms, presented above, are unable to find the solution within some practical time and space limits, Consequently, many special techniques are developed, using heuristic functions. + Blind search is not always possible, because it requires too much time or Space (memory). Heuristics are rales of thum; they do not guarantee a solution toa problem, + Heuristic Search i @ Weak technique but can be effective if applied correctly; i equites domain specific information, Characteristics of heuristic search + Heuristics are knowledge about domain, which help search and reasoning in its domain + Heuristic search incorporates domain knowledge to improve efficiency ver blind search + Heuristic isa function that, when applied to a state, etums value as estimated merit of state, with respect to goal Heuristics might (Kor reasons) underestimate or overestimate the merit ofa state with respect to goal ¥ Heuristics that underestimate are desirable and called admissible + Heuristic evaluation function estimates likelihood of given state leading to goal state function estimates cost from current state to goal, presuming function is (© Scanned with OKEN Scanner Bente Ce 1 Seach stag. wish the highest ayer dsison wees searched compte tore preceding to tenet ae cll Bra corch (BFS) TTeth tegy, no viable solution a cid and therfore guranteed that an optimal {i Othenrse ald the ew sie egnorLST Advantages 1g storage eqaeme Deptt sear {serch tate) tat extends the caren path os faras possible before haciackng wth st Tithe sting tae a goal state, gt and str sce 2 Onherwne, do the fon nl see ae aed 1 Generate usnceester Eto he uting ste 1 ler are more succes, then sgl il 1. Call Def Search with E asthe startin sate Hsecesretured signal sucess thers continue in the Ite storage requirement diner with ee pth ass programmed ncn al sack ds ros the work of manag sts the [Pay ind sub-optimal slton feta is deoero more ay than the best stor) 2 Incomplete. without a deh bound, may ms Tn sion even Foe es 2.42.3 Bounded dept sear ‘spt search can sper! much ime (perhaps infinite tme) exploring very depp tat

You might also like