Project 3: Word Finder

Due: Tuesday, November 7, 11:59 PM

Quick Links

Updates

Project Overview

You will write a parallel solver for a word game. In the game, you will be given a grid consisting of letters from an alphabet, along with a dictionary that defines what sequences of letters constitute words. Your solver will attempt to find paths in the grid such that the letters in the path constitute a word in the dictionary. The longer the word, the more points you get. No paths are allowed to intersect (i.e., share letters) and no path can overlap with itself; if this happens, you will lose points for those paths. Your solver will be given a fixed time budget to complete, so your goal is to maximize your score within the given time frame.

General Requirements

The design of your algorithm is up to you. You may implement any new classes you like, and you must complete the implementation of the GridSolver class, in particular its solve method. The following classes are provided, and should not be changed:

Your code will be tested as follows:

The public tests we provide have several small sample grids and dictionaries. You will probably want to make a program to generate your own grids that are larger, for testing purposes. The secret tests will use larger grids and different, larger dictionaries.

Particulars

Getting Started

Begin by downloading the project zip file here: Skeleton Eclipse project (or just the code). The directory structure of the zipped folder should allow the existing code to be directly imported into the Eclipse IDE. Note that all code is part of the cmsc433.p3 package, and you should preserve this package structure even if not using an IDE. After downloading the source, familiarize yourself with the above requirements while looking at the skeleton code, and the javadocs found here (and also in the zip file): API Specification.

Testing Your Code

The file Test.java implements a graphical presentation of the Grid and the solving algorithm. You can set the time limit using the slider, and you can decide whether or not it will depict a single-threaded solution, along with your multi-threaded one. To change the grid and dictionary used you need to change the GRIDNAME and DICTNAME constants at the top of the Test class. Beware: it runs rather slowly with large grids (e.g., of size 200x200 or more).

As mentioned above, we recommend that you write files to generate grids to test with, so you can try out your code on larger files. You should also test on a machine with multiple processors. The linuxlab machines typically have four cores, so they are good candidates. On these machines, Java 7 is installed in /usr/local so that you can execute it from /usr/local/jdk-1.7.0_45/bin. The default Java is version 6; it lacks some nice concurrency features, e.g., from the Fork/Join framework.

What to Turn In

Every file you submit should have your name and UID. To enforce academic integrity, Code WILL BE CHECKED for similarity to other submissions. Each student should make his or her own individual submission.

Submit your code on the Department's Submit Server. Contact the TA if you have any troubles submitting.

You are also required to submit a short "design document" describing the design choices you made in your algorithm. Explain the basic structure of how you break down the overall task into units of work and how you organize that work to involve multiple threads.

Contest

The authors of the best-scoring implementations will receive T-shirts of their choosing. Starting next week we will post a "leader board" that shows the best implementation scores. The best scorer(s) at the deadline will be declared the winners.

For this project, due to the freedom we've given you with design, your design document should also include a comprehensive test plan. The test plan should describe how you tested each piece of functionality in your code. You may also include any tests that you've written and instructions on how to run these tests.

Web Accessibility