.nh .po 5 .ce TEST II CS724 .nf Instructor Dr P Juell NAME__________________________ 100 points, closed book March 24, 1993 .fi 1. (20) (in parts 1-1, 1-2 and 1-3) .br The following is a simple game played with four items. Player plus starts and takes 1, 2 or 3 items. Player minus then takes 1, 2 or 3 items of those left. This continues until someone takes the last item. The person taking the last item loses. 1-1 (10) Draw the full game tree with player plus the root. It will take about a half a page. Make sure the meaning of the edges is labeled in your diagram. Now fully label the game tree with the value of the game. Use +1 for player plus wins and -1 for player minus wins. 1-2 (6) After you have finished labeling the tree, .br explain in English what the labeling means, what is the sequence of play, and should you play the game. 1-3 (4) Also, would alpha/beta reduce the search of the tree as you have drawn it? 2. (20) A program was designed to correctly classify the usage of the word 'ball' as either: .br (1) a round solid object used as a toy .br (2) a formal dance .br Explain properties of 'ball', 'throw' and 'go' (past form, "went") that would allow the program to correctly handle the following sentences: .sp John threw the ball to Mary. .br John picked up the ball. .br Mary went to the ball. .sp Use the frame notation for showing the restrictions. 3. (20) Write a program in PROS or RULES to mimic the following information: .in +5 .sp Start the world with two male cubs and one female cub. .br If there is a male and female leopard they will produce one male and one female cub. .br Cubs turn into adults. .br If there two male leopards one will be driven off. .br Female leopards will not mate if there are more than one adult males. .in -5 .sp Show the first four (including the first) stm's. 4. (10) The lisp version of the blocks program is 249 lines long while the PROS version is 40 lines long. Since the two programs do approximately the same operations explain why there is such a difference in size between the two. 5. (20) You are to write the PROLOG code to determine if a list is a SUB_ORDER of another list. A SUB_ORDER is defined as all elements in the list occur in the second list in the same order. There may, however be any number of 'extra' items in the second list. e.g. sub_order([a,a,b],[a,x,y,z,a,q,b]) = yes 6. (10) How does GUS know what information to ask for and why does GUS not explicitly ask for all possible information? .bp ------------------------------------------- 4. (20) Some expert systems can correctly work even if the input data is inexact or has some values missing. Give the high points of why this can be the case. 4. (20) Why are rules often used for expert systems instead of procedural code? 5. (20) The following are rules for a program to be written using the PROS production system. Write a program to perform the specified actions. .br STM can contain any number of A or B items. Leave in STM one C for each A more than there are B's or for each B more than there are A's. Do not leave any A's or B's in STM.