Kip How to win at hangman

Last week Stephanie and I were discussing the game of hangman. I commented that “rhythm” and “myth” are good words because the only vowel is y, and most people try to find the vowel first. I wondered what might be the best possible words.  When I remembered that I’m a programmer, I said “hey, I can write a program to figure this out!” And since I haven’t posted on this blog in quite a while, I thought I’d share.

I found a list of 58,112 words and got to work. I decided to first count the frequency of each letter in the word list.1 I figured that the probability that a letter would be guessed is approximately equal to the frequency of that letter in the language. This could be a bad assumption, but it’s all I had to work with. Then I computed a score for each word by averaging the frequency of each letter in the word. I don’t know that this is the best way of measuring the difficulty of the word, but it’s the best one I could come up with.

Here are the words with the lowest scores (and therefore the most difficult hangman words, according to my algorithm):

fuzz     1.28%
fuzzy    1.37%
buzz     1.39%
why      1.57%
by       1.79%
jazzy    1.95%
jazz     2.01%
huffy    2.02%
buff     2.03%
huff     2.10%
jug      2.17%
jumpy    2.18%
puffy    2.18%
my       2.20%
hubby    2.20%
muff     2.23%
jump     2.29%
puff     2.29%
buy      2.33%
foxy     2.36%

And here are the easiest:

see     10.55%
eerie   10.15%
ere     10.13%
nee     10.08%
sees    10.05%
tee     10.04%
ease     9.81%
eire     9.79%
seer     9.73%
seen     9.69%
eerier   9.67%
tees     9.67%
serene   9.60%
eases    9.56%
settee   9.54%
lessee   9.54%
eel      9.52%
seine    9.52%
seers    9.50%
eeriest  9.47%

While I was at it, I did some other searches on the word list.  Here are the 49 words that have no vowels besides Y:

by
cry
crypt
crypts
cyst
cysts
dry
dryly
fly
fry
glyph
glyphs
gym
gyms
gypsy
hymn
hymns
lymph
lynch
lynx
my
myrrh
myth
myths
nymph
nymphs
ply
pry
pygmy
rhythm
rhythms
shy
shyly
sky
sly
slyly
spry
spy
sty
styx
sylph
sylphs
sync
thy
try
why
whys
wry
wryly

Seventeen words contain all the vowels, including Y:

consequentially
counterrevolutionary
disadvantageously
facetiously
gregariously
heterosexuality
homosexuality
neurologically
neurotically
pertinaciously
precariously
precautionary
questionably
revolutionary
simultaneously
supersonically
tenaciously

And only two words contain all the vowels, including Y, in order:

abstemiously
facetiously

1 This is slightly different from the frequency of each letter in the English language. For example, “t”, “h”, and “e” probably have higher probabilities in the English language than in the word list, since “the” is used over and over in the language, but it is only represented once in the word list.
No Comments
Kip While I’m at it: How to win at the Cracker Barrel peg game

In my last post I discussed the game of hangman, aided by an algorithmic analysis of the winningest words. A few months ago I did something similar with the peg game they have on the tables at Cracker Barrel.  The one where you have a triangle with 15 pegs, with one missing. You remove a peg by jumping over it. The goal is to leave only one peg remaining. I think I won the game the very first time I ever played it, and I don’t think I’ve won since then.

It occurred to me that the game would be easily solved with brute force, and after an hour or two of coding I had done so. However, I never went much farther than that. I had hoped to look for patterns or simple rules that lead to a victory, but never really got very far. But I decided to post what I have here just for the sake of doing so.

         0
       1   2
     3   4   5
   6   7   8   9
10  11  12  13  14

Given the above peg positions, there are four unique starting configurations: you can start with peg 0, 1, 3, or 4 removed. Any other position is a mirror and/or rotation of those four. So I looked at which starting positions were the most likely to win.

Peg 0: 29,760 ways to win of   568,630 games (5.23%)
Peg 1: 14,880 ways to win of   294,543 games (5.05%)
Peg 3: 85,258 ways to win of 1,149,568 games (7.42%)
Peg 4:  1,550 ways to win of   137,846 games (1.12%)

So the moral of the story is: start with a middle edge peg removed, not the traditional configuration of top peg removed. Beyond that, I got nuthin.

No Comments
RSS feeds: Kip's - Stephanie's - Both