As a keen cruciverbalist and consumer of all things cryptic, I’m interested in linguistic games, even when, as in the case of codewords, they involve a little numerical crossbreeding.
Codeword are puzzles in which you need to fill in the words in a crossword-stye grid. Each letter of the alphabet is substituted for a number between 1 and 26. There are no clues but you are given a couple of letters to help you on your way. I don’t know how popular codewords are in the US; here in the UK all the quality papers provide one daily.
About a year ago I was stuck on a fiendish codeword and, not wanting to pay the extortionate rates that papers charge on their puzzle helplines, I decided to create a codeword solver using my rather basic coding skills. I dusted it off today and created a video demonstration of it in action bulldozing a codeword:
Using this tool (download here), you can quickly and easily solve codeword and crossword clues. Here’s how it works:
- First, the word length of the search term is checked and a list is grabbed which contains all of the dictionary words of that length.
- Next, the program goes through the list and chops up all the words into individual letters, with each letter being matched to a number. So the word “green” becomes “1:g, 2:r, 3:e, 4:e , 5:n;” In programming, incidentally, this number-letter correspondence is also called a dictionary.
- The search term is also turned into a dictionary and compared against the list. If my search was “….n”, the fact that the item 5:n is in both the word “green” and the search is enough to qualify “green” for the next stage.
- Next, the program essentially converts the search term and the items in the list into a series of just dots and numbers – i.e. it keeps repeated letters and ignores single cases of letters. So “green” becomes “..00.” and this pattern must match the search term (although the actual numbers used doesn’t matter).
- List of all remaining words is outputted.
Even if one used this to solve an entire codeword, I would not really see it as cheating – just an alternative solving method. Every time you type a pattern and get a list of results, you learn some interesting things and may even expand your lexicon.
I find it fascinating to study the way that words are constructed. English is unique in the vastness of its foreign influences, and several of the most difficult (and sometimes the easiest) crossword/codeword clues are loan words, like “verandah”. These words do not follow the same letter-ordering logic that characterises most English vocabulary.
When you see an incomplete word, say: r _ _ e _ t _ _, what goes through your mind? Why does the full word suddenly jump into your head on some days, whilst on others nothing comes for hours? Does the fact that you’ve already read the full word in the article above make it easier to solve?
It’s repeated, by the way.
On the final round of the UK game show Only Connect, cultural things like books titles or names of generals have their vowels deleted, leaving “llt” for Lolita, for example. The contestants vary widely in their performance in this round. Half of the contestants never buzz in at all, whilst others seem to be impossibly fast at seeing answers across all knowledge-spheres, like the guy below:
I only get there quicker than the contestants when the category of the clues is something that I know an awful lot about. Otherwise, I’m slow. It seems conceivable that you could improve your abilities by solving crosswords/codewords and by playing Scrabble, and I’m sure that you’d become a better conversationalist in the meantime too. The right words would arise from the deep at the right time. As you can hear in the first video, I falter in my speech when I come to particular words and sometimes employ the wrong prepositions and other awkward phrases, even though I’m a competent native speaker. I’d like to know why this happens.
If I had to program a computer to be a good Only Connect player, it would have to contain a database of all cultural phenomena. Even so, it would take a very large number of operations for the string with the missing vowels to be checked against all potential matches within the correct cultural category. Does the human mind really perform thousands of operations when it completes the vowels, solves an anagram or produces a codeword answer? Something to ponder over a glass of wine (a little wine seems to boost my delivery; I can’t find any research to suggest that this is an acknowledged effect though).