Stay up to date with notifications from The Independent

Notifications can be managed in browser preferences.

Wordle solution can be perfectly guessed in one go using other players’ tweets, programmer finds

Using people’s scores on Twitter, it is possible to guess the word in only one attempt

Adam Smith
Friday 28 January 2022 13:34 GMT
Comments
(Getty Images)

A programmer has devised a way of guessing the Wordle solution on the first attempt, every time.

The aim of Wordle is to guess a mystery five-letter word, known as the “wordle” in six tries.

After each guess, the colour of the tiles will change to reflect how close your guess was to the word.

Ban Hamner posted his method on Kaggle, explaining how he used the squares posted on social media – which players use to denote their attempts and score – as a method to work out the word.

“The Wordle source code contains 2,315 days of answers (all common 5-letter English words) and 10,657 other valid, less-common 5-letter English words.

We combine these to form a set of 12,972 possible words/answers”, he wrote.

He then uses three measures to observe the distribution of black, yellow, and green squares – referring to an incorrect letter, a correct letter in the wrong place, and a correct letter in the correct place, respectively.

“The first is the frequency of each of the 243 possible 5-square combinations in the observed/simulated games. We rank all the valid words by cosine similarity between the simulated and observed distributions.

“The second looks at the fraction of these 5-square combinations that occur right before the correct guess. Again, we rank valid words based on the cosine similarity distance between the observed and simulated distributions.

Finally, based on the valid words there’s invalid 5-square combinations for each possible answer. We rank valid words on the number of these invalid combinations we observe. Twitter data being noisy, there’s usually some invalid combinations for the correct answer.”

Mr Hamner than generates a guess by using the word with the best average rank across these three metrics – reportedly generating the correct answer on the first try every day.

This is not the only investigation into Wordle words made recently; software engineer Robert Reichel discovered that the word for each day is embedded in the page, with 2315 words to choose from in total.

“Wordle doesn’t make any web requests when verifying your answer - Everything is client-side”, Mr Reichel wrote.

“The word of the day doesn’t get embedded in page load - It’s derived from the wordlist somehow.”

Finding the functions in the source code, Mr Reichel was quickly able to calculate how Wordle was selecting new words.

Join our commenting forum

Join thought-provoking conversations, follow other Independent readers and see their replies

Comments

Thank you for registering

Please refresh the page or navigate to another page on the site to be automatically logged inPlease refresh your browser to be logged in