Boggle Solver
Boggle is a word game where players race to find
words hidden in a 4x4 grid of letters. From this site you can enter a Boggle
board and see the resulting solutions. The results are stored in a database.
To display a particular board, visit EnterBoard.aspx?BoardID=boardID&Length=length, where
boardID is the list of tiles in the Boggle board and length is the minimum number of letters
that must appear in a word to be considered a solution. To get the solutions in
JSON, visit Solver.svc?BoardID=boardID&Length=length.
For example, if you want to find all solutions with four or more letters using the board:
r e i b
t m f w
i r a e
r h s t
Simply visit EnterBoard.aspx?BoardID=reibtmfwiraerhst&Length=4
to see the solutions. To get the solutions in JSON, visit
Solver.svc?BoardID=reibtmfwiraerhst&Length=4
How It Works
The Boggle Solver loads in a dictionary of words from a text file into a
hashtable structure. The hashtable uses the first n letters of the word
as the key, where n is the minimum length of a word to consider. At each
hashtable bucket I store the list of strings that start with those n letters.
The solutions are found by starting at each of the 16 tiles and then recursively examining the
board for solutions. Because the same solution may be arrived at through different paths, duplicate
solutions are ignored.
For more information on this application, see my article:
Creating an Online Boggle Solver.