CompSci 100e: Program Design & Analysis II(Spring 2010) | |||||||||
| |||||||||
Boggle®You should snarf assignment boggle or browse the code directory and associated javadoc for code files provided. See the Boggle howto file for help and more instructions.After you snarf the assignment, move the .txt files (bogwords.txt and ospd3.txt) into the bin directory -- otherwise the code won't find them when it loads the lexicons. To move the files use the Window>Showview>Navigator menu sequence to get to the Navigator view. Then grab the .txt files with your mouse to move them into the bin directory.
Genesis of Assignment
Prof. Astrachan fondly
recalls neighborhood Boggle®
games from his childhood - long before the existence of personal computers
-
and was re-introduced to it on Sun Unix workstations as a grad student
in the mid 80's.
We used Boggle® for a
Compsci 108 assignment at Duke in 1996.
Boggle is in the Nifty
Assignments Archive and the current instantiation of the assignment
is a combination of efforts from Compsci educators at Duke, Stanford,
and UCSD. This version emphasizes empirical analyses of tradeoffs in
different implementations.
The Wikipedia Boggle entry explains the game in detail including popular culture references to Boggle. Reviewing the rules on the Wikipedia site will help in understanding the play-of-the-game, but you'll be looking at implementation trade-offs that are independent of game-playing. You can play games based on words that are similar to Boggle online, e.g., Facebook's Scramble and Yahoo! Word Racer both of which are definitely related to Boggle. Theoretical and practical approaches to word games have formed the basis for The World's Fastest Scrabble Program (Appel and Jacobson) for recognizing Genomic Signatures in DeBruijn Chains (Heath and Pati) and for An efficient interface between continuous speech recognition and language understanding (Oerder and Ney). Analyzing alternative implementations and algorithms will help inform a better understanding of both work and play, what a great way to build a foundation in understanding how to turn data into information. In particular you'll be examining alternate implementations of a lexicon or word source. You'll work on a Trie implementation and a compressed Trie that's similar to a Radix Trie/Patricia Trie, but simpler to implement. Tries are the data structure behind predictive text used in cell-phone texting, e.g., in T9 Text Input and have formed the basis for IP-routing, e.g., see Keith Sklower's Tree-Based Packet Routing Table for Berkeley Unix although changes to IPv6 may change the utility of tries as described here: Scalable high speed IP routing lookups (Waldvogel, Varghese, Turner, Plattner). You'll use different word-sources or lexicons. Apparently there's a controversy as to what the "best" lexicon is for playing word games like Scrabble® and Boggle®
What You Will DoYou'll code a class to find a specific word on a Boggle® board and you'll implement two hierarchies of classes. Each hierarchy will be a group of classes that implement a common interface and allow you to reason empirically about trade-offs in implementation techniques. You'll run code/experiments to reason about the classes you write.
Find Words on the BoardYou're given a classBadWordOnBoardFinder
that implements the IWordOnBoardFinder
interface. The bad word finder returns an empty list of BoardCell objects for any
query so no words will be found.
You'll implement the method
Details and more specifics for this part of the assignment are provided
in the howto pages in the section
on the
Implementing LexiconsDetails about the classes you write for this part of the assignment and help in writing them are provided in the howto pages for implementing lexicons.
You'll design and code three classes for this part of the assignment and you'll
analyze their performance empirically. You're given a JUnit testing class, In Boggle®, legal words are those found in the lexicon associated with a game. A lexicon is simply a list of words, it's not a dictionary because it doesn't have associated definitions for each word.
The ILexicon interface specifies the
methods exported by the interface which implementations must
provide. You're given an implementation
Implementing AutoPlayersDetails about the classes you write for this part of the assignment and help in writing them are provided in the howto pages for implementing AutoPlayers.
You'll implement two classes that find all the words on a Boggle board.
Each class uses a different technique and you'll analyze the runtime
tradeoffs in these techniques. You'll also reason empirically about the
performance of these two classes when they're configured with different
implementations of
One class,
Statistical and Empirical Analyses of BoggleYou need to report in your README file information about which Lexicon implementation is fastest. You should compare all the lexicons and report on their relative times --- you shouldn't simply say "this one is fastest". You should have at least three lexicons to test and four if you do the extra credit. You should explain the methods you used to determine this and report on experiments you run, giving times.
You must write code to play lots of auto-games, not games in which
humans play, but games in which all words are found on thousands of
boards --- see
GradingThis assignment is worth 40 points. There are correctness/algorithm points for the functionality of GoodWordOnBoardFinder, SimpleLexicon (minor), BinarySearchLexicon, and extra credit for the CompressedTrieLexicon. There are also correctness/algorithm points for both autoplayers. There are engineering points for how the game is played with all lexicons and autoplayers. There are analysis points for the analysis of lexicons and generating statistics for high-scoring boards.Your README file should list your testing results, all the people with whom you collaborated, and the TAs/UTAs you consulted with. You may want to include your testing and analysis results in a separate analysis document. You should include an estimate of how long you spent on the program and what your thoughts are about the assignment. Submit your README and all of your source code using Eclipse with assignment name boggle. |
|||||||||
| Last updated Wed Mar 17 13:22:20 EDT 2010 | |||||||||