Download as pdf
Download as pdf
You are on page 1of 9
Name: CS 182:Intelligent Machines Midterm I - Fall 2009 Prof. Radhika Nagpal October 14,2009 ‘Time: 2:37PM - 4:00PM (83 Minutes) Directions: Answer all the questions below in the space provided. Write your name on each page! If you need more space, write on the back or on the scratch pages provided. Make sure to note if your answer continues somewhere els. If you finish early, you may check your Work and hand in your test. If you get stuck, consider ‘moving on to the next problem and then coming back if you have time. We have provides approximate times to help you gauge when to do this. Note that these times are only approximate, and difficulty will vary for each of you. Aids: This exam is closed book and has no aids. Score Sheet: 1; / 10 (approx. 5 min.) 2: 1 30 (approx. 20 min.) 3:15 (approx. 5 min.) 4: 25 (approx. 15 min.) 5:1 15 (approx. 10 min.) 6: | 25 (approx. 20 min.) Total: / 120 (approx. 75 min.) Name: 1) (10 points) Consider the following game tree, Leaf nodes are labeled using a static-evaluation function. The triangles are max nodes and the circles are min nodes. Perform a minimax search with alpha-beta pruning on this tree, Children should be expanded left-to-right. Show the a and values as they are updated at each node, and indicate which parts of the tree are pruned by drawing, ‘a double line through the edge above a pruned node. You may write directly on the diagram. max he Name: 2) (30 points) Consider the search tree below that includes three goal nodes. The labels on the ares give the action costs, and the nodes are annotated with the value of an admissible heuristic function h(n) evaluated at that node. You want the minimal-cost solution goal goal goal 4) (10 points) List, in order, the nodes expanded by A* search, starting with node A and ending with the goal node that terminates the search. List the value off, g,and h at each node. Break any ties alphabetically. You many not need all the space provided. tnsis >| » [a [Bi s2 [83 neithe mol -| 4] 8l elite soluhon “ bone am)O | 1 14) 7 In [2 Histung out [nny -1319)1 o 4 | values for - all Noddy - é [Fathi = ordan of nocts exPemdad by A * A-> Bl ct > b2 > ce —~ B2—> B3 3 > C339 p3 D4 7\4 || &|% Tro 4\6l" \5 19 |e 3 Name: (Question 2 continued.) >) G points) Describe in words what it means for a heuristic to be admissible. What property of A* does an admissible heuristic guarantee? 5 Never overestimate s Yhe TMs Cos hind < Mecest (n> Goak > Shoramtio Par A* u optimal B pot (Undnrhe vestnction thot repertack nots 042 N° dorardad} 0 POY cone consistenthesotecs AF > Ne COPE, ©) (10 points) Let i, fz, ig} bea set of admissible heuristics for a minimization problem, Let hg) = mia{ y(n). Prove that Fy is admissible and that pax, dominates each hy © Ye bin) < burlost (92> gore) 3 max (virilry) < eA Loe tn cost (0 Go") > i Poamesible GY pornmatas’ reans etiaty yustn Ho Jor 000 noded , 4 ikon) ve Limax(uinicry) 7 wor] "4 aoe orn 4) (S points) Truc or false: adding a constant value to the heuristic function (except at goal nodes, where the heuristic function must be 0) will not change the behavior of A* search. Explain your answer in a couple sentences. false 29. h’@ = bi) +o bymnilely Voales odvniss' bly Name: 3) (15 points) Consider the following local search algorithms Algorithm A: Algorithm B: (defun search-b (™) (defun search-a (WM) (let ((x (random-state))) (let ((x (random-state))) eta (let ((y (random-state))) Loarty [et (setf x y)))) a Randomly (if (< (state-value x) (if (< (state-value x) Sample (state-value y)) (state-value y)) neighborhood (setf x y)))) (set x y)))) Note tok » ” Pork aoasons O40 Yrax\tm12UNg Mustrate With graphs: 4) A search space on which both Algorithms A and B would perform poorly. ) A search space on which Algorithm A would outperform Algorithm B. lust rout choloes (1-2 Remences). RADHIKA’S Dat < ssuble answer | es Bee Oyrebguous to grade | cw) Al nusghbor ts metthws Brod for afl apcucar ahr" ca OR _\ |S aiming Sex Un sve Awill be Jueily to owperform B sume d hac move Chomees of Jvncureey the bag ill Name: 4) 25 points) You have been asked to schedule a project involving six tasks (A, B,C, D, E. P), each of which must be assigned to one of four time slots (1,2,3,4). More than one task can be assigned to a slot. A schedule is considered acceptable if it assigns a slot to cach task and satisfies, the following constraints é 1, Task A must precede task D. ) D 2. Task B must occur simultaneously with task A. 3. Task E must follow within two time slots of task A ive. if Ais in slot i, then E € [i + 1,i + 2]. 4. Task B must precede task C. 5. Task F must follow task £ 6. Task C must precede task F. 442 4 ‘The problem has been formulated as a CSP in which the variables are the six tasks, each with initial domain {1,2,3,4}. The constraint graph is provided above. ) (10 points) Translate each of the first three constraints into constraint notation such as, “(X,Y) = (aig) (asta), ---” where X and Y are variable names and (x1,y1) € (X,Y) means this is a valid assignment. (> = (129 03) 04) (23) (24 (34) (AB) = OV (22 (33) cau (ns - 02) 0322 A4) 4D Name: (Question 4 continued.) ) (5 points) Without performing either forward checking or arc consistency, explain which variable should be assigned to first and provide a justification for your heuristic. A = most, Comstsoun yng voruab le Cnighoat hegre) © ©) (10 points) Now assume that we have made the assignment A = 2. 4. All other variables retain as their domain {1,2, 3,4). Apply the arc-consistency algorithm to this CSP, with the arc queue initially containing only the arcs (C, P) and (3, A) (from C' to F, ete). Show the order in which you consider arcs and eliminate values, Is this partial assignment valid? Gus Vettes edi natso} Ale (CF) (COj4) » put BC w quen BAe BH CBA) (B134).y put CB mque clywvey “2(Be) _ nothing eLummnalal ‘plies zee (C1 1,2) » puk FC in que —p23y o(FC) young, remun als ol NO mare axch _———— Hao QumUg conn Yes Wr partial 02 9% js vaticl be caer, we have Kot eaoed ovruy ovncun to goto empty set 6) (25 points) Consider an iterative-broadening search (IBS), with a branch-ordering heuristic used to perform successive depth-first searches. First, only the child ranked first by the heuristic is considered, resulting in a depth-first search (DES) with an effective branching factor of 1. Next, the top two children of each node are considered, giving a DFS with a branching factor of 2. IBS continues until the branching limit is greater than the maximum number of children for any node ‘ora goal is found. IBS considers the same node multiple times. For example, in the tree below, with the assumption that nodes are ordered from left-to-right by the branch-ordering heuristic, IBS would examine the nodes inthe following order: A, B1,C1, A, B1, C1, C2, B2.C4,C5, A, BL. AN a d ) i @ Oe oh boys a) (5 points) Explain briefly whether IBS is complete. Complete, if pimite copy search Hee is guavantcent \ncomplete, Y pote rath 4 abby unpmnul geasroh Wee ) ( points) Explain briefly whether IBS is optimal when actions have a uniform cost of one. No. Like BFS doce ror explore nackte in he over Qf Shortest dopth (5 pat rost ) E.g. Suppose bith C2 € BZ ww goed Noclts hors IBS will suturnce , esem though ub hos y pots Lomgth ay 2 wanes B2 hao o Fath Dong of I Name: (Question 5 continued.) ©) (5 points) Now assume a tree with a finite branching factor b and a finite depth d. Compare the asymptotic time and space complexity of IBS and iterative-deepgnding search (IDS),_____ = ins = Bebb? bt = OCS RADHIA'S ime . NOTE ng ete Bast bt = 908") snote : Some | Suapeacrener ~—_ Obout YAS, Aico deeded We ol PE pact “3 Both Use BFS Style memory usage Shacints ° oo (2 tree depth )) 40 Spam = Domgtrog worst-case path Bere a cornet rena Spacey 4) (S points) State and justify a condition on both the depth of typical goal nodes and the frequency of goal nodes for which IBS might outperform IDS, Lots oJ pad nodan ct a specizic agit ( aarp ) IBS 1s rove Sukely to azo a good noole Spas un tRs case ©) (S points) Explain why IBS may discover nodes in a different order than DFS. . DFS will explore aM %4 B hrjore movung on to dion ealdren of A (suck as Cov bd Subtreda ) D \ | A aS IBS com stout ex plore g Svubkec C even before corm plotung oubsee B elas Sos more than woo GB) childyen , Yun those SOT iv Audetren will yee emplored alte (Bi stents explorry C/s subtree) & \ ( \ Lo X

You might also like