99 Exercises



Comments



Description

Exercise Set 1, 1999CSE2309/3309/CSC2091/3091 Artificial Intelligence 1999 Exercise Set 1: Agents and Problem Solving The following questions are taken from Russell and Norvig (as indicated) or from previous years' exam papers or exercise sheets (with modifications to reflect this year's syllabus) Exercise 1.1 (Heuristic functions) (from R&N 4.2) Come up with heuristics for the following problems. Explain whether they are admissible, and whether the state spaces contain local maxima with your heuristic: (a) The general case of the chain problem (i.e. with an arbitrary goal state) from Ex 3.5. (b) Path planning in the plane with rectangular obstacles (see also Ex 4.13). Exercise 1.2 (Non-admissible heuristic functions) (R&N 4.6) Invent a heuristic function for the 8-puzzle that sometimes overestimates and show how it can lead to a suboptimal solution on a particular problem. Exercise 1.3 (A*) Consider the travelling salesperson problem: A salesperson must visit each of n cities. There is a road between each pair of cities. Starting at city #1, find the route of minimal distance that visits each of the cities only once and returns to city #1. Propose two (non-zero) h heuristic functions for this problem. Is either of the these h functions a lower bound on h* ? Apply the algorithm A with these h functions to the 5 city problem below: 7 10 10 7 13 6 9 10 Exercise 1.4 (A*) 5 6 Exercise Set 1, 1999 The evaluation function f(n) = d(n) + W(n), where d(n) is the cost of arriving at node n and W(n) is the number of misplaced tiles, is used in conjunction with the A * algorithm to search from the start node (left) to the goal node (right): Start Goal 2 8 3 1 6 4 8 5 7 7 1 2 3 4 6 5 Yielding the following search tree: 4 6 5 6 8 3 2 1 4 7 6 5 2 8 3 1 6 4 7 5 2 8 3 1 4 7 6 5 7 2 8 3 7 1 4 6 5 Goal 5 2 8 3 Start 1 6 4 7 5 4 2 8 3 1 4 7 6 5 5 2 3 1 8 4 7 6 5 6 2 8 3 1 4 7 6 5 5 2 3 1 8 4 7 6 5 7 2 3 1 8 4 7 6 5 5 1 2 3 8 4 7 6 5 1 2 3 8 4 7 6 5 7 2 8 3 1 6 4 7 5 6 1 2 3 7 8 4 6 5 Use this evaluation function to search backward from the goal node to the start node. Where would the backward search meet the forward search? Exercise 1.5 (General Search) Each of the following search trees has a distinctive structure and order of expansion which can be produced by a particular search procedure. For each tree write the name of the search procedure which can generate it. The possible names are: breadth first search, depth first search and A (with non-zero g and h). Where applicable, the nodes are labelled with the order in which they are expanded. show the lists OPEN and CLOSED. how many nodes are expanded until the solution is found? How many are generated? (Expansion is performed from left to right) Exercise 1. 5 A 3 4 2 B G 7 4 S 4 C 2 D .6 (A. 1999 (a) 1 2 5 (b) 3 4 1 6 2 6 (c) 4 3 1 2 5 3 4 Exercise 1.Exercise Set 1.7 (Hill Climbing) The diagram below depicts the cost of travelling between cities. (b) How many nodes are expanded until the solution is found? How many are generated? (c) If DFS is used. OPEN must be ordered. DFS) Each node in the search tree below contains the estimated cost of finding a solution from that node. A 25 C 26 B 13 E 12 D 27 H 12 I 5 J 29 G 19 F 16 K 33 L 0 M 2 N 0 P 12 (a) For each iteration of algorithm A. The nodes with zero cost are goal nodes. two or three coins from a stack initially containing 5 coins. Also state the number of and  cut-offs performed. h. starting from leftmost-node-first. Assume that it is turn to play. state the final backed-up value of the root node and the recommended move (Left or Right). The player who picks up the last coin loses. What is the path? What is its cost? (b) Draw the search tree generated by the GraphSearch procedure to reach the goal G starting from S.Exercise Set 1. clearly indicate the propagation of the and  values. In your tree. and the number of leaf nodes generated.8 The game nim is played as follows: Two players alternate in removing one. and that the evaluation function at the leaf nodes is in increasing order from left to right. and f at each node. that the player who has the second move can always win. What is the generated path? What is its cost? Exercise 1. and for the rightmost node is 16 (the leaf nodes are MAX nodes).9 () Consider a game tree with branching factor 2 and depth 5. Show by drawing the game graph. indicate the order of expansion of the nodes. Also. Upon completion of the search. 1999 (a) Draw the search tree generated by the Hill-climbing procedure to reach the goal G starting from S. where MAX plays in the square positions and MIN plays in the circles. Can you think of a simple characterisation of the winning strategy? Exercise 1. using the following estimate of the cost from each node to the goal as a heuristic function: S A B C D G 10 6 1 4 3 0 Indicate clearly the values of g. Conduct an search of this game tree. Exercise 1. .10 Consider the following game tree. the performed cut-offs and the inspected leaf nodes. Use the function f = cheapest road. such that its value for the leftmost node is 1. History and Agent Structure (Total 12 marks) (a) Name two influential figures in the field of AI who attended the Dartmouth College workshop in the summer of 1956.e. without the nodes that are cut off.) (4 marks) (i) Always put your turning indicator blinker on before turning (ii) Never use your blinker (iii) Look in your mirrors and use your indicator only if you observe a car that can observe you. Draw the resulting game tree so that only the visited nodes appear in your diagram. i.Exercise Set 1. (4 marks) (c) Characterise the environment as being (i) accessible or not. action. the cut-offs and the  cut-offs you have performed. Question 1 1996 Exam. or utility-based. the updates performed on the backed up values. starting from leftmost-node to determine which move should MAX make. . goal. logical. (4 marks) (d) What agent architecture is best for this domain and why? (Reflex. which of the following is the best policy? (Explain your answer in terms of cost and computational effort. (2 marks) (b) Choose a domain that you are familiar with and write a PAGE (percept. 1999 7 6 8 5 2 3 0 -2 6 2 5 8 9 2 (a) Conduct an search of this game tree. goal-based. (ii) deterministic or not. environment) description of an agent for the environment. Explain your answers briefly. Indicate clearly the backed up values of each node.) Question 1 1995 Exam (2 marks) (Total 10 marks) (a) What is the difference between a performance measure and a utility function?(4 marks) (b) While driving a motor car. it also can carry food from one location to another. . For the purposes of a hill-climbing search algorithm.Exercise Set 1. There are three locations: the table. Right now.) (1 mark) Question 1 1997 Exam. (Total 10 marks) Robbie the robot works in the kitchen. or utility-based. the goal state G has value 0. and there is a “wall” blocking some transitions. G S (i) What is the estimated value of the start state using the Manhattan distance to the goal as the metric? (ii) What is the estimated value of the start state using the shortest distance to the goal as the metric? (iii) Why does this start state cause a problem for a hill-climbing algorithm using the Manhattan distance as the metric? (4 marks) Question 3 1995 Exam Robbie's World. goal-based. It can move from one location to another. (4 marks) (b) Consider the following grid environment. goal-based. where S is the start state and G is the goal state. The arrows show possible movements between states. the stove and the refrigerator. or utility-based.) (d) (1 mark) What kind of agent is necessary to carry out this policy? (Reflex. Short Answers (a) Name two Artificial Intelligence researchers and describe their contribution to AI (in no more than two lines for each) . 1999 What kind of reasoning did you need to arrive at this driving policy? (c) (Logical. (2 marks) (ii) Under your chosen representation. the 1 in the top left. For this question. at any time. Is this heuristic for the path cost of the full problem admissible? (1 mark) (3 marks) Question 3. what conditions need to be checked when generating the legal successors of a state? (2 marks) (b) Recall the 8-puzzle. 1999 Robbie is near the table. This question involves describing a problem formulation for this cooking domain. She has a rowboat that he can use to carry at most one item at a time (plus herself) across the river. (i) Design and describe an appropriate representation for a state in this search problem. what is a goal state for the search problem? (1 marks) (iii) Give the operators in terms of the legal successors that will be reached by carrying out the operator in the initial state. and the numbers increasing clockwise around the square. (a) Give the initial state. a chicken and a sack of grain.) Here is an initial state of that puzzle: 1 3 . The farmer's problem is that she can't leave the fox alone with the chicken. Show the initial state under your representation. you are to design a state-space search approach to this problem. (3 marks) (iv) In general. Describe such a relaxed problem and such a heuristic. (1 mark) (e) One heuristic for estimating the path cost is the cost of an exact solution to a relaxed problem (one with less restrictions on the operators). Search (a) (Total 20 marks) A farmer is trying to cross a river with a fox. (Take the goal state to be the one where the blank is in the centre.) (4 marks) (c) Give the goal test. or the chicken alone with the sack of grain. We would like to have both the soup and the orange juice on the table. (b) Give the operators. (These should be descriptions of the actions in terms of which state will be reached by carrying out the action in a particular state. which was described in lectures. Only the farmer can row the boat so she has to be with the boat in each of its trips across the river. and the orange juice is in the refrigerator. 1996 Exam. the soup is on the stove. (1 mark) (d) Give the path cost function.Exercise Set 1. (10 marks) Question 4 1995 Exam (Total 15 marks) Consider a hypothetical game with branching factor 2. and finishing when the goal state is selected for expansion. indicate the value f of that node. For example. it should not contain duplicate nodes. the evaluation function is f(n) = g(n)+h(n). so that only the expanded nodes appear in your diagram (i.Exercise Set 1. although it may contain multiple paths to a node). Also indicate on your graph the order in which nodes are selected for expansion using a circled number. as evaluated by MAX using the  procedure. (11 marks) (b) How many cut-offs have been performed? (1 mark) (c) How many cut-offs have been performed? (1 mark) (d) What is the best move for MAX and what is its backed-up value? (2 marks) . For each node in your diagram. Indicate clearly the backed-up value of each node and the updates performed on the backup values. She is able to evaluate a position 4 steps in advance.e. if they ever need to be evaluated. It is MAX's turn to play. the initial state above will be labelled with f = 7 and is the first node selected. node# 1 e(n) 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 13 8 14 11 5 7 4 2 20 6 0 13 8 10 16 15 (a) Draw a game tree. without the nodes that are cut off). The following is a list of the value of the positions at the bottom of the game tree. Ensure that your graph is a proper search graph (in particular. 1999 8 7 2 5 6 4 In A* search. so it will have a circled 1 next to it. where h(n) is a heuristic evaluation function based on the number of tiles out of position (i) What is g(n)? (2 marks) (ii) Draw the search graph starting from the above initial state. starting at the left-most node first. in case they ever need to be evaluated. draw your diagram without the nodes that are cut off). the cut-offs and the cut-offs. 1999 1997 Exam Question 2.Exercise Set 1. node# 1 e(n) 2 3 4 5 6 7 8 8 12 20 30 10 5 25 2 (a) Draw a game tree. (b) Clearly indicate the backed-up value of each node and the updates performed on these values. Search (10 marks total) Consider a hypothetical game with branching factor 2. as evaluated by MAX using the  procedure starting at the left-most node first. She is able to evaluate a position 3 steps in advance.e. It is MAX's turn to play. (a) What is the best move for MAX and what is its backed-up value? . The following is a list of the value of the positions at the bottom of the game tree. so that only the expanded nodes appear in your diagram (i. (a) Write an axiom or axioms describing PutOn. Exercise 2. (f) No person likes a smart vegetarian. in which there is a stack of three blocks.1 (R&N 6.Exercise Set 2. 1999 CSE2309/3309/CSC2091/3091 Artificial Intelligence 1999 Exercise Set 2: Knowledge Representation and Reasoning The following questions are taken from Russell and Norvig or from previous exam papers or exercise sheets.y).) . Working through them should help you study for the exam. Exercise 2. using a consistent vocabulary (which you must define): (a) Not all students take both History and Biology. (b) Describe the initial state s0. (b) Only one student failed History. (c) Give the appropriate query that a theorem prover can solve to generate a plan to build a stack where C is on top of B and B is on top of A. The predicates are: On(x. (g) There is a woman who likes all men who are not vegetarians.The only action is PutOn(x.5) Given the following can you prove that the unicorn is mythical? how about magical? horned? If the unicorn is mythical.s). The initial situation s0 has A on B on C on the table. Block(x). (c) Only one student failed both History and Biology. If the unicorn is either immortal or a mammal.y. Table(x). The unicorn is magical if it is horned. A on B on C.2 (R&N 7. then it is a mortal mammal.2) Represent the following sentences in first-order logic. T. where C is on the table.3 (R&N 7. and they can fool all of the people some of the time.  ClearTop(x. then it is horned. (Hint: The solution will be a situation described as the result of doing some actions to s0. then it is immortal.9) Formalize the blocks world using situation calculus. but they can't fool all of the people all of the time. Write down the solution that the theorem prover shoujld return.s). Exercise 2. but if it is not mythical. (e) Every person who dislikes all vegetarians is smart. (j) Politicians can fool some of the people all the time. where x must be a block whose top is clear of any other blocks and y can be either the table or a different block with a clear top. d) Exercise 2. [(x) person(x) [(y)mother(y. 1999 (d) Show formally that the solution facts follows from your description of the situation and the axioms for PutOn. (b) All women except butchers like vegetarians. (c) The only vegetarian butchers are men. (e) Aristotle told a lie. (e) No man likes a woman who does not like all vegetarians. (d) No woman likes a man who is a vegetarian. vd butcher(b) dog(d) owns(b. (old(dog(Fido)) (c) Fido is an old dog. Exercise 2. (2) Whoever sleeps with a doll or a soft animal is a child. (a) Everybody has a mother. Exercise 2.7 Consider the following statements: (1) All children have a favourite toy. whether the following First-Order Predicate Calculus sentences are correct representations of the corresponding English sentences.Exercise Set 2. x [math­theory(x) x] s [aristotle­said(s)  true(s)] (f) There are no vegetarian butchers. vb[butcher(b) vegetarian(v)] (g) No butcher owns a dog.5 Use the following vocabulary to express the assertions in the following sentences: .butcher(x) means that x is a butcher. (a) No woman is both a butcher and a vegetarian.6 Indicate by writing CORRECT or INCORRECT. . .vegetarian(x) means that x is a vegetarian.x)]] (b) Fido is an old dog. .4 (R&N 7. remember that shooting uses the agent's arrow. Exercise 2.10) Write sentences to define the effects of the Shoot action in the Wumpus world.male(x) means that the object denoted by x is male.female(x) means that x is female. dog(Fido) old(Fido)  (d) All methematical theories are true. . As well as describing its effects on the Wumpus. 9 Consider the following statements: (1) A student is successful if s/he has high grades. (a) Represent these sentences as predicate calculus formulas. Indicate clearly the substitutions you make. (4) Tom sleeps with Fuzzy. Do not include student as a predicate. (b) Convert these FOPC sentences into Conjunctive Normal Form clauses. Question 1 (1997 Exam).8 Consider the following statements: (1) John likes all food. (b) Convert these FOPC sentences into Conjunctive Normal Form clauses. 1999 (3) Fuzzy is a soft animal. (a) Represent these sentences as predicate calculus formulas.. represent these sentences in predicate calculus well formed formulas (wffs).Exercise Set 2. (4) Students who do not work hard have lots of fun. Indicate clearly the substitutions you make. (c) Use resolution to prove that Mary is a successful student. (5) Mary is not having any fun. Indicate clearly the substitutions you make. Exercise 2. (3) Students who are not bright fail CS3091. (3) Bill eats peanuts. (a) Using only the predicates child. (2) Anything that one eats and isn't killed by is food. (4) Bill is still alive. Exercise 2. (b) Convert these FOPC sentences into Conjunctive Normal Form clauses. Short Answers . (c) Use resolution to prove that Tom has a favourite toy. as it complicates the solution. sleeps­with. (6) Mary passed CS3091. (2) Students who are bright and work hard have high grades. favourite­toy. (c) Use resolution to prove that John likes peanutes. doll and soft­ animal. Exercise Set 2. (i) What is the Frame Problem? (ii) What inference rule is used by forward and backward chaining? When would you prefer forward chaining to backward chaining and vice versa? (iii) Is it always the case that either KB |= P or KB |= P for any knowledge base KB and predicate P? Question 6. (c) Use resolution to prove that sentence (4) follows from sentences (1). dolphin and intelligent. (6 marks) (b) Convert these FOPC sentences into Conjunctive Normal Form clauses. (4) Green dragons are happy. 1999 (c) Resolution in First-Order Predicate Calculus is a sound and complete inference procedure. (2) Green dragons can fly. (8 marks) (6 marks) Question 4 1996 Exam. (3) Some dolphins are intelligent. (4) Some who are intelligent cannot read. fly. represent these sentences in FOPC sentences. What does this mean in terms of a knowledge base? (4 marks) Question 5 (1995 Exam). child. represent these sentences in First Order Predicate Calculus (FOPC) sentences. (2) Dolphins are not literate.(8 marks) . Indicate clearly the substitutions you make. happy. (2) and (3). Using only the predicates dragon. green and pink. (Total 28 marks) Consider the following statements: (a) (1) A dragon is happy if all its children can fly. literate. (a) Using only the predicates read. (b) (Total 10 marks) Answer each part with 1 or 2 sentences Note: Answers without a justification are not sufficient. (3) A dragon is green if at least one of its parents is green and is pink otherwise. (1995 Exam) (Total 20 marks) Consider the following statements: (1) All who can read are literate. 1999 (b) Convert these FOPC sentences into Conjunctive Normal Form (CNF) clauses. y.csc3091) x. The result of this operation (where variable names are subscripted since we need different variables in each clause) give the following clauses: (1) prereq(csc2030.y1) v prereq(z1.y) prereq(z. indicate the clause used for that step by writing down its number.y1) v passed(x1.z (passed(x.csc3091) (4) graduated(sally) Use resolution to prove that Sally must have passed csc2030.z)) x (graduated(x) passed(x.csc3091)) graduated(john)   Before performing resolution.z1) (3) graduated(x2) v passed(x2. At each step of the refutation.y) passed(x.csc3091)   (2) passed(x1. (8 marks) (c) The following represents a simple knowledge base: prereq(csc2030. and indicate clearly the substitutions you make.Exercise Set 2. this needs to be converted to CNF. (10 marks) . Learning The following questions are taken from Russell and Norvig or other texts (as indicated) or from previous years' exam papers or exercise sheets (with modifications to reflect this year's syllabus) Exercise 3. (d) Explain in detail what happens during the planning process when the agent explores a partial plan in which it leaves home without the card.1 (R&N 11. . Modify the description of buy so that the agent has to have its credit card in order to buy anything. but have(CC) is initially false. (c) Assume that the credit card is at home.Exercise Set 3 CSE2309/3309/CSC2091/3091 Artificial Intelligence 1999 Exercise Set 3: Planning. at least in a simple way.2) Let us consider a version of the milk/banana/drill shopping problem in which money is included. Shakey can move from place to place. and turn light switches on and off. (b) Write a pickUp operator that enables the agent to have an object if it is portable and at the same location as the agent. climb on and off of rigid objects (such as boxes). Construct a partially ordered plan that achieves the goal.7) Here is a version of Shakey's word consisting of four room lined up along a corridor. Uncertain Reasoning. showing both ordering constraints and causal links. (a) Let CC denote a credit card that the agent can use to buy any object. where each room has a door and a light switch.2 (R&N 11. push moveable objects (such as boxes). Exercise 3. (b) Translate them into the STRIPS language.Exercise Set 3 Ls = lightswitch Ls4 Room 4 Door 4 Ls3 Room 3 Door 3 Corridor Ls2 Room 2 Box3 Room 1 Box4 Door 2 Box2 Ls1 Door 1 Box1 Suppose that: • There is a predicate at giving Shakey's current location. at(Shakey. In this exercise. the floor.box2. roomX) where x is a box.box3.  the doors (door1. • There is a predicate on.x) where x is a box. • Because Shakey is short. and that it is a precondition of Shakey moving from the current location to another location that Shakey is on the floor.box4). • There is a predicate in(x. Shakey can only turn a light switch on or off if Shakey is on top of a box that is at the light switch's location. the boxes (box1. the initial and final locations of box2 (box2start.box2end). (a) Describe Shakey's six actions in situation calculus notation.room2.room4).room3. or a door. Shakey can move to somewhere that is in the same room.door2.door4). To allow Shakey to plan a route from room to room. a light switch. • There are constants for the rooms (room1. (c) Construct a plan for Shakey to get box2 into room2 from the starting configuration in the following figure. we will look at planning in Shakey's world. a light switch. door3. a door. we will say that the door between two rooms is in both of them. . 3) Exercise 3.e.5 (R&N 15. striking only one in 10. Only the governor knows which one will be executed. and that the test if 99% accurate (i.1) For 15.12) Three prisoners.Exercise Set 3 (d) Suppose Shakey has n boxes in a room and needs to move them all into another room. The good news is that this is a rare disease.4 (R&N 14.7 . A. Exercise 3. the starter motor is what the battery causes to turn over.6 (R&N 15.' The guard agrees. the doctor has bad news and good news. What are A's chances of being executed. The bad news is that you tested positive for a serious disease. which in turn results in ignition of the engine. given this information? Exercise 3. and then take a message to one of my friends B and C to let him know that he will be pardoned in the morning. assume that icy weather affects the petrol (frozen fuel line) and the battery.3) After your yearly check-up. B and C. It is common knowledge that one of them will be executed the next day and the others pardoned. What is the complexity of the planning process in terms of n? Exercise 3.3 (R&N 14.000 people.99.. the probability of testing positive given that you have the disease is 0. Why is it good news that the disease is rare? What are the chances that you actually have the disease? Exercise 3. are locked in their cells.1(a) In case you don't know much about cars (I don't!) . and comes back later and tells A that he gave the pardon message to B. Prisoner A asks the guard a favour: "Please ask the governor who will be executed. as is the probability of testing negative given that you don't have the disease). Factors which the doctor may take into account include the results of an x-ray (if it is cancer. the x-ray will be positive 95% of the time. and cough. +ve­Xray. bronchitis. Model this diagnosis problem in a Belief network with Boolean variables for smoker.3) Draw a decision tree for deciding whether or not to move forward at a road intersection given that the light has just turned green? . This cough can either be a symptom of bronchitis or lung cancer. and whether or not the patient is a smoker or not (twice as many smokers as non-smoker will have cancer).Exercise Set 3 Suppose that a patient turns up with a cough. cancer. and if there is no cancer the x-ray will always be negative).8 (R&N 18.   Exercise 3. The possible values of these attributes are as follows. the size of the office. Finally. Room# 307 309 408 415 509 517 316 420 status academic general academic student general academic student general floor three three four four five five three four dept ee ee cs ee cs cs ee cs size large small medium large medium large small medium recycling bin? no no yes yes no yes yes no (a) Develop a decision tree. D2. for the problem (i. what does it tell us about medium-sized offices housing ee students? (b) Develop a two-node decision tree. general. five) {ee. Allen and Aloimones "Artificial Intelligence: Theory and Practice") Suppose we have a cleaner robot that roams the top three floors of a university building collecting trash and looking for recyclable materials. How useful is this for generalizing to new examples? For instance. For a given office it might know the following information: the status of its occupants. student} {three.9: Robot Cleaner Problem (taken from Dean.e. Show the decision tree with the examples at the leaves after the first attribute has been chosen. the floor that the office is located on. The robot is trying to learn which offices have recycling bins. a decision tree that only uses 2 of the 3 attributes) with the attributes status and department. (c) Describe a test example for which both D1 and D2 give the correct classification. Can you find a second test example for which one of the decision trees gives the correct classification and one gives the wrong classification? Use the following format to describe your test examples. re-draw the decision tree with just the class names at the leaves. for the problem starting with the attributes size and department. Attribute Status floor department size Values {academic. and then again after the second attribute has been chosen. cs} {large. the department that its occupants are associated with. D1.Exercise Set 3 Exercise 3. medium. small} Suppose we have the following training set. four. Test room status floor dept size recycling bin? . 1.Exercise Set 3 Also: Russell and Norvig: 19. 19.6 .3. 19. but the cartridge is fine. replace the cartridge if necessary. (a) Describe the domain. hasCartridge. i. (2) its replaceable cartridge is spent. (10 marks) (b) Describe the domain using STRIPS operators. Be sure to include the preconditions and effects in your diagram. Then redraw the plan. and then reset the machine. Suppose that the only reasons for the copier not working are that (1) its paper storage tray is empty. replace. or (3) it experienced some momentary hardware or software problem and needs to be reset . and the robot must have some paper. To replace the cartridge. Construct a plan to achieve the goal using these STRIPS operators and a partial order planner.Exercise Set 3 1996 Question 5. and the robot must have a replacement cartridge. one for each action. The vocabulary you will use includes the predicates emptyTray. the robot must be at the copier. showing only the final execution partial order. The standard practice for fixing the copier is to fill the paper tray if it is empty. (8 marks) (c) Suppose that the robot comes to repair the copier and finds that it is not working because the tray is empty. To fill the paper tray. For each temporal link. Show the causal and temporal links in the final plan. and reset . the tray must be empty. the robot must be at the copier. as well as the results of all 4 actions. in no more than 4 lines. (8 marks) Start fill replace reset Finish (d) Explain. Representation and Planning (Total 30 marks) A copier in an office building is not working and the robot is given the goal of fixing it. Here is an outline of the plan you will draw. The actions are fill. atCopier. spentCartridge. the relative advantages and disadvantages of using situation calculus and STRIPS for describing planning problems? (4 marks) . the paper tray must not be empty. in situation calculus notation. To reset the machine. in need of replacement. and working. including the frame rules and the goal. describe the clobbering situation (causal link and clobberer) that it is avoiding. and the cartridge must not be spent. hasPaper. the cartridge must be spent.e. finishing with the goal state: {bike(b). you’ll probably find predicates such as wet. There are a number of conditions these operators must satisfy. it is wet and no longer dirty.X) PRECOND: bike(X). dirty(c)} show how a partial-order planner would construct a partial-order plan for oiling the chain. A chain is oiled while it is attached to the bike. unattached(Y) EFFECT: attached(Y. not dirty and not wet). chain(Y). That is. Start remove(c.Exercise Set 3 Question 3 1998 Exam. Besides the predicates used in the remove and attach operators. attached(Y. Planning (Total 24 marks) Consider the design of a robot that can service bicycles. (6 marks) (b) Starting with the initial state: {bike(b). Write planning operators for the clean and oil actions. dirty and oiled useful. Among the many different tasks the robot needs to be able to carry out is servicing the chain.X).b) Finish (Question 3b continued on next page) (i) Draw the final plan showing the causal and temporal links.X) PRECOND: bike(X). 4. oiled(c)}. which may require it to be removed from the bike. 3. chain(Y).X) EFFECT: attached(Y. chain(c).b) clean(c) oil(c) attach(c.e. attached(c. Before we oil a chain it must be both clean and dry (i. The following STRIPS planning operators are used for removing and re-attaching chains to and from bikes: OP(ACTION: remove(Y. unattached(Y) ) Further operators are required for clean and oil.X). 2. 1. Here is an outline of the plan you will draw. (10 marks) . using the STRIPS notation. unattached(Y) ) OP(ACTION: attach(Y. chain(c). Be sure to include the preconditions and effects in your diagram.b). After cleaning a chain. (a) We should only clean a chain if it is dirty and if it is not attached to anything. This mainly involves having to clean and oil the chain. height. fair) {blue. D gives the correct classification. (6 marks) . hair colour and eye colour. Note that Y1 should not be exactly the same as any of the X1 to X8original data items. since if you choose the wrong attribute as one of the two attributes. Use the following format to describe your test examples. and then again after the second attribute has been chosen. (4 marks) Question 1 1997 Exam. short} {dark.e. it gives the wrong. for the problem (i. such that for one example. D. (18 marks) (e) Describe TWO new test examples.(4 marks) Give a definition of the Frame Problem and describe briefly (in a few lines) how the STRIPS planning system handles this problem. re-draw the decision tree with just the class names at the leaves.Exercise Set 3 (ii) (c) At some stage you will run into a problem that prevents you from constructing a complete plan . Short Answers (e) Draw a diagram of a simple feed-forward neural network with hidden nodes. Attribute Height Hair Eye Values {tall. while for the second example. What are networks without hidden units called? (4 marks) Question 5 1998 Exam. The possible values of these attributes are as follows.what is this problem and what do you need to do to remove it? (Just describe briefly. a decision tree that only uses 2 of the 3 attributes). Choose the attributes carefully. Learning (Total 24 marks) Suppose we have a group of 8 people who can be described by three attributes. Show the decision tree with the examples at the leaves after the first attribute has been chosen. you won’t be able to develop a two-node decision tree. red. Finally. in a couple of lines. what is needed to fix the problem). brown} The training set is as follows: Example X1 X2 X3 X4 X5 X6 X7 X8 Class + ­ + ­ ­ + ­ ­ Height short tall tall short tall tall tall short Hair fair fair red dark dark fair dark fair Eyes blue brown blue blue blue blue brown brown (d) Develop a two-node decision tree. Exercise Set 3 Test Examples Y1 Y2 Class Height Hair Eyes D correct? YES NO .
Copyright © 2024 DOKUMEN.SITE Inc.