I Made Some Word Puzzles

I like to play a board game called Codenames:

Codenames
Give your team clever one-word clues to help them spot their agents in the field.

It's a word association game where two teams are competing against each other.

I thought it would be fun to try building my own single-player version of this game using AI and vector embeddings.

So I started building a "word game engine". I fetched vector embeddings for a big list of words, and also used WordNet and Wikidata. I downloaded a few sources of bigram frequencies (pairs of words that go together), and extracted and curated my own set of bigrams from a Wikidata dump. Then I wrote an AI prompt to help me train an "association matrix" of ~1500 words (using a bunch of Claude Code sessions and gemini-3-flash-preview.) I ended up with a 1500x1500 square of words. Each cell has a value from 0.0 to 1.0 that indicates how related each word is to another word.

This matrix includes all kinds of semantic relationships, cultural references, and idioms. For example, the word crown is related to king, gold, and tooth. You can have a pyramid scheme or a pyramid in the desert. Or if someone gives the clue spider, they might be hinting at both web and man (Spider-Man).

So I experimented with a version of Codenames (which I named "Codewords"), but I couldn't really figure out how to make it fun.

Instead, I invented my own game called Chains:

Chains - Puzzles By Nathan
Arrange words so each connects to the next - a daily word puzzle

In this game, you have a 4x4 grid of 16 shuffled words. The goal is to rearrange them into a chain, where each word links to the next. The links can be a mix of semantic relationships, common phrases or idioms, and even brands, movies, and TV shows.

For example, yellow could link to banana, which could link to republic.

The "word game engine" can generate some good puzzles, but there are usually a few confusing links that need improvement. So I used it to help me come up with ideas, then I had a lot of fun crafting the rest of the puzzles.

I also decided to make my own clone of the NYT Connections game using the same engine. I call this one "Clusters":

Clusters - Puzzles By Nathan
Find four groups of four words - a daily word puzzle

If people like these puzzles then I might keep making them. And I'm experimenting with a few more ideas for games and puzzles. So far I've built two that didn't work: my version of "AI Codenames", and then a visual "match 3" game using photos of various words and categories:

This was a really bad idea and was almost impossible to play.


It would be nice to get my word association dataset and AI prompt to the point where it can generate unlimited, high quality word puzzles. It would also be interesting to see if I could generate some riddles and jokes. Or at least some really bad puns.

Here's a first version of some code that attempts to find pun candidates:

     TOP 10 PUN CANDIDATES
     (High association + Low embedding similarity = Unexpected connection)

     1. BODY + UNIVERSITY
        Pun Score: 250.3
        Connection: WordNet: 1.00
        Embedding Similarity: 16.7% (low = good)
        Polysemy: BODY=247.6, UNIVERSITY=52.8

        BODY associations: chassis, trunk, stone, opossum, student, language, building, message
        UNIVERSITY associations: body, professor, college, academy, state, education, home, system

     ────────────────────────────────────────────────────────────────────────────────

     2. GAS + STATE
        Pun Score: 248.0
        Connection: WordNet: 1.00
        Embedding Similarity: 36.0% (low = good)
        Polysemy: GAS=108.0, STATE=279.7

        GAS associations: attack, balloon, satellite, insect, natural, station, grill, field
        STATE associations: ally, disaster, curse, system, current, court, solid, university

     ────────────────────────────────────────────────────────────────────────────────

     3. ACT + BODY
        Pun Score: 243.8
        Connection: WordNet: 0.85
        Embedding Similarity: 40.3% (low = good)
        Polysemy: ACT=232.7, BODY=247.6

        ACT associations: ham, opera, best, nurse
        BODY associations: chassis, trunk, stone, opossum, student, language, building, message

As you can see, the association matrix needs a lot more work!