poster
2023-03-12, 04:26
I am late joining the Wordle craze. Over a year ago, MATLAB programs for solving Wordle puzzles were described by Adam Filion (https://blogs.mathworks.com/loren/2022/01/18/building-a-wordle-solver/) as a guest blogger on Loren's blog and by Matt Tearle (https://www.youtube.com/watch?v=bVTcQtEnOlk) with a YouTube video. But my programs for Wordle Assistants are different. WordBot doesn't try to solve any puzzles and Words just supplies lists of possible words. I enjoy providing the solution logic myself.
Here are two examples, taken from recent Wordle puzzles in the New York Times (https://www.nytimes.com/games/wordle/index.html).
Contents
Wednesday (https://www.labfans.com/bbs/#07e1455b-4718-47a2-93c5-cce24028b05f)
Thursday (https://www.labfans.com/bbs/#e5f6c4a9-b502-447f-9003-f6a351a4a093)
Four Days in March (https://www.labfans.com/bbs/#f246159e-8444-40a5-9280-1750f81c8c5d)
Software (https://www.labfans.com/bbs/#fa65c920-c034-4600-910d-ad06c3df4153)
Wednesday
WordBot has a list of 4676 possible words, but knows nothing about their probabilities, so I don't ask for any assistance with the opening guess.
I like to use mathematical words whenever possible. I usually start with RATIO, which has three vowels and two popular consonants. RATIO was a good opening move for the puzzle in the Times on Wednesday. It received a green R and a gold A. I informed WordBot of our good fortune using 2, 1 and 0 to indicate green, gold and gray. My faithful assistant responded by reproducing the first graphic in the Times.
WordBot ratio 21000http://blogs.mathworks.com/cleve/files/WordBot_blog_01.png Words is my suite of programs that produce lists of acceptable words for various scenarios. In this situation with an R as the first letter, an A somewhere in the last three letters and T, I and O on the gray list, Words finds 25 words, starting with REACH and ending with RUMBA.
The last of those 25 words got my attention. I decided to try RUMBA on my second move. I knew RUMBA was unlikely to succeed but would be spectacular if it did. Sure enough, Wordle didn't want to dance.
WordBot rumba 20001http://blogs.mathworks.com/cleve/files/WordBot_blog_02.png Three more letters gray-listed and A limited to two slots reduces the number of possible words from 25 to 18. The first word on the list is still REACH.
WordBot reach 22100http://blogs.mathworks.com/cleve/files/WordBot_blog_03.png There are now 11 possibilities.
READSREADYREALSREAPSREARSREGALRELAXRELAYRENALREPAYRERANI need to relax.
WordBot relax 22120http://blogs.mathworks.com/cleve/files/WordBot_blog_04.png I don't need another list of possibilities. I can quickly see the previous list has only two words that end in L. The choice between "fit for a monarch" and "pertaining to kidney function" is clear. I have solved Wednesday's puzzle in five moves, including the Hail Mary at move two.
WordBot regal 22222http://blogs.mathworks.com/cleve/files/WordBot_blog_05.png closeThursday
Thursday's puzzle in the Times offered different challenges. As always, I started with RATIO. This time I get only one gold letter.
WordBot ratio 10000http://blogs.mathworks.com/cleve/files/WordBot_blog_06.png I need an R somewhere in the last four positions and can't use A, T, I or O. Words knows 229 qualified candidates. I choose another mathematical word.
WordBot perms 01100http://blogs.mathworks.com/cleve/files/WordBot_blog_07.png I now must have an R and an E and can't have any of those seven grays. Words offers 72 possibilities. Have I been in an accident?
WordBot wreck 21200http://blogs.mathworks.com/cleve/files/WordBot_blog_08.png Well, that's much better. Two greens, one gold, and nine grays. There is only one possibility. The solution must be WHERE.
WordBot where 22222http://blogs.mathworks.com/cleve/files/WordBot_blog_09.png closeFour Days in March
Wednesday, Thursday, Friday and Saturday.
If your browser isn't showing the animation, look here (https://blogs.mathworks.com/cleve/files/word_gif.gif).
http://blogs.mathworks.com/cleve/files/word_gif.gif
Software
This code (https://blogs.mathworks.com/cleve/files/WordBot_2_mzip.m) is immature. Be gentle and let me know how it works for you.
Get the MATLAB code (requires JavaScript) (javascript:grabCode_a44a8488723741b3acf8277d1f858a07())
Published with MATLAB® R2023a
Here are two examples, taken from recent Wordle puzzles in the New York Times (https://www.nytimes.com/games/wordle/index.html).
Contents
Wednesday (https://www.labfans.com/bbs/#07e1455b-4718-47a2-93c5-cce24028b05f)
Thursday (https://www.labfans.com/bbs/#e5f6c4a9-b502-447f-9003-f6a351a4a093)
Four Days in March (https://www.labfans.com/bbs/#f246159e-8444-40a5-9280-1750f81c8c5d)
Software (https://www.labfans.com/bbs/#fa65c920-c034-4600-910d-ad06c3df4153)
Wednesday
WordBot has a list of 4676 possible words, but knows nothing about their probabilities, so I don't ask for any assistance with the opening guess.
I like to use mathematical words whenever possible. I usually start with RATIO, which has three vowels and two popular consonants. RATIO was a good opening move for the puzzle in the Times on Wednesday. It received a green R and a gold A. I informed WordBot of our good fortune using 2, 1 and 0 to indicate green, gold and gray. My faithful assistant responded by reproducing the first graphic in the Times.
WordBot ratio 21000http://blogs.mathworks.com/cleve/files/WordBot_blog_01.png Words is my suite of programs that produce lists of acceptable words for various scenarios. In this situation with an R as the first letter, an A somewhere in the last three letters and T, I and O on the gray list, Words finds 25 words, starting with REACH and ending with RUMBA.
The last of those 25 words got my attention. I decided to try RUMBA on my second move. I knew RUMBA was unlikely to succeed but would be spectacular if it did. Sure enough, Wordle didn't want to dance.
WordBot rumba 20001http://blogs.mathworks.com/cleve/files/WordBot_blog_02.png Three more letters gray-listed and A limited to two slots reduces the number of possible words from 25 to 18. The first word on the list is still REACH.
WordBot reach 22100http://blogs.mathworks.com/cleve/files/WordBot_blog_03.png There are now 11 possibilities.
READSREADYREALSREAPSREARSREGALRELAXRELAYRENALREPAYRERANI need to relax.
WordBot relax 22120http://blogs.mathworks.com/cleve/files/WordBot_blog_04.png I don't need another list of possibilities. I can quickly see the previous list has only two words that end in L. The choice between "fit for a monarch" and "pertaining to kidney function" is clear. I have solved Wednesday's puzzle in five moves, including the Hail Mary at move two.
WordBot regal 22222http://blogs.mathworks.com/cleve/files/WordBot_blog_05.png closeThursday
Thursday's puzzle in the Times offered different challenges. As always, I started with RATIO. This time I get only one gold letter.
WordBot ratio 10000http://blogs.mathworks.com/cleve/files/WordBot_blog_06.png I need an R somewhere in the last four positions and can't use A, T, I or O. Words knows 229 qualified candidates. I choose another mathematical word.
WordBot perms 01100http://blogs.mathworks.com/cleve/files/WordBot_blog_07.png I now must have an R and an E and can't have any of those seven grays. Words offers 72 possibilities. Have I been in an accident?
WordBot wreck 21200http://blogs.mathworks.com/cleve/files/WordBot_blog_08.png Well, that's much better. Two greens, one gold, and nine grays. There is only one possibility. The solution must be WHERE.
WordBot where 22222http://blogs.mathworks.com/cleve/files/WordBot_blog_09.png closeFour Days in March
Wednesday, Thursday, Friday and Saturday.
If your browser isn't showing the animation, look here (https://blogs.mathworks.com/cleve/files/word_gif.gif).
http://blogs.mathworks.com/cleve/files/word_gif.gif
Software
This code (https://blogs.mathworks.com/cleve/files/WordBot_2_mzip.m) is immature. Be gentle and let me know how it works for you.
Get the MATLAB code (requires JavaScript) (javascript:grabCode_a44a8488723741b3acf8277d1f858a07())
Published with MATLAB® R2023a