Can you replace a warped mind with a computer? And can anyone code? Ruminations on a lazy Saturday

Some people used to think I have a warped mind. [Maybe some people think I still have a warped mind, but that’s a different matter]. As a teenager and as a young man, I was known for my interest in crosswords, in Scrabble, in chess, in duplicate bridge, in mathematical puzzles, in arcane trivia. This post is about one of those interests: crosswords. More specifically, this is about the Times Crossword. The London Times Crossword, in case you’re one of those who thinks there’s more than one Times; that’s like saying there’s more than one Open. There is only one Open, and only one Times. [Today, there are many crosswords in the paper; there used to be only one, the “hard” cryptic, and that’s the one I refer to here].

Crosswords akin to the Times have been around for just over a hundred years now, and have a rich and wonderful history. If you’re interested, read the Wikipedia entry for starters. If you’re interested in stories about crosswords, you should delve into at least two that I summarise below.

D-Day.

There’s a wonderful tale about how a gentleman named Leonard Dawe, then headmaster of Strand School, compiled crosswords for the Telegraph in his spare time. He came across the radar of the powers-that-spook in the months leading up to D-Day by doing something quite striking: he encoded the words JUNO, GOLD, SWORD, UTAH and OMAHA, the codenames of the five beaches, as answers to clues in the period immediately preceding the Normandy landings. In the week before, he added the words MULBERRY and NEPTUNE, the codenames for the floating harbours and for the naval assault. And to cap it all, he used the word OVERLORD, the codename for the entire operation, five days before D-Day. Now remember that there was no NSA in those days, no PRISM, no e-mail. GCHQ would not exist for another couple of years, but predecessor units like the Government Code and Cypher Unit (GC&CS) did. History has it that there was always a close relationship between people involved with crosswords and people involved with setting and breaking codes, so it should not surprise any of you that Leonard Dawe’s efforts came to the attention of GC&CS, or that he was taken in for questioning. The matter was never resolved, though I quite like the hypothesis that Dawe may have crowdsourced the codenames via his students, who were called in regularly to suggest words for inclusion as answers. They in turn would have heard the codenames in use by the soldiers, airmen and naval personnel they came in contact with. No proof, but an interesting hypothesis.

Anthony Grey, a Reuters correspondent.

