Assignment 8 - Escape The Labyrinth!

The Background

A maze specification file has been read, analyzed and reprensented in the program with a Graph (See LabyrinthREADME.txt in the project). Each room has the type RoomCoornidates (see RoomCoordinate.java), Each path has the type Walkway (See Walkway.java).

The Assignment:

It is your job to write algorithms to help you wondering in the maze and compare the distance between the different ways.
  1. Depth first search
  2. Breadth first search
  3. Shortest distance
  4. total path distance

The Assignment Details:

  1. Complete dfsPath: Takes a starting and ending RoomCoordinate as parameters. It will calculate a path from the start to the end coordinate using a depth first search algorithm.
  2. Complete bfsPath: Takes a starting and ending RoomCoordinate as parameters. It will calculate a path from the start to the end coordinate using a breadth first search algorithm.
  3. Complete shortestPath: Takes a starting and ending RoomCoordinate as parameters. It will calculate a path from the start to the end corodinate using Dijkstra's Algorithm. In the case of a tie for the next shortest path, choose any of the shortest options.
  4. Complete totalPathDistance: This method takes a single parameter: "Sequence< Edge< Walkway > > path". This sequence is returned from one of the above methods (dfsPath, bfsPath, or shortestPath). It should return the total distance to travel on all the walkways stored in the edges.
  5. For all the three search algorithms, in the case of multiple paths being available, you should choose your next explored path in this order: NORTH, EAST, SOUTH, WEST. For example, if you come to a certain position and find that you can travel EAST or SOUTH, then choose EAST first.
  6. Use the following files for your testing. These are the files that you will be graded with.
    WeightedTinyLabyrinth.txt
    WeightedSmallLabyrinth.txt
    WeightedMediumLabyrinth.txt
    WeightedLargeLabyrinth.txt
  7. The test cases have been packed and configured with the project under tests folder.

You will need the following from previous assignment:

Getting Started (and Getting Finished - there is no resubmit for this one):

Download and import the following zip file: Assignment8.zip. For Eclipse:
  1. Open Eclipse
  2. Choose "File → Import"
  3. Select the "General" category
  4. Pick "Existing Projects into Workspace"
  5. Click on "Next"
  6. Select the button for "Select Archive File" and browse to/select the zip file.
  7. Click on "Finish"
  8. A new project SimpleMap has been added to the workspace

Submission:

Grading Criteria: