# What was the word-making Engine in Gulliver's Travels?

Date: 2019-04-16 · Author: Robert Scales · https://guidetoartificialintelligence.com/en/learn/what-was-the-engine-in-gullivers-travels/

**Answer:** The Engine is an imaginary machine in Jonathan Swift's satire Gulliver's Travels, published in London on 28 October 1726: a huge wooden frame covered with words that students shuffle by turning handles, copying down any fragments that happen to look like sentences. Swift meant it as a joke about scholars who hoped to produce knowledge mechanically, and it is often cited as the first fictional text-generating machine.

In the third voyage of *Gulliver's Travels*, the ship's surgeon Lemuel Gulliver visits a research academy where every room holds a scientist with a wild scheme. One man is trying to extract sunbeams from cucumbers. Another wants to make pillows out of softened marble. And one professor proudly shows off a machine that, he says, will let the most ignorant person write books on any subject without talent or study.

That machine is the Engine. It is a joke, written by one of the sharpest satirists in English, but it describes something surprisingly close to a question people are asking in 2019: can a machine produce writing by recombining words, without understanding them?

## When and where it appeared

Jonathan Swift was an Irish clergyman and writer. His letters show he wrote Part III, the voyage that contains the Engine, in 1724, and the whole book was finished by August 1725. In March 1726 he travelled to London, and the manuscript was delivered quietly to the publisher Benjamin Motte.

Motte released the book anonymously, in two volumes, on 28 October 1726. Nervous about prosecution for its political jabs, he spread the printing across five shops to go faster and softened some passages. A later Dublin edition of 1735, printed by George Faulkner, is generally considered closer to what Swift wanted.

Inside the story, the Engine sits in the Grand Academy of Lagado, the capital of an island kingdom called Balnibarbi. The academy is a satire of the Royal Society and of research that, in Swift's view, chased clever ideas with no practical result.

## How the Engine works

Swift describes the machine in careful, deadpan detail in Part III, chapter 5:

1. A wooden frame, twenty feet on each side, fills most of a large room.
2. Its surface is made of small wooden blocks, about the size of dice, joined by thin wires.
3. Every face of every block is covered with paper, and on the papers are all the words of the language, in every grammatical form, in no particular order.
4. Forty iron handles stick out around the edges. When the pupils give them a sudden turn, the blocks flip and the words land in new positions.
5. Thirty-six pupils read the new lines quietly. Whenever three or four words in a row could form part of a sentence, they dictate them to four scribes.

The students repeat this for six hours a day. The professor has already filled several large volumes with broken sentences, which he plans to assemble into a complete body of all the arts and sciences. With public money for five hundred frames, he says, the job would go much faster.

One detail is easy to miss. The professor boasts that he has loaded the entire vocabulary into the frame and has calculated the general proportion of small words, nouns and verbs found in books. In other words, he has tried to make his random output match the statistics of real writing.

## A worked example you can try on paper

Here is the Engine on a tiny scale. Suppose a row of the frame, after one turn of the handles, reads:

| Block 1 | Block 2 | Block 3 | Block 4 | Block 5 | Block 6 |
|---|---|---|---|---|---|
| river | the | slowly | sings | of | cold |

Reading along the row, the pupils would look for any run of three or four words that could belong to a sentence. "The slowly sings" fails. "Sings of cold" might pass, since it could end a line of poetry. A scribe writes it down, the handles turn again, and the hunt starts over.

Now notice what is missing. Nobody chooses the words because of what they mean. Meaning only enters at the end, when a human reader decides whether a fragment looks acceptable. The professor's statistics make good fragments a little more likely, but the machine itself knows nothing about rivers or cold.

> **Try it:** Write twenty common words on small slips of paper, including a few words like "the", "of" and "is". Shuffle them, lay out a row of eight, and record every run of three words that could belong to a sentence. Do it five times. How many usable fragments did you get, and would adding more copies of the common words help?

## Why it mattered

Swift was mocking a real hope of his era. Philosophers such as Ramon Llull in the 13th century and Gottfried Leibniz in the 17th had imagined systems that would produce knowledge by combining basic ideas. Writers including Stanisław Lem and the historian Pamela McCorduck have linked the Engine to Llull's combining devices. Swift's answer was a laugh: mixing words is not the same as thinking.

The Engine has also been called one of the earliest descriptions of anything resembling a computer, a machine that produces text by following a mechanical procedure. That gives it a lasting place in the history of computing and AI, even though it was never meant to work.

It matters again this year. In February 2019 OpenAI announced GPT-2, a language model, which is a program that predicts the next word in a text based on patterns learned from a very large collection of web pages. Its paragraphs are fluent enough that OpenAI chose not to release the largest version at first, worried about misuse. People reading those samples are asking Swift's question in a new form.

## Is a program like GPT-2 just a modern version of Swift's Engine?

In one way, yes. Both produce text without a human writing each sentence, and both lean on the statistics of real writing. Swift's professor counted how often nouns and verbs appear; a language model learns, in far finer detail, which words tend to follow which.

The differences are larger, though. The Engine shuffles words blindly and relies on dozens of pupils to fish out fragments that make sense. A language model does the selecting itself, choosing each next word according to everything that came before, so whole paragraphs hang together. It does not need a team of human readers to filter each line.

What the two share is the question Swift raised with a grin: does producing sensible-looking text mean understanding it? GPT-2 can write a convincing paragraph about a river, but it has never seen one. As you read machine-written text, it helps to keep Swift's pupils in mind, and to ask who is supplying the meaning: the machine, or the person reading it.

## Sources

- Gulliver's Travels into Several Remote Nations of the World: https://www.gutenberg.org/ebooks/829
- The Engine: https://en.wikipedia.org/w/index.php?title=The_Engine&oldid=803469334
- Gulliver's Travels: https://en.wikipedia.org/w/index.php?title=Gulliver%27s_Travels&oldid=891454593
