Program 3: The Eight Puzzle

Sample Solution and Test Data

Due Date

This assignment is due at the beginning of the lecture on Friday, November 9th.

Partners

Everyone is required to complete this assignment with one partner. Submit one solution with both of your names on it.

Purpose

The purpose of this assignment is to introduce you to the uninformed search technique, iterative deepening, in the context of solving the eight puzzle.

Coding Requirements

Sample Output

When the program is run by calling (test) in the analyze.l mentioned above, the output produced should be:

Start state: (0 1 2 3 4 5 6 B 7)
Goal state: (0 1 2 3 4 5 6 7 B)
Depth of nearest solution: 1

If I want to time your solution, I can modify the analyze.l file to call the solve function as follows: (time (solve start-state goal-state)). Sample output from this call might look like this:

Real time: 3.4E-5 sec.
Run time: 0.0 sec.
Space: 0 Bytes
Start state: (0 1 2 3 4 5 6 B 7)
Goal state: (0 1 2 3 4 5 6 7 B)
Depth of nearest solution: 1

The time of interest is the Run time as that measures the CPU time used. The Run time will typically be less than the Real time.

What to Submit

The following materials must be received no later than Friday, November 9th at 12:00 noon.

  1. A printout (not an e-mail) of the eight.l file.
  2. An e-mail of the eight.l file to John at paxton@cs.montana.edu

Grading

Valid XHTML 1.0!