One basic need is to filter my dictionary file to remove impossible words (or find impossible words), based on the number of tiles for each letter. Assume whatever dictionary structure you like, as well as the tile count list or structure of your choice. Assume blank tiles are a non-alpha character, such as '#'.
Challenge 1: Ignoring blank tiles, write a code snippet to efficiently match possible (or impossible) words in the dictionary.
Challenge 2: Modify #1 for blank tiles.
Bonus Challenge 3: Design a dictionary structure that enables efficient searches for puzzles, while minimizing space. For example, I have 5 tiles in @my_tiles, a given board partial row @this_row, which will have at least 1 tile placed, and possibly more, along with at least 1 blank space. The dictionary structure should make it easy to find all words that will fit in this partial row, using tiles from @my_tiles.
-QM
--
Quantum Mechanics: The dreams stuff is made of
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Scrabble Word Regex Challenge
by kyle (Abbot) on Sep 12, 2007 at 16:35 UTC | |
by QM (Parson) on Sep 18, 2007 at 14:34 UTC | |
|
Re: Scrabble Word Regex Challenge
by goibhniu (Hermit) on Sep 12, 2007 at 17:31 UTC | |
|
Re: Scrabble Word Regex Challenge
by Anonymous Monk on Sep 24, 2007 at 15:06 UTC |