Thursday 3 February 2022

About that new word game

I don't want to spoil anyone's fun. After all, the New York Times will probably do that. But Wordle, for all its brilliant simplicity and superb execution, is just written in Javascript. So, if you have some basic knowledge and interest, you can take it apart yourself and see how it all works. I naively hoped that maybe the app was making API calls to some online dictionary to source the words but no, there's just a big long list of over two thousand words (nearly six and a half years worth), in plain text, in game order. So I can tell you what today's Wordle is, and tomorrow's, and the day after's, and so on. But that's no fun for you, and only brief fun for me, so...

Far better to dissect the code to refine tactics, right? I don't know about you but I already have a default first guess word and I'm not precious so I'll share: out of lazy habit, my first guess has always been SPARE, my thinking being that these are common letters. It's an approach that has served me well - if I get a few hits, great, I build on that. If I get no hits, I usually try TOXIC next, as a way of trying out two other vowels and, since frequent letters aren't helping me, a couple of less common letters.

And yet the letter distribution chart compiled from the 2,315 words in Wordle's list suggests that the most common five letters in the solutions are E, A, R, O and T ... so I should probably start with ORATE.

The next common letters are L, I, S, N and C. Now I don't know about you but I can't make a valid word out of those (sorry, residents of Lincolnshire but Lincs is a proper noun, and an abbreviation, so seemingly not Wordle-compliant - and by the way, the list of permissible words is just another long hard-coded list). But go further down the table, as far as thirteenth most frequent to bring in D and Y, and you've got a good candidate for second guess of LINDY (not a proper noun, apparently, despite it's origins). And if you want to go as far as sixteenth, you can mop up all the unused letters so far except for S with CHUMP

So, ORATE, followed by LINDY, followed by CHUMP. After that, you're on your own...

Of course, the interesting thing about Wordle being Javascript based, and the code being client-side, is that there's nothing to stop you, me or anyone else cribbing it for their own version. Then the New York Times can do what they like with it, and you could keep playing your own clone. But again, where would be the fun in that..?

Other interesting notes from the source code? Well, there must have been a test day, or day zero, because there was a word (CIGAR) in the list before the day 1 puzzle solution. Oh, and the least frequent letter by Wordle occurence is not Q, X or Z but J, only appearing 27 times in 2,351 words.

And finally, one of the strengths of Wordle is that there's just one puzzle a day and you have to wait 24 hours for the next one. But if that's not enough to scratch your itch, or you've missed days, you can play every game to date again at the Wordle Archive.

4 comments:

  1. Very timely as I only looked at Wordle for the very first time yesterday - intrigued to know what people were talking about...
    For some reason I love a sort of random approach to things, so didn't give my first attempt much thought at all. Just picked the word RABID out of nowhere (honestly, it wasn't that I was drooling at the time). Step 2 IGLOO, Step 3...MOIST? Couldn't believe it when it turned out to be right. New game this morning... what random word to pick this time, how about CRASH? No idea why. Lots of positives with that so for Step 2, I tried SHARD (you'd have thought I would've tried SHARP or SHARK first but SHARD just popped into my mind). Bloody hell, don't know how that happened, but that was the word! Of course it will probably all go downhill tomorrow but it all felt a bit spooky....
    And sorry, sounds like I'm boasting about those two first attempts but honestly I'm still just a bit weirded out at the pure luck of my choices!

    ReplyDelete
    Replies
    1. Clearly you are in touch with your Wordlin-side...

      Delete
    2. Definitely spooky, I must be - this morning I did it again in two moves. How? Why? I think there must be some strange forces at play... ("Is there anybody there?")

      Delete
    3. MOIST, SHARD, PLEAT today... I could recommend a great starting word for you for tomorrow, if you like?

      Delete