Live data from Hacker News

Solving Wordle using information theory

binghamton.edu

51–60 of 66 posts

Re: Solving Wordle using information theory

#51
I wrote a wordle solver that was fairly straightforward; it just brute-forced all of the possible outputs, minimizing the maximum number of remaining possibilities.

The very first step was too slow to be interactive (IIRC it took about a minute), but fortunately can be precalculated. With a good first-guess, the number of remaining words is small enough that you can just brute-force.

Note that this is not theoretically optimal; you would want more than one level of lookahead for that, but it's good enough to solve almost the entire YAWL dictionary in 6 guesses or less.

Re: Solving Wordle using information theory

#52

I'd quickly realised that a set of words which covered most of the alphabet (20 words, leaving b, g, j, q, v, and z excluded) allowed solving virtually all Wordle puzzles. The game quickly lost any challenge. wimpy crowd thank fuels Altering order might give faster results. The order presented leaves the most common letters (e, t) for last. Z is quite uncommon, q is virtually always followed by u, similarly common pa…

> The game quickly lost any challenge. I only play on hard mode for this reason. My next guess must always be a possible answer based on my current information, and that varies the puzzle enough from day to day that I still find it enjoyable to play occasionally.

Yeah, I play on hard mode. I have three words that seem quite unlikely but cover most frequent letters and common patterns, that I use to quickly work through possibilities in my head.

I haven't failed to solve in months and I usually play every day. I only picked it up again a few months ago in search of a little ritual for the morning. Wordle, Parseword and the NY Times Sudoku on Hard mode. Good for 25 minutes of break at some point in the morning.

Re: Solving Wordle using information theory

#53

This isn't groundbreaking science, sure, but it is a great way to get people interested in a topic. After all, it wouldn't be on Hacker News if the word Wordle wasn't in it. I'm a huge fan of using things like this to teach science, math and engineering. We started using "Solve 100 Wordles programmatically" as our technical interview, and people _love_ it. They get really into it and have fun. It's pretty easy to do…

it's a drag... i mean if you're 22 it's fun. if you love games, or you're older, or mature, i don't know. the pretentious stuff Josh Wardle says is tough. (https://gdcvault.com/play/1027882/-Wordle-Doing-the-Opposite). he says all sorts of stuff that is wrong ("innate understanding of language" except if you're a kid, which is the average gamer...)

it's like when interviews asked people to implement 2048. it's not even the best version of that game, Threes! is.

Re: Solving Wordle using information theory

#54
post #14

What I'm interested in is the best starting word. Using Shannon entropy, the paper finds that it is "tares".

A couple years ago, I wrote some js to sort a 5 letter word file. The value for a word was based on letter frequency in each letter location. Then I took the words that didn't have repeating letters. The I choose a word at the top that I liked and grep'd for some other words to use for the 2nd and 3rd try. In 3 tries, you have used over half the alphabet and all vowels. This usually lets me get the word by the 4th try. Here are some word sets you can start with.

- pares, moity, bundh|bunch - pares, monty, build|guild - pares, doily, bunch|munch

- pores, banty, guild|mucid - pores, canty, build|guild - pores, manty, build|guild

- bares, ponty, guild|mucid - bares, moity, punch|dunch - bares, monty, guild|child

- cares, ponty, build|guild - cares, moity, bundh|gulph - cares, monty, build|guild

Re: Solving Wordle using information theory

#55
The NYT world bot that "reviews" your game also has entropy as one of the things it addresses I think.

I prefer to not have or use predetermined words. It's most fun to actually feel like you have a chance at solving it in one, and have the challenge of more or less information from first play. It's interesting to compare the solve distribution that the game lists when you're done. I wonder what information can be gleaned from that?

Re: Solving Wordle using information theory

#56

I'd quickly realised that a set of words which covered most of the alphabet (20 words, leaving b, g, j, q, v, and z excluded) allowed solving virtually all Wordle puzzles. The game quickly lost any challenge. wimpy crowd thank fuels Altering order might give faster results. The order presented leaves the most common letters (e, t) for last. Z is quite uncommon, q is virtually always followed by u, similarly common pa…

> The game quickly lost any challenge. I only play on hard mode for this reason. My next guess must always be a possible answer based on my current information, and that varies the puzzle enough from day to day that I still find it enjoyable to play occasionally.

Until I read some of the comments here, I didn't realize anyone used any other approach with Wordle. A word that doesn't include the known letters is just unnecessarily increasing the number of guesses it takes to solve and doesn't make sense...

Re: Solving Wordle using information theory

#57
post #23

I crushed wordle within a few days of its popularity entering my sphere. It was pretty easy to brute-force a decision tree minimizing the average number of guesses using a lowly python script and a few days of qpu time. Don't Wordle[1] is significantly more interesting; I've got a solver but the maximum score takes my lowly python script upwards of a day (per day) to solve using brute force. For now, I solve it with…

what's qpu?

That's a typo, I meant CPU! I work with quantum computers, where we do discuss QPU (quantum processing unit) time, but that's not how I did this.

Re: Solving Wordle using information theory

#58
post #56

Earlier quoted context omitted.

> The game quickly lost any challenge. I only play on hard mode for this reason. My next guess must always be a possible answer based on my current information, and that varies the puzzle enough from day to day that I still find it enjoyable to play occasionally.

Until I read some of the comments here, I didn't realize anyone used any other approach with Wordle. A word that doesn't include the known letters is just unnecessarily increasing the number of guesses it takes to solve and doesn't make sense...

Using a fixed set of known words (perhaps with adaptive use based on revealed hits and misses) is cognitively easier than trying to come up with 1) a valid English-language word which 2) fits with the revealed information. If the goal is only to find the actual term, it works quite well.

As others have indicated withing this post, there are other ways to play. I'm not claiming to have found the One True Way, just one that happens to achieve a (usually) successful result.

Re: Solving Wordle using information theory

#59
post #21

I'd quickly realised that a set of words which covered most of the alphabet (20 words, leaving b, g, j, q, v, and z excluded) allowed solving virtually all Wordle puzzles. The game quickly lost any challenge. wimpy crowd thank fuels Altering order might give faster results. The order presented leaves the most common letters (e, t) for last. Z is quite uncommon, q is virtually always followed by u, similarly common pa…

> I'd quickly realised that a set of words which covered most of the alphabet (20 words, leaving b, g, j, q, v, and z excluded) allowed solving virtually all Wordle puzzles. The game quickly lost any challenge. You can even go further—there's a set of 5 words which uses 25 out of 26 possible letters, leaving you one more word to enter the right answer. But here's the thing: while that means you'll almost always win,…

There are times that enough hits are revealed, or other patterns, that guessing the actual answer is possible in fewer than six attempts. I think three-try wins are not unheard of for me, though honestly it's been years since I've played.
Post reply on HN