This project is a Boggle word solver implemented in Elixir.
Given a letter board and a dictionary of valid words, the solver efficiently finds all possible words that can be formed according to Boggle rules, returning both the words and their coordinates on the board.
- Full Boggle Search β Works for any NxM board size (tested from
2x2up to16x16). - Dictionary-Based Validation β Uses preloaded word lists to ensure valid words only.
- Coordinate Tracking β Returns the exact path for each found word.
- Optimized Search β Utilizes prefix pruning to avoid exploring invalid word paths.
- Extensive Test Coverage β Multiple test boards with scoring validation.
- Load Dictionary β The solver reads a
.txtword list into aMapSetfor O(1) lookups. - Generate Prefix Map β A helper map of all possible word prefixes is built to allow pruning of invalid search paths early.
- DFS Search β For each board cell:
- Start building words character by character.
- Stop exploring if the current prefix does not exist in the prefix map.
- Record the path if the built word exists in the dictionary.
- Return Results β A map of
{ word => [coordinates] }is returned.
mix deps.get