116 - Codenames Math π’π²
Hey there, !
How many possible different Codenames games are there?
MATH TIME - so skip straight through if you ain’t keen!
1. The Set-Up
Codenames is a popular team game where you’re tasked with making contact with ‘spies’ in a ‘city’ - represented by a grid of 25 common words in a 5x5 grid. Spymasters know where the red/blue cards are (as well as the assassin), and are tasked with providing clues for their team that links them together.

It ain’t easy ;)
The key numbers to know for this one are:
-
200 clue cards for 400 total words
-
40 map cards
- 5x5 grid
To solve this problem, we’ll need to break this down into a few sub-questions:
- How many ways can we set up the grid with clue cards?
- How will the double-sided cards impact the number of different games?
- How will the different maps impact the number of different games?
2. The Calculations Part 1: How many ways can we set up the grid with clue cards?
The number of ways you can set up 200 cards in 25 different spaces is calculated by a mathematical technique called combinatorial math, where you can essentially work out ‘how many ways can I pick X from Y’.
A simpler example:
- If I’m at a buffet, and there’s 5 types of food (fried chicken, roast beef, steamed dumplings, boiled lobster and mashed potatoes), but I can only fit 3 unique foods on my plate, how many different plates can I create?
- Imagine you have 3 ‘slots’ on your plate. These are spaces for your food!
- In the first spot, there are 5 different foods you can take (because everything is still available). In this example, I’ll take some fried chicken.
- In the second spot, there are now 4 different foods you can take (because you’ve already taken the fried chicken). I’ll put some lobster on that plate :D
- In the third spot, there are now 3 different foods you can take (I’ll finish the plate with some mashed potatoes)
- This means there is a total of 5 x 4 x 3 = 60 different combinations of food that you can take!
- There are gonna be a lot of similar combinations, or bad combinations of food, but that’s not what we’re looking for here - just the number of ways you can make the plate!
What we call this is 5c3 - 5 choose 3 - to represent the process above. It’s a little more complicated (the formal definition of nCr is n! / ( r! * (n-r)! ) but you don’t need to know that).
In our Codenames case, we need to solve 200c25 - out of 200 clue cards, how many ways are there to choose 25 of them at random? This is equal to 4.52 * 10^31 - which is, well, really freakin’ big.
Total count so far: 4.52 * 10^31 (for reference, there are an estimated 2 * 10^23 stars in the universe!)
3. The Calculations Part 2: How will the double-sided cards impact the number of different games?
Each card is double-sided. This one is simpler to calculate in that every single card has 2 different possibilities - which means there 2^25 more possibilities.
Think about it as a reaaaaally long plate that has 25 sections in which you always have a choice of two foods. How many ways would you be able to fill your plate!?
So for us, this means that you’ll need to multiply another 2^25 = 33,554,432 more combinations
Total count so far: 1.5 * 10^39
4. The Calculations Part 3: How will the different maps impact the number of different games?
There are 40 ‘maps’ of the grid, and each card can be rotated 4 times. This implies that you may be multiplying this by another 40 * 4 = 160 times.
However, we need to keep in mind that within the total combinations of your grid, you might have ‘matches’ when you rotate the map.
One combination will be the ‘reflection’ of another potential combination in your grid when the map is rotated, which means that there would be double-counting.
Instead, all we need to do is multiply this by 40 and get our final answer
Total count: 6.0 x 10^40 - I mean…I don’t even know how to contextualise this!
5. Considerations
In this analysis, I haven’t included the ‘same’ game that you might play if you had the same set of unique words, with the map coinciding with that as well.
However, I would need to do further analysis on the actual maps themselves to see how often that would happen which…I don’t want to do and this is nerdy enough content that I probably lost a lot of you :D
Don’t know why we need this, but why not? I love maths and board games so here’s some extremely niche content for myself!
P.S. After I wrote this post I thought about whether someone had already done this…which they had. I usually would say ‘waah I could have just Googled this’ but it’s a nice brainteaser for myself regardless.
Chat soon :)
Let me know if you have any feedback for the newsletter!
βοΈReal Life Recommendations
-
30 by Adele - a fantastically beautiful album from Adele after like 6 years living her best (?) life out of the public eye. It’s a wonderful croon-y album full of love and heartbreak. It starts off excellently, it dips to just great, and then finishes extremely strong. To Be Loved - I had to stop what I was doing at work just to listen to the track all the way through - it was so powerful! Take a listen with a wine in your hand and a snuggled up next to a fireplace. * vibes *
-
The Eternals - I’ve watched this two times now, and can definitely say it’s not a normal Marvel movie, but that’s okay. When you can sink into the length and the slower pace of the movie, it really reveals itself nicely. I enjoyed the varied cast of characters, and it sets up a lot of future stories really well - the story itself is kinda slow but that’s okay (at least, when you know it’s happening). When compared to Shang-Chi, sure, it’s not as exciting. But there are lots of scenes that are just…character events but let you breathe, and that’s kinda nice. When it comes out on Disney+ I think you should watch it then - just maybe not in the cinema (?).
π Adventures on the Information Super-Highway
-
‘Piracy’ website offers NFT art as free downloads - some dude has provided a 17TB file where you can download every NFT off the Ethereum and Solana blockchains. Presented with no comment but mainly more thinking about the interesting ways that property rights are being decided on the Internet through these tokens!
-
Acquisition of chess knowledge in AlphaZero - tl;dr: when the AI learns about what’s important in chess, a lot of those things are also things that the chess community has already found. This is really interesting because of how the ‘meta’ changes - with the AI they start with all types of different random weights and find the suboptimal ones, whereas human development of chess has been about trends (starting with King pawns, then with Queen pawn setups, then the Sicilian). But we always come to the same answer - the AI just does it quicker…very interesting!
-
The Jeff Bezos of the international drug trade - a Chinese drug lord who innovated and adapted his trade to different markets (Toronto, HK, then the US and then the world - including Australia!), and was able to amass a billion dollar fortune. I know I’ve talked about it before, but it’s always interesting to see smart people go into criminal trades - all trades need smart people y’know?