August 12th, 2024

How good can you be at Codenames without knowing any words?

The article examines Codenames, highlighting strategies like using word layout for winning, the potential of a positional bot, and the role of AI in programming and game strategies.

Read original articleLink Icon
How good can you be at Codenames without knowing any words?

The article discusses the game Codenames and explores the effectiveness of playing without knowledge of the words, focusing on a specific instance where a team won by using the physical layout of the words rather than the clues. The game involves two teams guessing words based on clues given by a spymaster, who knows the ownership of each word. The author reflects on the potential of creating a bot that plays Codenames using only positional information, suggesting that a bot trained on the game's configurations could outperform many human players. The author notes that memorizing the 40 initial state cards significantly increases a team's chances of winning. Despite the potential for memorization to create an imbalance, the author believes that Codenames retains replayability compared to other word guessing games, as it requires a broader understanding of word associations. The article also touches on the use of AI in programming, highlighting the iterative process of using AI assistants to generate code, and compares this to the potential for AI to assist in game strategies. Ultimately, the author concludes that while AI may not replace programmers entirely, it can provide valuable support in software development.

- Codenames can be played effectively by leveraging the physical layout of words.

- A bot using positional information could outperform many human players.

- Memorizing game configurations significantly increases winning chances.

- Codenames offers more replayability than other word guessing games.

- AI can assist in programming tasks, though it may not fully replace human programmers.

Link Icon 13 comments
By @stavros - 6 months
I'd like to note that giving clues that are not about the words themselves is against the rules (and clues about position are explicitly called out in the rules as illegal).

The methods in the post are interesting, but technically against the rules of the game.

EDIT: Though I didn't figure out whether he means "clues about the position" or "clues about the words, until you can open enough cards to narrow down to one memorized position".

By @mkaszkowiak - 6 months
I've also thought about creating a Codenames bot: what if we could use semantic similarity to batch words together? Surely, this can be done using a prebuilt embedding model and clustering!

After some failed experiments - it performed worse than I thought it will - I've googled the subject, and... it turns out there's a whole paper about ML and codenames :)

https://arxiv.org/abs/2105.05885 (Playing Codenames with Language Graphs and Word Embeddings) - fun to read

By @Arnavion - 6 months
For anyone else like me who's only played the online versions and was really confused by the article: the physical game does not completely randomize the positions of red and blue cards but has a fixed set of possible configurations - the "configuration cards" that the article is talking about.
By @creer - 6 months
Codenames is a word guessing game - in part. It's also a game of ingenuity, of knowing your players / spymasters, of players trying to be better as a group than as individuals, of paying attention (and using the other team's clues) - and at some point it's a game and can be played seriously and competitively.

From that point of view I don't see a serious problem with embracing the game pieces provided and taking them into consideration. It is a dimension in the game. It does not kill the game. Solid thinking from that team.

I have more of a problem with people learning word lists for Scrabble. It's not against the rules - but it makes it hard to play with these people. It's a significant class difference.

By @nemetroid - 6 months
On the topic of word game recommendations, I’ve been playing So Clover recently and highly recommend it. It’s a cooperative game and has almost no downtime (all players write clues at the same time, then all players guess together, so the possible downtime is the difference between the fastest clue writer and the slowest clue writer).

https://www.rprod.com/en/games/so-clover

By @drodio - 6 months
DROdio here, CEO of Storytell.ai

Thanks for trying Storytell for coding work, Dan!

When you say it "I don't think it took too much longer to get working code than it would've taken if I just coded up the entire thing by hand with no assistance. I'm going to guess that it took about twice as long, but for all I know it was a comparable amount of time." → I'm actually amazed that it performed as well as it did for native code generation.

We put code generation in the "Use with Caution" bucket as I describe in https://web.storytell.ai/blog/the-intersection-of-ai-curious...

By @quuxplusone - 6 months
Excellent article, with multiple directions of rabbit holes to descend. I liked the linked essay on "The Bitter Lesson": http://www.incompleteideas.net/IncIdeas/BitterLesson.html

I liked the Mastodon thread linked from the appendix, re Dave Sirlin's theory of "scrubs" (who'd eschew the post's geometric tactic) versus "good players": https://mastodon.social/@danluu/110544419353766175

Which in turn links to the original imgur post describing the Warhammer 40K match between Wheels and Shooter: https://imgur.com/a/V0gND

+1 to nemetroid's recommendation of "So Clover," which is indeed more of a pastime than a game, but it's still great and belongs on any list of great word games.

I also like "Contact," which is playable without any props: https://quuxplusone.github.io/blog/2021/11/12/contact/

By @ralferoo - 6 months
Adding to the list of related games at the end of the article, I recently played "Poetry for Neanderthals" and thought it was quite fun, although really once you've figured out how to trick your brain into thinking with grunts, it becomes easy quite quickly because then you tap into the primal part of your brain that prefers single syllables. But bashing people with the rubber hammer kept it amusing for longer than it probably should.
By @NeoTar - 6 months
I think the total number of code-names grids possible is something like 210 344 706 000, so the 40 cards (plus 4 rotations, so 160 possible grids) are only a tiny, tiny fragment of those possible.

But it does mean that defeating the bot would only mean creating a custom grid, which sounds very practical virtually, and possible (but harder) in person.

By @cauch - 6 months
I don't know the game that much, but ways to create random 5x5 grid seems pretty simple when I quickly try to think about one.

What about having 25 scrabble-like squares in a bag, and the spymasters pick randomly in the bag. Each square has a number from 1 to 25 that correspond to one position on the 5x5 grid, and one extra square is chosen to be the black square and shown to the spymasters. The spymasters have a pen and a piece of paper with a 5x5 grid where they can mark the information they receive.

(that is if the spymasters are not informed of the position for the other team, I'm not sure if it's the case or not in the real game. If not, it's even simpler: both spymasters look at the result of every pick, the squares are colored and the order in which they are picked is the order they are on the grid)

By @hangsi - 6 months
This is an interesting view of how random number based security is compromised for economic practicalities (though the meanings of "security" and "compromised" might be overstretched here).

For completeness, I wondered how many cards would be required to give the complete set of patterns.

If we number the positions in the 5x5 grid such that the top row has positions 1-5, the second row has 6-10 and so on, the grid positions can be converted to a sequence and we can use the permutation formula to find the number of arrangements. To account for rotations, we can divide the final value by 4 since every arrangement can be rotated and is therefore valid.

Of the 25 cards, there are 7 white, 8 red, 8 blue, 1 black and 1 double agent that can be red or blue, also deciding which team goes first. We can treat this final card as one of a kind, then double the formula output to account for cases where it is swapped to the other team.

Permutations of a multiset has a standard formula [0] that calculates a result from these values (rolling in the double agent factor of 2 and rotation division factor of 4):

25! / (7!8!8!1!1! * 2) = 946,551,177,000

(edit: as pointed out, this is 9 times too large as the double agent can indistinguishably replace each of the other 8 cards - a corrected value is 105,172,353,000)

This is (edit: still) more layout cards than have ever been printed across all production runs of Codenames, and would probably not fit into the current box size.

[0] https://en.wikipedia.org/wiki/Multinomial_theorem#Number_of_...

By @leecarraher - 6 months
This is exactly why i like this game. Upon first playing it, the attacks were obvious to beat anyone who was playing legitimately. Assuming both teams know this fact, means the choice is, play the game to win and it is boring or play the game to have fun and challenge yourself and partner. During every occasion, the latter has prevailed.
By @CamelCaseName - 6 months
This is really neat (and now I want to memorize a few combinations)

But it's very similar to chess, where positional sense is crucial