Wordle and grep
leancrew.com
leancrew.com
To this day the puzzles I enjoy the most are crosswords and rebuses, mostly because I can switch off the part of my brain that screams "oh yeah, just grep /usr/dict/words".
> Scrabble is adversarial optimization
A friend of mine used to joke that Scrabble is an area control game with 40,000 rules for tile placement. Like many good jokes, there is a kernel of truth in there.
I remember VIVID which was pretty tough.
I got it in three; I had a remarked to someone the previous day what a good word it would be for worgle!
This also helps avoid or escape focus on an expected pattern that may be wrong (premature convergence.)
By letter frequency I think rents/stern/terns are good guesses. I don't think there's any two words cover 9 of the 10 initial letters in two guesses.
Blent and frents/strew/terms/wefts/wrest cover 8.
But the dictionary is still wrong in one sense - there's an actual word list Wordle uses. I think from the way the blog post is written (e.g. "I refused to believe Wordle would be so evil as to..."), they're purposely avoiding looking up the actual Wordle word list, so they're purposely using the wrong dictionary.
I kind of relate to that - looking at the source code to devise strategies kind of feels like cheating.
lifts lints lists lilts lofts louts lowts lunts loots lusty lofty lusts linty light limit licht licit
There are also lists of Scrabble words; I use one called enable.
And here's the dictionary: https://raw.githubusercontent.com/6zs/xordle/main/src/fives_...
The targets list is the one you want, it's the valid answers. The dictionary is the valid guesses.
In the targets list, some words are starred out, just ignore them, those are words that got removed. The list is ordered and you can pick a spot in the list and ignore everything below it; for Xordle (and again inherited from hello-wordl) "mulch" is the last word used in the list.
If it takes more than 12, it usually means I've been too casual.
https://www.nytimes.com/interactive/2022/upshot/wordle-bot.h...
I find it useful for trying out new words/strategies after a first round of play.
https://github.com/peteryates/dotfiles/blob/master/bin/bin/w...
bash-3.2$ diff `which grep` `which egrep`
bash-3.2$That's the risk of an overly complicated language, you can easily wind up slower than a series of regex filters.
(l[iouy][^taer]t[^aers])|(l[iouy][^taer][^aers]t)
Is in effect what the author is doing in regex (and how it is explained).Here's a query replicating the article's search: https://nutrimatic.org/?q=l%3C_t__%3E&go=Go