Christopher Strachey: The Programmer Who Made a Computer Write Love Letters
Abstract
Between 1953 and 1954, strange notices appeared on the board of the Manchester University Computer department. “DARLING SWEETHEART,” one began, “YOU ARE MY AVID FELLOW FEELING.” They were signed M.U.C., the Manchester University Computer, and they had been generated by a program Christopher Strachey had written on the Ferranti Mark I in 1952. They are the earliest known example of computer-generated literature, produced thirteen years before Joseph Weizenbaum’s ELIZA became famous for the same trick. Strachey went on to write one of the first programs that could play a full game, to design the language CPL in the ancestral line that leads to C, and, with Dana Scott, to build the mathematical theory of what programs mean. He did all of it as an amateur who talked his way into computing in his mid-thirties, using a machine borrowed, in effect, from his old college friend Alan Turing.
The Bloomsbury Amateur
Christopher Strachey was born on November 16, 1916, in Hampstead, into the Strachey family at the center of the Bloomsbury Group. His uncle was the biographer Lytton Strachey. His father, Oliver Strachey, was a codebreaker: a cryptanalyst in the War Office’s MI1(b) in the First World War and at Bletchley Park in the Second, where the German Abwehr hand ciphers he broke circulated under the label ISOS, “Illicit Services, Oliver Strachey”. He studied mathematics and then physics at King’s College, Cambridge, the same college as Alan Turing, and left with a disappointing lower-second degree after a breakdown during his final year, connected in part to coming to terms with being gay. He spent the 1940s as a physicist and then a schoolmaster, teaching at Harrow.
Computing was a hobby he came to late. In 1951, at thirty-four, he heard about the new electronic computers and wanted to try one. He knew Turing from Cambridge, wrote to him, and asked for the programming manual for the Manchester Mark I. Turing sent it. That correspondence gave an amateur schoolteacher access to one of the two or three working stored-program computers on earth.
The Draughts Program
Strachey’s first ambition was a program to play draughts (checkers). He wrote an early version for the Pilot ACE at the National Physical Laboratory, and when he first tried to run it on July 30, 1951, it failed. He rewrote it for the Manchester machine, whose larger memory could hold it, and by the summer of 1952 the program played a complete game at a reasonable speed. It was among the first programs anywhere that could play a full game against a person, contemporary with Arthur Samuel’s better-known checkers work in the United States.
Writing it taught Strachey the Mark I intimately, including the one feature that made his next program possible: the machine had a hardware random number generator, built into the Ferranti design on Turing’s recommendation.
The Love Letters
In 1952 Strachey used that random generator to write the Love Letters program. It did not simulate conversation or understand anything. It filled in a template.
Each letter opened with a salutation of two words, an adjective and a noun drawn at random from stored lists (“Darling Sweetheart,” “Dear Jewel”). Then it assembled five sentences, each picked from one of two skeletons: “You are my [adjective] [noun],” or “My [adjective] [noun] [adverb] [verb] your [adjective] [noun],” with each blank filled by a random word from the appropriate list. It closed with “Yours [adverb], M.U.C.” The vocabulary came largely from a thesaurus. The grammar was fixed; only the words moved.
The output was stilted, repetitive, and, read at the right angle, oddly affecting:
DARLING SWEETHEART YOU ARE MY AVID FELLOW FEELING. MY AFFECTION CURIOUSLY CLINGS TO YOUR PASSIONATE WISH. MY LIKING YEARNS FOR YOUR HEART. YOU ARE MY WISTFUL SYMPATHY: MY TENDER LIKING. YOURS BEAUTIFULLY M.U.C.
The word lists were large enough that the program could generate roughly 318 billion distinct letters (see The First Computer Love Letters). Strachey posted a selection on the department notice board between 1953 and 1954, without much explanation. Colleagues found them funny. What almost no one noted at the time was that a machine built to compute artillery tables and factor numbers had just been made to produce text whose only purpose was to express feeling.
Myth: ELIZA was the first program to generate emotional, natural-language text.
Weizenbaum’s ELIZA (1966) is often cited as the first program to hold an emotional conversation in natural language. Strachey’s Love Letters predate it by thirteen years and work on the same principle: a small set of sentence templates filled from word lists, producing text that reads as feeling without any understanding behind it. ELIZA was more sophisticated and interactive, but it was not first. See Myths and Misconceptions.
There is a reading of the Love Letters that is hard to unsee. Strachey was gay at a time when homosexual acts were criminal in Britain, the law that would destroy Turing the following year. A program that generates ardent, anonymous love notes, signed only with a machine’s initials and posted in public, is among other things a way to say something that could not otherwise be said out loud. The media artist David Link, who reconstructed the algorithm from Strachey’s surviving notes in 2009 and rebuilt a working version, made this argument in his essay on the program, “There Must Be an Angel.” Whether Strachey intended it or not, the first computer literature was written by a man for whom plain speech about love carried real danger.
CPL and the Ancestry of C
Strachey turned professional. Through the 1950s he worked as a consultant, and in 1959 he described a scheme for time-sharing, letting many users share one fast computer, in a paper that is credited as the first on the subject. He filed a related patent that February.
In the 1960s, working between Cambridge and the new machines, he led the design of CPL (Combined Programming Language). CPL was ambitious and never fully implemented, but its influence traveled through a direct line: Martin Richards stripped it down into BCPL, Ken Thompson cut that down into B, and Dennis Ritchie grew B into C, the language most of the world’s software still descends from. Strachey sits three steps up that family tree.
What a Program Means
Strachey’s most lasting technical work was theoretical. In 1965 he founded the Programming Research Group at Oxford. There, with the logician Dana Scott, he built denotational semantics: a way to define, in precise mathematical terms, what a program means, independent of any particular machine that runs it. Their 1971 work, “Toward a Mathematical Semantics for Computer Languages,” gave language designers a rigorous vocabulary for reasoning about the constructs they invented, rather than testing them and hoping. It remains one of the foundations of programming-language theory. See European Computer Science Academia.
Strachey died in Oxford on May 18, 1975, of infectious hepatitis, at fifty-eight. His notebooks, including the code and word lists for the Love Letters, survive in the Bodleian Library, which is how David Link was able to bring the M.U.C. writing again.
📚 Sources
- Link, David: “LoveLetters_1.0” — project page and reconstruction of Strachey’s algorithm (2009), the source of the essay “There Must Be an Angel: On the Beginnings of the Arithmetics of Rays”
- Christopher Strachey — Wikipedia
- Strachey love letter algorithm — Wikipedia (documents the 1952 program, the template, and Strachey’s Encounter Vol. 3, 1954, pp. 25–31 account)
- “Can You Code Love?” — Science and Industry Museum blog (Strachey’s love letters, M.U.C., August 1953)
- Denotational semantics (Scott–Strachey approach) — Wikipedia, covering their 1971 “Toward a Mathematical Semantics for Computer Languages”
- Copeland, B. Jack & others: The Turing Guide (2017), Oxford University Press — on Strachey, Turing, and the Manchester machine
- Oliver Strachey — Wikipedia (MI1(b), Bletchley Park, and the ISOS decrypts)