SmartyBot
A program to solve Wordle Puzzles
by Edward D. Collins

Last update and revision: February 14, 2023

 

 

SmartyBot is my name for a "bot" I created. SmartyBot solves Wordle puzzles.

Actually, it's not a "bot" as much as it is just an Excel Workbook that uses VBA macros.  I wrote it last year, when I was regularly playing Wordle each day.

Last year, the NY Times had just introduced WordleBot and I was fascinated with this program. I loved seeing the analysis each day of my most recent puzzle. I loved seeing the, often usual, probing words WordleBot came up with, to help narrow down the solution for that day, and how it arrived at determining those probing words.

And then a month or so later, when the NY Times reduced access to WordleBot, and only allowed those with a paid NY Times subscription to use it, that gave me the incentive to write my own "bot."  (I did not want to pay for a subscription simply to be able to access WordleBot.)

It took many hours, over a period of several months, to code the entire program. I'm quite proud of it. It does a great job solving Wordle puzzles.

Smarty can solve Wordle puzzles that are four, five, six and even seven letters in length, so it's not just limited to the standard 5-letter Wordle puzzles. It can analyze games or an entire dataset in "batch mode."  For example, I can feed it last month's puzzles and ask it to solve all of them, one after another, in succession, as I make myself a cup of coffee. When it solves puzzles in batch mode it keeps track of every move of every solve, including the number of possible words left after each move, for later viewing and analysis.

The program has several different strength levels.  The weakest level, Skill Level 1, simply picks a random word each turn, from all of the words still possible. The strongest level, Skill Level 7, looks at all words in the dataset as a possible guess, and picks the word that reduces the number of possible choices as much as possible.

The user can easily change datasets.  For example, now that 600+ Wordle games have been played, that's 600 words that can be removed from the list of possible answers. (Currently, the NY Times is not repeating answers from their initial list of 2,315 possible words, although I suspect they will start repeating answers in a few years.)

It is comparable in strength to the NY Times WordleBot. In fact, each guess SmartyBot recommends as the next word to play is usually given a Skill Rating of 99 by WordleBot, the highest possible Skill Rating score one can achieve. In fact, when SmartyBot's suggested best play isn't given a Skill Rating of 99, it's not because Smarty failed to find the best reply.  It's because Smarty has more information available to it than WordleBot does and knows the word it finds is best, based upon the information available.  (WordleBot, for example, does not keep track of past solutions, and if desired, SmartyBot is capable of doing that.)

Smarty can also take a user-selected word and figure out the best reply to each of the 243 possible color patterns it might receive.  (Okay, technically, that's not correct.  Yes, 3^5 (three possible choices and five letters) is 243 but you can never, for example, receive four green tiles and one yellow tile.)  As an example, with the original 2,315 word dataset, if the opening word SALET is used and if the feedback received is no colored boxes at all, Smarty determined the best second row guess is the word ROUND. (WordleBot gives ROUND a Skill Rating of 98. Again, note, however, that WordleBot is basing this reply with a different dataset.)

I love running the program in Animation Mode, and watching it solve puzzles one after another.

However, SmartyBot is not quite perfect. To clarify, the top Wordle bots on this leaderboard page, for example, all are capable of solving the original 2,315 word dataset in a total of just 7,920 rows, for an average of 3.4211 rows per puzzle.  (SALET is the best starting word, according to all of these top bots.)  Alas, it takes SmartyBot a total of 7,935 rows to solve the same dataset... an average of 3.4276 rows per puzzle.

I had lots of fun coding the program. At times I had several problems to solve and it was a bit of a challenge to figure out how to solve them all. 


Here's a Wordle puzzle for you.  If this were a chess puzzle it might be labeled White to Play and Mate in 2.

Assume your starter word was CRANE... and it received a green C and a green A. There are just 13 possible answers left: CHAFF, CHALK, CHAMP, CHAOS, CHASM, CLACK, CLAIM, CLAMP, CLASH, CLASP, CLASS, COACH, and COAST. (For the sake of this problem, we can assume that yes, all 13 answers are possible, even though one or more of them may have been used before, in a prior puzzle.)

Question: What's the one word that you can play next, on Row 2, that will guarantee a solve on Row 3? Note that Hard Mode is turned off... meaning your next play can be any word you choose.


Below are a couple of examples of the many interesting probing words the program finds, often guaranteeing a solution on the next row.

 



After AROSE received the green A and the yellow E, the following 11 words are still possible: ABBEY, ABLED, ADEPT, AGENT, AHEAD, ALIEN, ALLEY, AMEND, ANGEL, ANNEX, and APNEA. Smarty finds the probing word ALAND, which will guarantee a solve on Row 3.  (Two other probing words which will also guarantee a Row 3 solve are ALANT and UNLED.
 
 


After TRACE received the green T and the yellow R, the following 11 words are still possible:  THIRD, THORN, THROB, THROW, THRUM, TORSO, TORUS, TUMOR, TURBO, TUTOR, and TWIRL. Smarty finds the probing word BUTOH, which is the only word guaranteed to solve the puzzle by Row 3.
 
     

 

Below are a few screenshots of the various worksheet tabs. Click any of the thumb-sized graphics for a larger view.

 

 

 


 



Examining this graphic will reveal the solution to the puzzle I posted above.