Computer Science 210 Lab 8
Due: November 13, 2:30

Mazes. The website Logic Mazes contains a number of fun and thoughtful puzzles. For this lab we are interested in the Theseus and the Minotaur puzzles. Your goal in this lab will be to solve the mazes with depth-first and breadth-first search. A running solution is in the Course Material folder along with two mazes to test it on. I am giving you the majority of the code for that solution in the "Theseus" folder also in Course Material, and your job is simply to write the two searches. As a side point of interest I have done some things with graphics in the project that advance what we have done in the past. These include: Java 2D drawing, doing an animation using a timer, putting buttons in a drawing window and using the layout capability of the JFrame.

Advice: You will need to use lots of my code. The place to start is understanding that code. For this phase of the project you can interact with your fellow students as much as you'd like. Then, concentrate on one of the searches first. I'd reccomend breadth-first because it is less likely to result in an infinite loop. In case you do hit one, learn how to use "Force Quit" from the Apple menu. The Algorithm Design book does contain discussions of both types of search.

The buttons on the top of the window in the running version are to choose several modes. Clicking on "breadth" or "depth" should move Theseus one step towards the solution using the results of the appropriate method. Repeatedly clicking them will give you the full solution. "Animation" animates the process using breadth-first search. You can stop the animation by pressing "User". That way you could, for example, attempt to finish a partial solution.