Docsity

Artificial Intelligence Homework Set 2: Solving Puzzles and Problems, Assignments of Computer Science

Toggle sidebar
bg1
CPSC 5185 Introduction to Artificial Intelligence
Homework Set 2 Due Thursday, September 29, 2005
1. This problem asks you to examine an instance of the 8–puzzle (see page 65 of the text)
and to draw a search tree for the solution. Here is the problem instance.
a) How many moves are legal for the first move?
b) How many numbers are “out of place” in the sense that they must be moved to
attain the goal state?
c) Draw the complete search tree, down to a level at which a solution is found.
Note that this can be done in two moves, so that the tree has the root and two
levels. Please try to be neat.
2. (Similar to 3.9 on page 90) The missionaries and cannibals problem is usually stated as
follows. Three missionaries and three cannibals are on one side of the river, along with a
boat that can hold at most two people. Find a way to get everyone from one side of the river
to the other side of the river, without leaving any group of missionaries (on either side of the
river or in the boat) outnumbered by the cannibals in that place.
a) Devise a way to describe the states of the puzzle and the moves between the states.
Note that it is not necessary to consider times in which people are in the boat and
in transit across the river. Describe the banks as “left bank” and “right bank”.
b) In terms of these descriptions, specify the start and final state.
c) Do a Web search, find a single article on this problem, and write a one paragraph
comment on the article. Show that you understand the article.
d) Why do you think that many people have difficulty solving the problem, given
that the state space is so simple?
3. Any solution to the eight–queens problem can be expressed as a permutation of the
integers 1 through 8. One solution is (5, 2, 8, 1, 4, 7, 3, 6).
a) Use simple symmetries to generate three other solutions to the problem.
4. Do a web search on the eight–queens problem. Find two solutions to the problem that are
distinct from the solutions discussed in the previous problem.
5. A rook is a chess piece that can move only on straight lines (along rows and columns)
but not along diagonals. How many solutions exist to the eight–rooks problem?
You can get this problem by simple mathematics, with no search trees drawn.

Partial preview of the text

Download Artificial Intelligence Homework Set 2: Solving Puzzles and Problems and more Assignments Computer Science in PDF only on Docsity!

CPSC 5185 Introduction to Artificial Intelligence

Homework Set 2 Due Thursday, September 29, 2005

  1. This problem asks you to examine an instance of the 8–puzzle (see page 65 of the text) and to draw a search tree for the solution. Here is the problem instance. a) How many moves are legal for the first move? b) How many numbers are “out of place” in the sense that they must be moved to attain the goal state? c) Draw the complete search tree, down to a level at which a solution is found. Note that this can be done in two moves, so that the tree has the root and two levels. Please try to be neat.
  2. (Similar to 3.9 on page 90) The missionaries and cannibals problem is usually stated as follows. Three missionaries and three cannibals are on one side of the river, along with a boat that can hold at most two people. Find a way to get everyone from one side of the river to the other side of the river, without leaving any group of missionaries (on either side of the river or in the boat) outnumbered by the cannibals in that place. a) Devise a way to describe the states of the puzzle and the moves between the states. Note that it is not necessary to consider times in which people are in the boat and in transit across the river. Describe the banks as “left bank” and “right bank”. b) In terms of these descriptions, specify the start and final state. c) Do a Web search, find a single article on this problem, and write a one paragraph comment on the article. Show that you understand the article. d) Why do you think that many people have difficulty solving the problem, given that the state space is so simple?
  3. Any solution to the eight–queens problem can be expressed as a permutation of the integers 1 through 8. One solution is (5, 2, 8, 1, 4, 7, 3, 6). a) Use simple symmetries to generate three other solutions to the problem.
  4. Do a web search on the eight–queens problem. Find two solutions to the problem that are distinct from the solutions discussed in the previous problem.
  5. A rook is a chess piece that can move only on straight lines (along rows and columns) but not along diagonals. How many solutions exist to the eight–rooks problem? You can get this problem by simple mathematics, with no search trees drawn.