Semantle is a Wordle game variant. But instead of scoring guesses based on lexical similarity like its predecessor, it scores them based on semantic similarity.
Here’s a screenshot from a game I played recently, ordered by similarity to the correct answer.
Screenshot of a Semantle game
I initially guessed “philosophy,” which was very far from the correct answer (similarity score of 6.02). After several more guesses I got lucky with “biology” (27.55) as my 8th guess, which pointed me toward more science-y words. Eventually I realized the answer had something to do with a hospital setting (yes, yes, I could have gotten there faster after “biology”). I landed on the right word “medical” as my 52nd guess.
To be honest, that’s a pretty good round for me. I’ve had games last more than twice that before giving up. If you’ve played before, you know Semantle is hard. But it is solvable, generally by gradually honing in on words that give higher similarity scores, and moving away from words that give lower scores.
Ethan Jantz and I wondered whether we could do better algorithmically. This post describes a simple solver we made while at the Recurse Center that reliably finds the answer in around 3 guesses.
What information does the game give you?
Semantle uses word embeddings — numerical vector representations of word meanings — to represent words. It uses Google News word2vec, which represents each word as a 300-dimensional vector. It then measures how close your guess is to the target word using the cosine similarity between the guess word embedding ( g g g) and the target word embedding ( t t t). That similarity score is the feedback you get with each guess.
The difficulty of playing Semantle comes from how little information a single cosine similarity provides. It effectively tells you whether your guess is “hot” or “cold,” but not which direction you should move. As a result, you have to combine feedback from multiple guesses, mentally “triangulating” where the answer might be in semantic space.
Can we solve for the embedding of the target word?
... continue reading