His incarceration, in solitary confinement, in Peking. [Beijing today, Beijing to the Chinese since time immemorial, but Peking to Anthony Grey when he had no one but himself for company, and Peking to me when I read his story. It’s a fantastic book, Crosswords From Peking. Grey was one of those guys who thought that Times crossword solvers were seriously nuts, and that you had to have their particular brand of nuttiness deep inside you before you could become one of their kind. And then he had his Road-to-Damascus moment in a Chinese cell. There wasn’t much he was allowed to do. One of his rare treats was to receive a copy of the Times, suitably shredded of any useful political content. Among the unshredded bits was the crossword. Driven to desperation, he studied the crossword and learnt how crosswords worked the best possible way: by looking at the answers the next day, and then re-reading the clues, armed with the knowledge of the answers. The book describes his journey as he learnt about the puzzles, the clues, the conventions (mostly unwritten), the whole shooting match. An amazing book, one that should have been reprinted a number of times by now — but strangely hasn’t. Odd.

These two stories are good proxies to introduce the two questions that I’ve been thinking about for some time; by writing this post I hope to catalyse the right kind of debate to learn more, from you, about how to answer those questions.

The first question is close to my heart, and is perhaps akin to a Turing Test. Could we program computers to solve crossword puzzles? Not just any old crossword puzzles, but Times Championship quality, or John Graham’s  Araucarias  or Bob Smithies’ Bunthornes (truly fiendish when of the “connected” variety) or those set by erstwhile giants like Edward Mathers (Torquemada), Derek MacNutt (Ximenes) or Jonathan Crowther (Azed). Yes I know that computers now can beat all comers at chess, that they can even beat the best at Jeopardy, and that crosswords should therefore be a walk in the park, even if the park in question is more like Bletchley. But can they? Will they?

The second question is even closer to my heart, to do with the generations to come. Are we approaching a time when everyone will be able to code? I am one of those Utopians who believes that ubiquitous connectivity and access to compute resources, enabling similarly ubiquitous access to education, can help solve many of the world’s problems. I can see ways that the attack of the Digital Divide can be headed off at the pass, as Moore’s Law drives the cost of connectivity and compute resources down relentlessly. But what about code? Could the ability to code become a barrier to entry, thereby creating a pernicious form of DigDiv? Can such a thing be prevented? If so, how?

Those are the questions I seek to learn more about, and I’m using the crossword as a catalyst in the process.

When I was young we used to take two copies of the Calcutta Statesman, which carried a syndicated copy of the Times Crossword. [This had some unexpected consequences: for example, we had friends who got in touch with us when the Times was on strike in the UK, asking us to mail them copies of the crosswords. Now this was a time before email was accessible by the masses, and for that matter before photocopiers reached a similar state of ubiquity. So it meant for a while we bought a third copy, cut out the crossword and sent the puzzles over in weekly batches.]

One of those two “normal” copies was for my father. The other was shared by a number of us on a first-come-first-served basis; this may have influenced my early-to-rise habit, since I did my level best to garner that copy outright for me. I learnt how to solve them the Anthony Grey way: try doing the crossword on “publishing day”, look at the answers the next day, and by doing that regularly, to figure out the tools, techniques, data, knowledge, wisdom missing. [Talking about missing wisdom, I was reliably informed (a good euphemism for “my father told me”) that the First Secretary to the Government of Bengal would not see visitors until he’d finished the day’s puzzle, an ex officio tradition. Worked fine for a while, caused a few minor problems by the early 1960s at which point it was discontinued. Shame).

As Grey discovered, there is method to the madness of crossword compilers. They write in code, but the code can be deciphered and then used. Each clue has at least one word or phrase that defines the answer. That word or phrase must be at the start or the end of the clue. The rest of the clue is a set of instructions which, when followed correctly, yield a word or phrase as answer which relates to the “definition” part of the clue. So every clue can be cross-checked when completed.

There are other conventions. The size of the answer is given at the end of the clue. Keywords signal the type of clue: words to do with mixture, confusion, panic all point to anagrams; words such as insert or surround are “operators” with strings of letters defined elsewhere in the clue as operands. There are a finite number of clue types. “Cryptic” is the commonest, where you follow a set of instructions to come up with an answer that matches the definition. “Anagram” is a special case of cryptic. “Double meaning” and “triple meaning” clues don’t have cryptic components, they’re just a series of definitions that read well together. “Hidden” is where the answer is actually to be found literally in the words of the clue. People come up with many definitions of clue types, but I tend to stay with this simple set.

When I sit down to solve a puzzle, what I do is read the clues from start to finish very quickly, trying to figure out where the definition part of the clue is likely to be, then looking for the cryptic components, the instructions, the operator and operand. While doing that I’m looking for the keywords that signal what type of clue it is. And where possible I write in the answer as I read the clue. That’s for the first pass. Then, on further passes, I see what letters have emerged in the grid, and that helps me “see” the clue in a more informed light. I continue the passes until I complete the crossword.

As an example I give below the clues, answers and explanations for the puzzle from a couple of days ago.

 

 Across clues

1  Two friends holding bachelor party, finally, in touching way (8). PALPABLY. Cryptic. Two friends (PAL + PAL), holding bachelor (B, an abbreviation for bachelor) party, finally (Y, the final letter in party) = PAL-PA(B)L-Y = PALPABLY = in touching way

6  Like worn-out clothing, made fun of (6) RAGGED. Double meaning. RAGGED = ‘like worn-out clothing’ as well as ‘made fun of’, even though the word is pronounced differently for the two meanings.

9  Create revolutionary movement in prison (4) STIR. Double meaning. To STIR is to create revolutionary movement; and STIR is a word for prison.

10 Racists smashed phoneboxes (10) XENOPHOBES. Anagram. The answer, which means racists, is an anagram of PHONEBOXES. The word “smashed” acts as a signal, an instruction to find an anagram.

11 Wizard’s wand found in town near London (7,3) POTTERS BAR. Cryptic. Wizard Harry (POTTER’S) wand (BAR) = town near London.

13 European painter unknown in Indian state (4) GOYA. Cryptic. Insert unknown (Y) into Indian state (GOA) to get European painter = (GOYA).

14 Chap who’s mean about Pierre, say, as inappropriate name (8) MISNOMER. Cryptic. Chap who’s mean (MISER) goes “about” NOM, which is French for name (eg Pierre) to get MIS-NOM-ER = inappropriate name.

16 Fashionable small thing put on infant (6) SNAPPY. Cryptic. Small (abbreviated to S) precedes NAPPY (something put on infant) to get SNAPPY = fashionable.

18 Finishes off precise wording where sides meet (6) VERTEX. Cryptic. Precise = VERY; wording = TEXT; take the “finishes”, the last letters, off and you get VER+TEX = VERTEX, where sides meet.

20 Business effort East of major river (8) INDUSTRY. Cryptic. INDUS, a major river, is “east” of TRY, effort, to get INDUSTRY = business.

22 Return of CO, for example? It’s a long story (4) SAGA. Cryptic. CO, carbon monoxide, is an example of a gas. And the “return” of A GAS gets you SAGA = a long story.

24 Polish king going after revolutionary competitor in long run (10) MARATHONER. Cryptic. HONE (Polish) + R (abbreviation for rex, king) goes after MARAT (revolutionary) = MARAT+HONE+R = MARATHONER = competitor in long run.

26 Person skilled at soccer barely perturbed, absorbing total pressure (4-6). BALL-PLAYER. Cryptic. ALL (total) + P (abbreviation for pressure) is “absorbed” by B-LAYER (which is BARELY anagrammatized or “perturbed) to get B-ALL-P-LAYER = person skilled at soccer.

28 For Romans, a day that is short (4) IDES. Cryptic. ID EST (that is), shortened by the loss of the last letter, gives you IDES =for Romans, a day.

29 Robust investigation trapping ring-leader (6) STURDY. Cryptic. STUDY (investigation) “traps” R (the leader of “ring”) to give you STU-R-DY = STURDY = robust.

30 Conductor and female had to practise in private (8) WOODSHED. Cryptic. WOOD (Conductor, as in Sir Henry Wood) and SHE’D (“female had) combine to give WOODSHED = in private (as in “behind the woodshed).

 

Down clues

2  Is found in Thoreau originally? Okay (9) AUTHORISE. Cryptic. IS “found” in an original interpretation (or anagram) of THOREAU gives you AUTHOR-IS-E, to okay.

3  Up train crashed — one not expected to go off the rails (7) PURITAN. Anagram. “Crashed” is the signal to anagrammatize UP TRAIN to give PURITAN, one not expected to go off the rails.

4  Cross carried by historical enemy fighter (5) BOXER. Cryptic. Cross (X) “carried” by BOER (historical enemy) gives you BO-X-ER, a fighter.

5  Geisha’s ready for desire (3) YEN. Double meaning. Yen is the “ready” used by geishas, and also means “desire”.

6  Theatre and hospital demolished, in other words (9) REPHRASED. Cryptic. REP (theatre, as in repertory) + H (abbreviation for hospital) + RASED (a spelling of razed or “demolished”) = REPHRASED, in other words.

7  Girl from part of US or USSR (7) GEORGIA. Triple meaning. Georgia is a girl’s name, a state in the US, and also a republic in what was USSR.

8  Some unfriendly men evidently upset (5) ENEMY. Hidden. The word “enemy” is hidden (signalled by “some”) in reverse (signalled by “upset”) within “unfriendlY MEN Evidently”, to give “some unfriendly men”

12 Writer dramatically going over river dam (7) BARRIER. Cryptic. BARRIE (a dramatic writer) + R (river) gives BARRIER, a dam.

15 Associate supporting gunman as much as possible (9) MAXIMALLY. Cryptic. ALLY (associate) “supports” MAXIM (a gun and a man) giving MAXIMALLY, as much as possible.

17 Continue, as such, always intervening before the end (9) PERSEVERE. Cryptic. PER SE (as such) with EVER (always) “intervening before the end” PER S-EVER-E, continue.

19 Person who’s behind advertisement (7) TRAILER. Double meaning. A trailer is a “person who’s behind”; it’s also an advertisement.

21 Accounts provided by singular group of right-minded people (7) STORIES. Cryptic. S (abbreviation for singular) + TORIES (“right-minded people”) gives STORIES, accounts.

23 At sea, stop son boarding a vessel (5) AVAST. Cryptic. S (son) “boarding” A VAT (a vessel) gives A VA-S-T or AVAST, which is stop, at sea.

25 Temperature, approximately, in part of body (5) TORSO. Cryptic. T (temperature) + OR SO (approximately) gives TORSO, part of body.

27 Temporarily get off course in route heading North (3) YAW. Cryptic. WAY (route) reversed or “heading north” gives YAW, to get off course temporarily.

 

On to my questions. If Anthony Grey — who was completely uninterested in crossword puzzles, didn’t think he could do them, felt that the people who did them were abnormal — could do the crossword puzzle, then one could assert that anyone can. He learnt, in a Sugata Mitra Minimally Invasive Education way. Which makes me think that every child, given the right environment, tools and guidance, can learn to code. Big jump from crosswords to code? Perhaps. But I believe. I believe.

Can a computer be taught to understand puns of all sorts, shapes and styles, as evinced in the examples above? Can it “learn” to use ID EST or PER SE from Latin, NOM from French, Harry Potter from this century, JM Barrie and Henry Wood from the previous one, the Boers from before that, Marat and Goya from even before that? Can it drop letters at will, add them at will, top and tail them as “instructed”, when the instructions are warped and woozy, built to deceive? Perhaps. But I don’t think we’re here yet.

So that’s my quandary. I think we already live in a time when every child can be taught to code, to understand code, to appreciate code. And at the same time I think we’re not yet at a point when computers can do everything. I don’t think they can solve the best of today’s cryptic crosswords, designed as they are to confuse, titillate and deceive, drawing on multiple languages, cultures, contexts and history.

What do you think?

5 thoughts on “Can you replace a warped mind with a computer? And can anyone code? Ruminations on a lazy Saturday”

  1. Mornington Crescent. Good start. When I was young my test was “teach a robot to tie a shoelace”. Rather than ask computers to do things like play chess, I prefer thinking about everyday things that children learn to do. So Mornington works.

  2. Some web crossword solvers try to apply rule-based logic. I’ve used One Across http://www1.oneacross.com in the past. Sadly it failed on the samples of your clues that I tried, but you can see its logic. I’d suspect that computers would be quite good at many of the above type of clues, given a suitably good dictionary as well as some logic.

  3. I don’t think everyone wants to code, rather people want to customise solutions. SFDC’s declarative platform tools for business developers being a case in point. The reemergence of the 1970’s Pick for enterprise SaaS, as well as the surging Node.js communities, being two more cases. Actually very few folks primarily write code, but they love to craft solutions.

  4. The day a random program running on a computer is able to delve deep into is data and engage unsupervised with an unsuspecting click pattern that is clearly of human origin, especially a pattern that is confusing, unpredictable, lingering, it can tell someone without any knowledge of crossword puzzles on how to solve them. And as long as we program for performance we will not discover such a program.

Let me know what you think

This site uses Akismet to reduce spam. Learn how your comment data is processed.