Wordle: so hot right now
Like most people, I am captivated by wordle. It’s a fun exercise. Especially on a bus. Because it’s simple enough and working with a finite set of data, I wanted to programmatically explore the data space. So, two things came to mind:
- Is there a way to rank words in order to suggest the best starting word?
- Can I build a simple solver that suggests words given letters known to be in the word, the position, and letters not in the word?
V1.0
I use python, pandas, and NumPy to determine the top starting word and the solver. I make use of all five-letter words as found in the list of words in my finding anagrams workshop.
V1.0 is feature complete. Both the top starting word and solver work correctly. To determine the top starting word, I counted the occurence of each letter across all five-letter words in my list of 9,972 words. Each letter is then assigned this score. The score of each word is the sum of each letter’s score in the word. The higher the score, the better the word is to use as a starter. Using this metric, ‘raise’ is the best word to start with. In addition, this metric is the quickest way to remove possible words.
The five most common letters in five letter words are:
‘a’, ‘e’, ‘r’, ‘i’, ‘o’
Four vowels and one consonant. Makes sense…
The ten best starting words/word groups with five unique letters are:
- [‘aries’, ‘arise’, ‘raise’, ‘serai’]
- [‘arose’, ‘oreas’]
- [‘ariel’]
- [‘leora’]
- [‘erian’, ‘irena’, ‘reina’]
- [‘arite’, ‘artie’, ‘irate’, ‘retia’, ‘tarie’]
- [‘orate’]
- [‘arles’, ‘arsle’, ‘laser’, ‘seral’, ‘slare’]
- [‘anser’, ‘nares’, ‘rasen’, ‘snare’]
- [‘aster’, ‘serta’, ‘stare’, ‘strae’, ‘tarse’, ‘teras’]
V2.0: TBD
Create a web-based interface to interact with the solver. Solve edge cases.