Presentation is loading. Please wait.

Presentation is loading. Please wait.

Assignment 2 (from last week) This is a pen-and-paper exercise, done in the same groups as for Practical 1 Your answer can be typeset or hand-written There.

Similar presentations


Presentation on theme: "Assignment 2 (from last week) This is a pen-and-paper exercise, done in the same groups as for Practical 1 Your answer can be typeset or hand-written There."— Presentation transcript:

1 Assignment 2 (from last week) This is a pen-and-paper exercise, done in the same groups as for Practical 1 Your answer can be typeset or hand-written There are three questions on searching, covering material from Lectures 6, 7 and 8 (search) Deadline: 5pm, Monday 20th March 2006 Please hand in a printed or hand-written copy to my office (L13.21)

2 Question 1 Consider the following puzzle. You have 8 sticks, lined up as shown below. By moving exactly 4 sticks you are to achieve the configuration shown at (b). (a) (b)

3 Question 1 Each move consists of picking up a stick, jumping over exactly two other sticks, and then putting it down onto a fourth stick. In the figure below, stick e could be moved onto stick b or h, whereas stick f cannot move at all: a b c d e f g h

4 Question 1 a.Decide on a notation for representing states which you could use in state space search. b.Using this notation, map out the search space (states which are essentially identical due to symmetry need not be included). c.Apply the uninformed search algorithms (depth-first and breadth-first search) to the search tree. How many nodes do they search? How large does the agenda grow for each form of search? d.Why is the problem solved so much more easily if you search backwards from the goal state?

5 Question 2 A farmer needs to get a fox, a chicken and some corn across a river using a boat. The boat is small and leaky and can only take the farmer and one item of cargo. If the farmer leaves the fox and the chicken together, the fox will eat the chicken. If the farmer leaves the chicken and corn together, the chicken will eat the corn. Leaving the fox and corn together is fine. How can the farmer get all three items across the river?

6 Question 2 a.Decide on a notation for representing states which you could use in state space search. b.Give details of all the move operators for the search. Make sure that the operators only allow legal moves (i.e. ones which are physically possible and result in states in which no item of cargo gets eaten). c.Using your representation and operators, map out the search space for this problem. Is there more than one possible solution to this problem?

7 Question 3 Consider the following game for two players: There are 8 sticks on the table Players take turns at removing 1, 2 or 3 sticks The aim is to make your opponent take the last stick Example:

8 Question 3 a.Draw out the game tree for 8 sticks. Is this a win for the first player or the second player? b.If the first player’s first move is to take 2 sticks, what move should the second player make? c.What should the first player’s strategy be in the case where there are N sticks in the start state? For what values of N can the second player achieve a win?


Download ppt "Assignment 2 (from last week) This is a pen-and-paper exercise, done in the same groups as for Practical 1 Your answer can be typeset or hand-written There."

Similar presentations


Ads by Google