The n-puzzle consists of n square tiles, labeled numerically from 1 to n. They are
arranged in a random ordering within a square tray that is just large enough to hold n+1
tiles (see fig. 1, n = 15). The tiles should then be slid around the tray until they are in
the correct ordering as shown in fig. 2, with the blank space at the bottom-right hand
corner. The tiles must not be picked out of the tray.
In this programming assignment you are asked to find the optimal solution using
A* of a n-puzzle, where n <= 128, if the n-puzzle is solvable. The solution is a set of
actions (the minimum number of moves) that need to be performed in order to solve the
puzzle
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
23 | 24 | 25 | 26 | 27 | 28 | 1 |
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 1 | 2 | 3 | 4 | 5 |
Get Free Quote!
394 Experts Online