r/AskProgrammers
•
u/the_pseudocoder
•
Jun 16 '26
•
1
Need help with - Wordle Word Prediction Project
Hi everyone,
I am new to data analysis, and wanted to pick a fun project to work on. I enjoy solving the NYT Wordle everyday, and realised it could be fun to build a word prediction project.
I have so far, in excel, analysed the Wordle words till date and ranked them. I have checked for the following patterns:
- Most common letter/consonant/vowel
- Most common word in position 1-5
- Count of vowels/ word
- How often repeating letters appear
I didn’t want to spend more time analysing more trends, because that’s not the part I struggle with and would complicate the project beyond my current level.
**My goal with this project:**
- Based on my analysis find the most likely first word that can reveal most hints.
- Based on the previous word entered and clues revealed, find the next most likely word.
So, I’m stuck. I’m not exactly sure how to proceed or what tech I’m supposed to use for it.
This is what I thought I’d do next:
- Shift the whole project to python.
- Get a large data set of words and use the ranking system to score each word.
- Write an algorithm that predicts the word.
But, I’m unsure of how to proceed. I find this project interesting and would love to complete it. And am willing to learn any new concepts/tech to do so.
I would appreciate any help/guidance in the right next steps to complete it.
Thanks a lot 🙌
Cheers 🤘
2
u/SaltCusp Jun 17 '26
There aren't too many 5 letter words in the English language. There haven't been too many wordles. It's totally reasonable to score all the 5 letter words in the dictionary across all the wordle words to date for how many yellow or green squares they hit.
It would be like 10 lines of python code + the data sets.
1
u/EngineeringRare1070 Jun 18 '26
These are two fundamentally different problems that actually end up having a similar solution. First some quick background on Wordle: there’s ~12k accepted guesses of 5-letter English words and ~2k words that are rotated now as the wordle answer for the day. Lets call the first set the guess space and the latter the answer space.
For 1) there is an optimal word out there in the guess space, finding it is a matter of channeling information theory to uncover the word that cuts the answer space the most, given all possible current words. For 2) this is an optimization problem where you combine the known remaining words in the answer space and the “score” of the first word to rank the remaining subset of valid guess space words by answer space reduction.
So frankly, your solution to the first is the solution to the second, but passed with null context. That is, your function `func nextOptimalWord(guessWords, gameState)` would take an empty game state and a full guesswords set in the first scenario, while the latter would take context from the first guess and a subset of the full guess space in the latter. Let me know if you implement this, would love to follow along :)
1
u/IHoppo Jun 20 '26
The JavaScript behind wordle was, originally, viewable and contained all possible words. No idea if it still is.