Hangman - by Patrick Liscio - Ballpark Figures
Ballpark Figures
SubscribeSign in
Hangman
Patrick Liscio<br>Aug 23, 2026
Share
My new video on Hangman is out. You can watch it here. This post provides more detail on some things that I wasn’t able to fit into the video.<br>This video went very differently than I expected. Battleship and Yahtzee both deal with numbers of states that are at the edge of what a single computer can handle in a reasonable amount of time. Hangman is fundamentally a very similar game to Battleship in that one player chooses a state from a large state space, and then the other player has to narrow down that state via a series of guesses. The difference is that the state space in hangman is 6 orders of magnitude smaller than Battleship (almost 7 if you only count the words of a single length). This was supposed to be an easier video where I could focus a bit more on figuring out the production process, and take a step back from what seemed like a very long, 33-minute video on Yahtzee.<br>Thanks for reading Ballpark Figures! Subscribe for free to receive new posts and support my work.
Subscribe
Hangman brings its own set of challenges, though. Being a “simpler” game just means that it’s possible to solve it more fully. While my Battleship video focused primarily on using a greedy guessing strategy, the smaller state space in hangman meant that it was essentially possible to solve the game under certain conditions. If you fix a distribution over all possible words that the chooser could use, then we can actually find an optimal strategy for most word lengths, and I probably could have gotten an optimal strategy for every word length if I had thrown just a bit more compute at the problem. Just as with Battleship, the goal was to find something close-ish to a Nash equilibrium, but hangman seemed approachable enough that we might actually be able to get pretty close.<br>The variation over different word lengths and the nature of the guesses also bring challenges that I didn’t really anticipate. Letters of the alphabet behave very differently than squares on a Battleship board, and patterns in how letters appear do change pretty substantially across different word lengths, mostly due to conjugations, prefixes, and suffixes. When I made my Yahtzee video, I was worried that I was sort of going overboard by talking about each of the 13 boxes on the scorecard. When that turned out not to bother people, I joked to myself that the only thing twice as good as talking in depth about 13 of something was talking in depth about the 26 letters of the alphabet. I ultimately realized, though, that I couldn’t really do justice to this game without some understanding of its basic building blocks.<br>The Words
There’s a sense in which a hangman strategy is only as good as its word list. In Battleship, the state space is massive, but at least the players agree on what it is. I’m sure I could have spent a lot more time refining the word list to get something much closer to a person’s vocabulary, and I’m sure there will be many changes to this list as I cover other word games (including in my next video. Stay tuned). It seems sort of funny that “phylogeny” ends up right above the cutoff for inclusion, while “cookout” is right below it, but there’s a surprisingly inconsistent relationship between a word’s frequency and our understanding of it (plus, it’s really hard to come up with a reliable word list).<br>I’m sure there are better ways to approximate a person’s vocabulary than “try to eyeball a cutoff and then have Claude apply a bunch of filters to the resulting list.” My hope was that the words that shouldn’t have been kept had similar letter patterns to the words that shouldn’t have been removed, resulting in similar hangman strategy to the “correct word list,” although I don’t know how true this is in practice.<br>I also put a lot of thought into how to think about word frequencies, but ultimately didn’t come up with much. Using a uniform frequency is almost certainly not a reasonable thing to do, but the natural alternative of just using words’ frequencies in English text also didn’t seem quite right, and it made the game a lot easier for the guesser. I suspect that the “right” weighting to simulate how people actually play hangman is somewhere in between: people try to pick weird words, but it’s just much easier to think of words that you know well, and you probably don’t want to pick a word that your opponent doesn’t know at all.<br>Guessing Strategy
After being stuck on the greedy strategy in the Battleship video, it was nice to be able to tackle a game where the full optimal strategy could be computed (even if it relies on assumptions about the distribution of words). Like Battleship, the objective of hangman is usually about maximizing information, but in both games, there is a strong incentive to prioritize “correctness” over just information. In Battleship, you’re rewarded for correct guesses: you need to get...