Homework1_solutions -...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1)SupposethatsomeonewantstodrivefromhishometoSiebelCenterandtherearethreeavailable paths.Thispersoncanusemodelstohelpdecidingwhichofthethreepathsisthebestway.Some possibleaspectstoincludeinamodelare: a. ThedistancebetweenthehomeandSiebelCenterineachofthepaths. b. Thenumberofstoplightsandthetimeeachoneisgreen,yellowandred. c. Expectedtimeyouwillhavetowaitonredlights. d. Usualtimeconditionsineachpath. e. Probabilitythatthereisanaccidentinthepath. f. AveragetimeittakestogettoSiebelCenterusingeachpath. Ifyouhadtoimplementamodel,howwouldyouchoosetomodeleachoftheaspectsathroughf? Wouldyouchoosepurelyanalyticalorpredominantlyempiricalapproach?Explainyourreasons.(For someitemsbothanswersareacceptable,dependingonjustification). a. AnalyticalThedistancecanbegiventotheprogram b. AnalyticalThesecanbeprovidedtotheprogram.Empiricalwouldalsomakesense,for example,somelightsareonlygreenwhentherearecarswaiting,sothetimeforthoselights woulddependontraffic. c. AnalyticalAssumingafixedschedulewecouldestimatetheexpectedtimeanalytically. Empiricalwouldbealoteasiertoimplement,justtravelsometimesanddotheaverage. d. EmpiricalItwouldbeeasiertoobservethantocreateananalyticalmodelthatwouldconsider allconditionsinvolved. e. AnalyticalThisdatacouldbeprovidedtotheprogram.Wemightwanttouseanempirical modelaswell.Forexample,ifwewantthisprobabilitytobeupdatedasthetrafficpatterns changeonagiveroad. f. EmpiricalThisdatacouldbeestimatedusingthepreviousfactorsandseveralothers,butitis veryunlikelywewouldhaveenoughknowledgetogetitanalytically.Itwouldbeeasiertotry afewtimesandcalculatetheaverage. 2)Considerthesearchtreebelow.NodeAistherootofthetreeanddoublecirclednodesaregoal states.Thenumberbytheedgedindicatesthecostofapplyinganoperatorandthenumberbelowthe nodelabelrepresentstheheuristicfunctionh(n)forthatnode. a.Foreachsearchstrategylistedbellow,givetheorderthenodesarevisited,thegoalstatefound(if any)andthestateofthequeueateachstepofthesearch(asshowninlecture3).Whennodesare expanded,newsnodesareaddedtothequeueinascendingalphabeticalorderwhenevertheorderis indifferentforthesearchalgorithm. i.DepthFirstSearch ii.BreathFirstSearch iii.GreedySearch/BestFirstSearch iv.UniformCost v.A* b.Inthisexample,istheHeuristichadmissible?Isitconsistent?Explainyouanswersinasentenceor two. c.Determineifeachofthemethodsi.troughv.isguaranteedtofindthebestsolutionand,ina sentenceortwo,explainwhy(youcanuseknownresultsfortheexplanationandyoudonotneedto provethem). i. A B E F GoalFound:F ii. A B C D E F GoalFound:F iii. A B F GoalFound:F iv. A C H D B G I K GoalFound:K (A) CDB HDBG DBGK BGIKJ GIKJFE IKJFE KJFE JFE (A) BCD FECD ECD (A) BCD CDEF DEFGH EFGHIJ FGHIJ GHIJ (A) BCD EFCD FCD CD v. A C H K GoalFound:K (A) CBD HBDG KBDG BDG b)hisadmissiblesinceitneveroverestimatesthetruecost,i.e.,h(n)lessorequalh*(n)foralln hisconsistentsinceh(n)lessorequalcost(n,o,n')+h(n')foralln,n'adjacentton c. i.ThereisnoguaranteethatDFSwillfindthebestsolution ii.ThereisnoguaranteethatBFSwillfindthebestsolution iii.ThereisnoguaranteethatGreedySearchwillfindthebestsolution iv.Uniformisguaranteedtofindthebestsolution v.A*isguaranteedtofindthebestsolutionsincetheheuristicisconsistentandadmissible or A*isguaranteedtofindthebestsolutionsincetheheuristicisadmissibleandthe searchisoveratree. 3.Observethegridworldbellow: Start Inthisgridworldanagentisallowedtoperform4operators:MoveNorth,MoveSouth,MoveWestand MoveEast.Movingintoawallcausesa"timespacewrap",i.e.,Movingsouthfromthebottomline causestheagenttoremaininthesamecolumnbuttomovetotheupperline.MovingWestfromthe leftmostlinecausestheagenttoremaininthesamelinebutmovetotherightmostcolumn.Thesame logicisappliedforMoveEastandMoveNorth. TheobjectiveistomovefromtheStartspacetothegoalspace.Movingintoanormalspacecosts1and movingintoarockyspacecosts4.Thestartandgoalspacesareconsiderednormalspaces. a) i.Defineadatastructurethatisadequatetothestatesofthisproblem. ii.Definetheoperator"MoveSouth"byspecifyingitspreconditionsandeffects. b)Supposethattherobotisallowedtochooseanyorderineachsteptoexpandthestatesduringthe search,i.e.,onadepthfirstsearchtherobotcouldchoseMoveNorthfromthefirststateandthen MoveWest.Consideringtheluckiestpossibleorder, i.Whatisthefewestpossiblenumberofnodesthatmustbevisitedifdepthfirstsearchisperformed?Is depthfirstsearchguaranteedtoreachthegoalstate?Wouldanoptimalsolutionbefoundinthiscase? ii.Whatisthefewestpossiblenumberofnodesthatmustbevisitedifbreadthfirstsearchis performed?Isbreadthfirstsearchguaranteedtoreachthegoalstate?Wouldanoptimalsolutionbe foundinthiscase? iii.Whatisthefewestpossiblenumberofnodesthatmustbevisitedifuniformcostsearchis performed?Isuniformcostsearchguaranteedtoreachthegoalstate?Wouldanoptimalsolutionbe foundinthiscase? c)IfweusedtheManhattandistanceasaheuristic,wouldA*beadmissible?Canyouthinkofanyother heuristicthatwouldbeadmissible? Rocky Rocky Goal Rocky a)Torepresentastateweneedonlyapair(x,y),wherexistheindexofthecolumnandyistheindex oftheline. b) Move_South_No_Wrap: Preconditions:y>0 Effects:collect(x,y1) Move_South_Wrap: Preconditions:y=0 Effects:collect(x,2) i. Thefewestnumberofnodesthatmustbevisitedis3:(0,1)(0,2)and(2,2).Thisisthebestsolution, however,thereisnoguaranteethatdepthfirstsearchwillfinditorthatitwillevenstop. ii. Thenumberis6:(0,1)(0,2)(1,1)(0,0)(2,1)(2,2).Itfoundthebestsolutioninthiscasebutthereisno guaranteethatitwouldhelp.Itwillalwaysfindthegoalstate. iii. Thenumberis5:(0,1)(0,2)(0,0)(1,1)(2,2).Itisguaranteedtofindthebestsolution. c)No,becausetheheuristicoverestimatesthecostofgoing,forexample,fromtheleftmosttothe rightmostcolumnofthegrid.TheManhattandistancedoesnotconsiderthe"timespacewrap". Min(|cacg|,n|cacg|)+min(|lalg|,n|lalg|)wherelgislineofthegoal,cgisthecolumnofthe goal,laisthelineoftheagent,caiscolumnoftheagentandnisthesizeoftheboard.(Oneextra creditwasgiventowhoeverfoundthisclosedformula). 4)Supposewehaveanheuristich1(n)suchthath0.9h*(n)h1(n)1.5h*(n)andaheuristich2(n)such thath2(n)0.1h*(n) a)Istheheuristich1(n)admissible? b)Istheheuristich2(n)admissible? c)Whatwouldbetheadvantageofusingh1(n)insteadofh2(n)?Whataboutthedisadvantages? d)Ifanyoftheheuristicsh1(n)orh2(n)arenotadmissible,cantheybemadeadmissible?Howandwhy doesitwork? a)No,h1(n)mayoverestimateh*(n) b)Yes,h2(n)h*(n) c)Theheuristich1(n)is"moreinformed"thanh2(n).Itisguaranteednottosearchmore(observethat moreinformedisonlyvalidbetweentwoadmissibleheuristics).Thedisadvantageisthattheheuristic h(n)1isnotadmissible. d)Yes.Takeh1'(n)=h1(n)/1.5.Wehave0.9/1.5h*(n)h1'(n)h*(n)andconsequently,h1'(n)h*(n) ...
View Full Document

This note was uploaded on 04/30/2011 for the course ECE 448 taught by Professor Levinson during the Spring '08 term at University of Illinois, Urbana Champaign.

Ask a homework question - tutors are online