Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anyone tried Wordle?

Status
Not open for further replies.

Mike Lewis

Programmer
Jan 10, 2003
17,508
Scotland
There seems to be a bit of a craze at the moment for Wordle. Has anyone here tried it yet? Here is the link.

It's very simple. You just have to guess a five-letter word, in a maximum of six attempts. After each attempt, it tells you which letters in your guess also appear in the target word, and which of those also match their position in the target word.

As far as I know, the game can only be played in a browser - there is no app for it (and no plans to create one, apparently). There is just one puzzle per day, and everyone who plays it that day sees the same puzzle.

Give it a try if you haven't already done so. And let us know what you think.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
I see, you can also only play it once per day, if you revisit it just shows your guesses.

I wonder how it become such a craze, it's perhaps a nice little motivation of the day, if you get it right with few tries.
I also see a "flaw": It switches once per day by your local clock. So you could easily cheat by setting time to the next day, also using a secondary browser for each first encounter and then solve it in your main browser with the time rest to normal by knowing the solution from your first try. That makes it a bit of a bummer to me. If you cheat that way you mainly cheat on yourself only, but if you see someone guessing every word in only two or three tries, I'd question them playing honestly.

I see no app, too. But the on screen keyboard can be used on any smartphone browser too, So that could contribute to the popularity, so many are in the internet on their phone or tablet only. Developers seem to be the last species of heavy desktop users.

Chriss
 
I solved today's puzzle in five guesses without help. For the record, my progress was

1. one letter right but out of place
2. two letters right but out of place
3, two letters right and in the right place
4. three letters right and in the right place
5. solved

My guess is that this game is solvable in the sense that there is likely to be an algorithm which will always produce the correct solution within the allowed six guesses. If so, I wonder how many guesses would be required by an optimal algorithm. Maybe five?
 
There we are back to making use of the English dictionary, perhaps.

You can surely build up a tree and choose good guess words with many of the most common letters or combinations.
This is in a sense simpler than the original super mind, even though there are more letters than colors. IIRC the English language has an entropy/information content of slightly more than 1 bit per letter.
That doesn't mean there are only 32 five letter words, though. So you can't apply this as directly as it sounnds.But surely starting with a word that has th, e, i, s, p, r, n, perhaps y or x, too, is a good strategy.

And then there are many sites like mikrom showed, you can simply google a sentence like "words beginning with,... ending with..., containing x,y,z and google will give you results if not directly than to sites that allow such searches. Or simply google "scrabble" of course.

But that becomes an interesting task for programmers. Try to create a well guessing AI, doesn't need to use an AI engine, there can be simple filtering of possible words and usage of letter frequencies that's sufficient to have an effective solver.

Chriss
 
I'm delighted - and slightly surprised - that this post has generated so much discussion. For me, Wordle is just an occasional five-minute distraction. I didn't think about the algorithm behind it, or of ways of solving it automatically (aka "cheating"). But it's interesting to consider those ideas.

Solving Wordle clearly requires skill, particularly in deciding which words to try, which in turn requires a good knowledge of English vocabulary. The first time I played it, it took me five guesses and a considerable amount of time. Now, I generally manage to solve it quite quickly in three guesses. You definitely get better the more you play it.

There are plenty of tools available to help you decide which words to try. Mikrom mentioned Dictionary.com, which is a useful site in its own right. I often use an Android app called Crossword Solver King to help with solving crossword clues (and compiling crosswords). But for Wordle, I think they take the fun out of playing.

That said, you might consider creating your own Wordle program in your favourite programming language - perhaps as a Windows desktop program or an Android or iOS app. I might do it in Visual FoxPro, perhaps using the word list that I downloaded for my erstwhile Trackword program. This might be as a useful mental exercise (but only if and when I finally finish my Killer Sudoku program).

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Had a look at this - managed to solve today's in 4 goes. No references or tools used.

Following Karluk's breakdown:

1. one letter right and in the right place
2. one letter right and in the right place, one letter right and in the wrong place
3, three letters right and in the right place
4. Solved

Like Chris Miller, I wonder how it has become such a craze.
 
I wonder how it has become such a craze

Possibly because it's very simple: no complicated rules to learn or strategy to master, and doesn't require too much attention. Or possibly because you can only play it once per day, so there is less chance of getting bored with it.

