UMBC CMSC 202
UMBC CMSC 202 CSEE | 202 | current 202

CMSC 202 - Project 4

This isn't your Parents' Maze Solver

Assigned Sunday April 16, 2006
Design Due Saturday April 22, 2006 at 11:59 pm
Program Due Sunday April 30, 2006 at 11:59pm
Updates

Objectives


General Project Description

As an employee of Childrens' Games, Inc., you have been tasked with the responsibility of demonstrating that all of the mazes that have been generated for the new Maze & Puzzle book are indeed solvable. It is your responsibility to double-check each maze that the application generated so that children around the world will have brighter lives when they receive the Maze & Puzzle book as a gift.

Project Description

In this fourth iteration of the Maze Solver system, you will be required to use inheritance and polymorphism to implement a variety of maze-solving strategies. Your Maze Crawler will be extended through inheritance and polymorphism to use three (or more...) different strategies for solving mazes. At the most basic level, you will be required to use the right-hand rule, the left-hand rule, and a random algorithm to determine if a maze is solvable. If you choose, the extra credit will extend the Maze Crawler's actions to use one or two strategies for finding the shortest path through the maze and determining if the maze is solvable.

Functional Description

Basically, the functional requirements are the same from Projects 1-3. However, in order to allow for the extra credit to be slightly more interesting, there are a few modifications to the maze guarantees.

Modified Maze Guarantees

Functional Modifications

Your application's primary functionality must be modified to do the following:

Design and Implementation Requirements

You are not required to maintain the overloaded operators or dynamic memory requirements from previous projects. However, we will look for the Big-Three to be implemented on ALL classes that USE dynamic memory. You MUST use a dynamically created Maze Crawler object in order to ensure that polymorphism is being used.

Inheritance

You are required to add 3 (or 4 or 5 for the extra credit) Maze Crawler classes to your existing application. You should create new Maze Crawler classes that derive from a common Maze Crawler base class.

For the Right-Hand, Left-Hand, and Random Crawlers, when the crawler returns to the start, you can assume that the maze is unsolvable. For the extra credit crawlers, the algorithm will exhaustively search until an end is found.

The new Maze Crawlers are defined as such:

Polymorphism

Throughout the above Crawler classes, you must implement at least one virtual method and at least one pure virtual method. Each must demonstrate the power of polymorphism by taking advantage of the fact that you can have methods with the same signature with different implementations at the derived-class-level.

You will not receive full-credit for your polymorphism implementation if your classes do not group common actions at the base-class level and limit derived-class specific implementation to the derived-class level. Make intelligent decisions about where to include functionality. We will be looking to see that all common methods are implemented at the base-class level while derived-specific methods are implemented at the derived-class level.

You MUST use polymorphism to dynamically call the maze solving algorithm on a Crawler object (hint: use a base-class pointer to a derived-class object).

Obviously, there are many design-issues that we have left to you to decide what is the best way to implement this collection of classes. Remember to take advantage of code you have already written, "Great software developers reuse" [paraphrased from the Cathedral and the Bazaar]. We will be looking to see that you have reused code appropriately and limited the amount of code that you must rewrite throughout your inheritance hierarchy.

Short-hand requirements:

Extra Credit

Breadth-First Crawler (10 pts)

Implement a Crawler that uses a breadth-first algorithm to determine what is the shortest path. Additional details are defined above.

Depth-First Crawler (10 pts)

Implement a Crawler that uses a depth-first algorithm to determine whether a maze is solvable. Additional details are defined above.

General Tips


Project Design Assignment

Your project design document for this project must be named p4design.txt. Be sure to read the
design specification carefully. Submit your design in the usual way: submit cs202 Proj4 p4design.txt Remember - the design is due ONE WEEK before the project. Late designs will not be accepted.

Project Makefile

The "make" utility is used to help control projects with large numbers of files. It consists of targets, rules, and dependencies. You will be learning about make files in lab. For this project, the makefile will be provided for you. You will be responsible for providing makefiles for all future projects. Copy the file makefile from Ms. Wortman's public directory to your directory.

When you want to compile and link your program, simply type the command make or make Proj4 at the Linux prompt. This will compile all necessary .cpp files and create the executable named Proj4.

The make utility can also be used for compiling a single file without linking. For example, to compile Proj4.cpp, type make Proj4.o.

In addition to compiling and linking your files, make can be used for maintaining your directory. Typing make clean will remove any extraneous files in your directory, such as .o files and core files. Typing make cleanest will remove all .o files, core files, Proj4 executable and backup files created by the editor. More information about these commands can be found at the bottom of the makefile.

You MUST use the /usr/local/bin/g++ compiler to compile and build each file. Do not depend on setting your default compiler to be this compiler, the grader may use a different compiler. There are two compilers on the GL systems, and you are required to use the one located at /usr/local/bin/g++. Also, you MUST be sure to use the same compiler for compiling ALL of your files - different compilers make different .o files and they will NOT play well together.


Grading

The grade for this project will be broken down as follows. A more detailed breakdown will be provided in the grade form you receive with your project grade.

85% - Correctness

This list may not be comprehensive, but everything on this list will be verified by the graders.

15% - Coding Standards

Your code adheres to the
CMSC 202 coding standards as discussed and reviewed in class.

Project Submission

Steps for Submission

  1. submit all files
  2. submitls to verify they are in the remote directory
  3. submitmake to build your files remotely
  4. submitrun to run your files remotely
Assuming you've used the recommended file names, then to submit your project, type the command submit cs202 Proj4 Proj4.cpp Proj4Aux.cpp Proj4Aux.h Makefile The order in which the files are listed doesn't matter. However, you must make sure that all files necessary to compile your project (using the makefile) are listed. You need not submit all files at the same time. You may resubmit your files as often as you like, but only the last submittal will be graded and will be used to determine if your project is late. For more information, see the projects page on the course website.

You can check to see what files you have submitted by typing

submitls cs202 Proj4

Be sure to build your project once it has been submitted using the submitmake command, so that you know that all of the files are there and are the most up-to-date versions:

/afs/umbc.edu/users/d/a/dana3/pub/CMSC202/submitmake cs202 Proj4

Test your program to ensure that all files are the most recent versions:

/afs/umbc.edu/users/d/a/dana3/pub/CMSC202/submitrun cs202 Proj4

Details on Submit Tools.

Remember -- if you make any change to your program, no matter how insignificant it may seem, you should recompile and retest your program before submitting it. Even the smallest typo can cause compiler errors and a reduction in your grade.

Avoid unpleasant surprises!

Be sure to use the submitmake and submitrun utilities provided for you to compile, link and run your program after you've submitted it.


Last Modified: Sunday, 16-Apr-2006 21:20:23 EDT