The Random Thoughts of GeniusMusing

Just another random blog

08-52-2022-Solving a Wordle Puzzle, with Code

- Posted in 52Posts-2022 by

While I might be a little late to the Wordle trend but I do enjoy a good word puzzle. After giving it a try (and taking the full six tries to get the word) and seeing people posting about solving the word of the day in three to four guesses, I had to assume they had some help along with some luck. I tried a few different sites but they always seem lacking, partly I think to the number of words they are dealing with.

I am using a local saved version of the original Wordle, because the New York Times picked it up (for a low 7 figure sum) and has now started tracking you on it and I can only guess it will soon be displaying ads on it in the near future.

There are instructions on how to save it locally but you should use this link to get an archived copy that is the original version. It has no tracking, a single cookie and uses local storage to track your play.

I also run my own web server at home for development things and my choice to not use java script to help me solve the puzzles led me to use PHP for my solution.

Here is what it looks like from my server.

Start Screen

So it starts with all 2317 words that are in Wordle but arranged in alphabetical order so I have no idea where the current word is. If you saved the word list from the Wordle script and find yesterdays word, the next word is today's word and what fun would that be. So you guess a word then fill in the blanks on the solver and see what words remain. The odds of solving this in one try are 1:2317 or 0.0431%.

First Word

Down to 318 words and only one letter is correct but in the wrong location. Lets make a second guess from the words available. The odds of solving now are 1:318 or 0.3135%

Second Word

No new letters found but four more eliminated and now the word list is down to ten words. Next guess. And I do mean guess. the odds of solving now are 1:10 or 9.0909%

Third Word

Great guess! I solved it but lets rewind and choose a different second word.

Fourth Word

Pretty much a gimmme, there is only one word to pick from but let's finish.

Fifth Word

I actually got more fun and pleasure from writing/solving the coding puzzle to solve the Wordle puzzle than actually solving the Wordle puzzles themselves.

Wordle Original 245 4/6

⬛⬛⬛⬛🟨
⬛⬛⬛🟩⬛
🟨⬛⬛🟩🟩
🟩🟩🟩🟩🟩

At least this kept me happy and busy for several nights.