According to BBC News, the game "amassed a following of 300,000 people in three months". (But it's not clear what they mean by "following".)

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Today I managed to solve the puzzle in 4 attempts.
 
Hi

Doh. This is not for me. Although I mostly know the word of the day, I would need to know a huge load of other words too just to make my guesses.

So I wrote a Ruby script to guess using english3.txt. ( This complicated the things abit as the site rejects some of those words. )
[spoiler wordle.rb output][pre]
Enter this guess in Wordle for me : alone
eXact / Present / No * 5 | Reject : xnnnp
Found 100 candidates
Enter this guess in Wordle for me : aries
eXact / Present / No * 5 | Reject : r
Enter this guess in Wordle for me : aires
eXact / Present / No * 5 | Reject : r
Enter this guess in Wordle for me : aesir
eXact / Present / No * 5 | Reject : xpnnn
Found 16 candidates
Enter this guess in Wordle for me : acted
eXact / Present / No * 5 | Reject : xnnxn
Found 3 candidates
Enter this guess in Wordle for me : ampex
eXact / Present / No * 5 | Reject : r
Enter this guess in Wordle for me : apeek
eXact / Present / No * 5 | Reject : xnnxn
Found 1 candidates
Enter this guess in Wordle for me : abbey
eXact / Present / No * 5 | Reject : xxxxx[/pre][/spoiler]
There is definitely room for improvement.

Maybe should sacrifice the 2[sup]nd[/sup] and 3[sup]rd[/sup] guesses trying clearly wrong words that does not repeat any of the already discovered present letters. That way would acquire more information, ultimately allowing to make fewer guesses for the actual word.


Feherke.
feherke.github.io
 
You have more information then the matches, all letters not matching are nowhere in the word, so this reduces candidate words by a lot. Even when your first guess yields not one correct letter in a wrong position, you excluded 5 letters.

It helps a lot if you split any 5 letter words in the dictionary into five single letter fields and therefore can easily filter matches in the exact position, but also in any position. I have not worked with ruby. I know the hype about ruby on rails, but then it went to mainly Japanese users. Python became my choice of the newer languages. But my tool of choice here would be SQL with l1...l5 char(1) fields indexed, you can query words in a blaze.

I haven't thought of wasting the first 2 or 3 tries to get more letters, but here we go. There are a lot of words that cover the 5 most often letters. Then it's perhaps nice to know whether a th is used, an x or y also is more often, but in the end the vowels are most important. So words with 2 or 3 vowels are nice. Then n,p,r,s,t, of course. Plus, you can also eliminate th if there is no t or no h. A test word with either t or h is good enough, a word without h is more likely, Words with t could still be without h. So perhaps start with something like "shear". If h is not present you eliminate all words with th or ch, too.

I'd also not start with the same word every day, even though the game does fix a word of the day for all users and thus won't adjust to your guessing profile only, I'd not let the game developer try to avoid the most often used first guess, to which I would contribute when always using the same guess.

Chriss
 
Hi

Of course I use the information about the gray letters in filtering.

For now I use just simple calculation for ordering the candidates. On start the script calculates the frequencies of all letters, then later use them in sorting like this
[ul]
[li]Prefer words with more distinct characters -- "mabel" ( 5 letters ) provides more information than "mamma" ( 2 letters )[/li]
[li]Prefer words with higher frequency letters -- "arose" ( average 8.58% ) provides better information than "quiff" ( average 2.66% )[/li]
[/ul]
But considering letter groups frequencies is an interesting idea and will give it a try.

Currently the start guess is hardcoded as "alone", but you are right, we better not become predictable.

I always felt Ruby closer to my style. Just Ruby, no idea about Ruby on Rails. I definitely enjoy Python too, but as that is less efficient in command line one-liners, I tent to choose it rarely.


Feherke.
feherke.github.io
 
This is a simplified version of Word Mastermind that I got when I was young (And still have)

My first attempt took 3 guesses.
First guess had 1 letter in the wrong spot
Second guess had 4 letters in the wrong spots
Third guess was correct

With Mastermind, you are told how many are correct (black Peg)and how many are correct but wrong spot (White peg) but you are not told which letters are which. As a result, more than 6 guesses is quite common with Mastermind.

 
Hi

Well, with mastermind the 6 colors may produce 1296 permutations, while the 26 letters compose 11423 5 letter words in english3.txt. On another site where is no daily word limit, I run into a word ending in "aker". And there are 9 such words. ( Of course, I was not able to guess it. ) Without information about which letters were actually found, I think this would be unplayable.


Feherke.
feherke.github.io
 
I have been making Wordle a part of my morning routine since this thread was started. I have solved 15 puzzles, averaging under four guesses per word. I'm not sure how long I'll continue to solve every day - it's a moderately entertaining exercise, but there's little or no added enjoyment in taking fewer guesses. I've solved three words using only two guesses, but my reaction is mostly "so what?" to this type of accomplishment. Solving in two guesses requires a favorable first guess, so it's all a matter of luck, not skill.

I am still interested in the question of how many guesses would be required by an optimal algorithm. Feherke's example of "_aker" shows that there are words that are still difficult to solve even after getting most of the letters. I'm not sure if I'm sufficiently motivated to try programming my own algorithm.
 
Hi

In meantime I found an article about cheating on Wordle. Was not interested in, but checked the word list used by the code in the article : 2316 words containing only 3 words ending in "aker". If they reverse engineered the actually used word list, then the chances to win are higher than I estimated. Fact is, on powerlanguage I only lost once, while manually [tt]grep[/tt]ing before my script and messing up the regular expression.


Feherke.
feherke.github.io
 
After reading the previous post, I looked in the JavaScript source of wordle and found there a list of 2315 words:
Code:
1. cigar
2. rebut
...
...
2315. shave
It helped me solving the puzzle quicker.
And there are only 3 words matching the pattern /^.aker$/
Code:
baker
maker
taker
 
I have been burned several times by the target word having many similar words. I don't see how an algorithm could overcome this "issue". Especially if you use hard mode which forces the use of revealed letters. Even without hard mode, I feel it might be difficult to write code to discover all of the similar words and then compile a 5 letter word from the missing letters.

e.g. On one of the puzzles my 3rd guess was Spill matching exactly for the S _ I L L
That left me with the following candidates based on letters already guessed and eliminated: Shill, Swill, Still, Skill

I realise now that I should have tried to combine H, W, T, and K into a 5 letter word for my 4th guess such as WATCH which would have guaranteed the win on the 5th but alas, I tried them 1 at a time and failed.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top