&. |

A software developer’s musings on software development

Wordle Update!

A follow-up to yesterday’s post about Wordle!

I got some feedback on Facebook1:

Jason: I think your script determines the best starting word for getting the most letters in their correct places (commonly colored green) on the first guess. The odds are pretty low of ever getting them all right. What is likely more valuable is getting the most correct letters regardless of position (commonly colored yellow). This can be used to better inform the second guess which would have a much higher probability of successfully guessing the word. 3-4 yellows is more valuable than 2 greens when a second guess is basically a foregone conclusion.

And I think this is a good point. The algorithm should really favor more common letters, even if they are not in the most likely position, over letters that are in the most likely position but less common. So I’ve made an update to my code that discounts the per-position points to one one-thousandth of their original value. This essentially means that the per-position points only matter when breaking a tie between two words with the same letters, but in different orders (i.e. “RAISE” is a slightly better guess than “ARISE”).

Taking this into account, the best first guess would be one that uses the five most common letters (E S A R O). There was only one word in my list meeting that criteria, AROSE. However, some Googling showed that Wordle also accepts SOARE, an obsolete term for a hawk. When I add this to my word list, I also get it as the most common letter.

So here are the top 40 words with this new algorithm:

   1: soare  42.65
   2: arose  42.64
   3: raise  41.77
   4: arise  41.77
   5: earls  41.68
   6: reals  41.68
   7: laser  41.67
   8: aloes  41.65
   9: tares  41.32
  10: rates  41.32
  11: tears  41.31
  12: stare  41.28
  13: aster  41.28
  14: stoae  41.25
  15: nares  40.77
  16: earns  40.76
  17: saner  40.76
  18: nears  40.75
  19: aisle  40.74
  20: snare  40.74
  21: elisa  40.73
  22: aeons  40.72
  23: eason  40.69
  24: tales  40.30
  25: taels  40.29
  26: teals  40.28
  27: slate  40.27
  28: stale  40.26
  29: least  40.26
  30: tesla  40.25
  31: stela  40.25
  32: steal  40.25
  33: dares  40.12
  34: dears  40.10
  35: reads  40.10
  36: siena  39.83
  37: anise  39.82
  38: lanes  39.75
  39: leans  39.74
  40: elans  39.73

  1. A constructive comment thread on Facebook that didn’t somehow devolve into an argument about guns or abortions! I didn’t know that was still possible!