Gödel, Escher, Bach An Eternal Golden Braid by Douglas R. Hofstadter

(Dana P.) #1

ing way. I had heard on the radio a few examples of so-called "Computer
Haiku". Something about them struck me deeply. There was a large ele-
ment of humor and simultaneously mystery to making a computer gener-
ate something which ordinarily would be considered an artistic creation. I
was highly amused by the humorous aspect, and I was very motivated by
the mystery--even contradiction-of programming creative acts. So I set
out to write a program even more mysteriously contradictory and humor-
ous than the haiku program.
At first I was concerned with making the grammar flexible and recur-
sive, so that one would not have the sense that the program was merely
filling in the blanks in some template. At about that time I ran across a
Scientific American article by Victor Yngve in which he described a simple
but flexible grammar which could produce a wide variety of sentences of
the type found in some children's books. I modified some of the ideas I'd
gleaned from that article and came up with a set of procedures which
formed a Recursive Transition Network grammar, as described in Chapter
V. In this grammar, the selection of words in a sentence was determined by
a process which began by selecting--at random-the overall structure of
the sentence; gradually the decision-making process trickled down through
lower levels of structure until the word level and the letter level were
reached. A lot had to be done below the word level, such as inflecting verbs
and making plurals of nouns; also irregular verb and noun forms were first
formed regularly, and then if they matched entries in a table, substitutions
of the proper (irregular) forms were made. As each word reached its final
form, it was printed out. The program was like the proverbial monkey at a
typewriter, but operating on several levels of linguistic structure
simultaneously-not just the letter level.
In the early stages of developing the program, I used a totally silly
vocabulary-deliberately, since I wa~ aiming at humor. It produced a lot of
nonsense sentences, some of which had very complicated structures, others
of which were rather short. Some excerpts are shown below:


A male pencil who must laugh clumsily would quack. Must
program not always crunch girl at memory? The decimal bug
which spits clumsily might tumble. Cake who does sure take an
unexpected man within relationship might always dump card.
Program ought run cheerfully.
The worthy machine ought not always paste the astronomer.
Oh, program who ought really run off of the girl writes musi-
cian for theater. The businesslike relationship quacks.
The lucky girl which can always quack will never sure quack.
The game quacks. Professor will write pickle. A bug tumbles. Man
takes the box who slips.

The effect is strongly surrealistic and at times a little reminiscent of

(^620) Artificial Intelligence: Retrospects

Free download pdf