Welcome to Boggle
Quick start play, simply invoke from command line:
$ boggle --minwordlength 3 --maxwordlength 9 cat dog hog
This command will find all 3, 4, 5, 6, 7, 8 and 9 letter words that exist within the boggle grid.
Modify behaviour with the following command line options:
--minwordlength ... set the minimum length of found words (default 3) --maxwordlength ... set the maximum length of found words (default 9) --overwrite ... recompute board objects and replace existing data file --nodisplay ... do not display found words on screen (False) --filename ... filename of output (boggle_words.tsv) --charts ... export boggle board picture (False) --debug ... return objects when running in python interpreter (False) --use-legacy ... use the legacy networkx-based implementation (slower)
Note that the longer the word, the longer the run time, and the bigger the data file.
By default, the application now uses an optimized trie-based algorithm for finding words, which is significantly faster than the original networkx-based implementation. If you need to use the original implementation, you can use the --use-legacy flag.
Performance improvements:
- Uses a trie data structure for efficient word prefix lookups
- Employs depth-first search directly on the grid
- Eliminates the need to build directed graphs for each origin point
- Optimized for multicore processing
Output file displays the found words, alphabetically ordered by length, in three columns. First column contains the length, second column is the word, and the last column provides the coordinates of the word path. Coordinates are in XY format:
Length Word path 3 cat ((0, 2), (1, 2), (2, 2))
Output file will be written to the directory in which boggle was executed.
Install with Poetry (recommended), pip, or directly from GitHub:
# Using Poetry (recommended) poetry install # Using pip pip install git+https://github.com/ian1roberts/boggle.git