8-puzzle is a board game with tiles numbered 1 through 8 located on a 3x3 grid, leaving one space blank. Tiles adjacent to the blank space can be slid into it vertically or horizontally. The goal of the game is to reach the following board position:
1 | 2 | 3 |
8 |   | 4 |
7 | 6 | 5 |
Each state in the state space corresponds to a particular position on the board. There are four operators, corresponding to the blank space moving up(U), left(L), down(D) or right(R). For questions 1 and 2, start from the following board position:
1 | 3 | 4 |
8 | 2 |   |
7 | 6 | 5 |
Let the operators be evaluated in the following order:
i. D
ii. U
iii. L
iv. R
When you draw your search trees, draw the board configuration at each node to represent the state at that node. Note that expanded is different from generated; expansion occurs when a node's successors are generated. Also remember that you don't need to generate states that have already been generated, i.e. assume all repeated states are detected and removed. Except for A* (question 4), you can assume that a goal state is detected (and the search terminated) the instant the goal state is generated. You do not need to wait until it is eventually expanded to notice that it is a goal. For A* (and uniform cost), to ensure optimality, it is important NOT to stop when a goal is generated but to wait until it is actually chosen for expansion. This is to avoid the situation where a goal is first generated via a non-optimal path.
For questions 3, 4, and 5, start from the following board position:
1 | 2 | 3 |
6 |   | 4 |
8 | 7 | 5 |
Let the operators be evaluated in the following order:
i. U
ii. D
iii. L
iv. R