Home » Writing Advice » A neural network tries writing the first sentence of a novel

A neural network tries writing the first sentence of a novel

3 December 2017

From AI Weirdness:

It’s National Novel Writing Month (NaNoWriMo, for short), which means that writers everywhere are embarking on writing projects – and when you’re faced with a blank page, sometimes it’s just hard to get started.

I wanted to see if I could train a computer program to help. I train computer programs called neural networks to imitate all kinds of human things, from paint colors to Dungeons and Dragons spells to Harry Potter fan fiction to Halloween costumes. All I have to do is give the neural network a long list of examples and it will try its best to teach itself to generate more like them.

So, I decided to give a neural network examples of first sentences of novels, to see if it could generate some that might help writers get started. The main problem turned out to be finding enough examples of first sentences – ideally, I need thousands. I could only find a couple hundred of the most famous lines, and the neural network proceeded to do what it usually does when faced with too little data, which is to give up on trying to understand what’s going on, and instead just try to read it back to me word for word. Think of it like cramming for a test by memorizing instead of learning how to apply rules to solve problems.

. . . .

Most didn’t make much sense, and/or were obvious mishmashes of famous lines. A few turned out to be maybe usable, probably by accident:

There was a man and he had seventy first sight.

It is a truth universally acknowledged, that a single man in possession of a good fortune must be in want of my life, fire of my loins.

4 Had come to America from Europe Privet Drive.

The snow is gone sometime, and you said, Why, and I said, To be with the darkness.

It was like the imagination.

It was a wrong number that struggled against the darkness.

It was a dark and stormy night; the swall of the gods?

The moon turned out to see me.

. . . .

Where could I get it more data? My searching sent me, unwisely, as it turned out, to the site of the Bulwer-Lytton Fiction Contest, which has over 900 archived first sentences of hypothetical novels. The problem is that it’s a contest to write the worst first sentence.

. . . .

I added them all. It didn’t help.

Stop! I caused the Narguuse man who was new on Alabama, the screaming constipated eggs.

I am an angry grass, the symposium square, proved fatal to the throbbing, the howling wind tire…

The beans suddenly with him in the trunk of an out-of-balance has really dead, then all the time hammered his head in abject puzzlement as a bang, and a head tuxedo-failed law of ghansmothered eyes like a fine that the hell of her supposed by the rain flare of the waterhole where it is in a long was mad.

I have to stop that in the sidewalk aliens while your hands after he had to go in the top of the day a new work our eyes of the pumpkin but stands over another meaning in shortered to the sea, beautifickinary to be like that.

Link to the rest at AI Weirdness

The woman behind AI Weirdness is looking for more first lines. If you go to the end of the OP, you can enter a first line, even one from your own book, or a bunch of first lines.

Writing Advice

8 Comments to “A neural network tries writing the first sentence of a novel”

  1. I vote for the snow one. The rest are barely intelligible.

    If possibly grammatically correct.

  2. The moon one is pretty good.

  3. Long live literary fiction.

  4. What fun! As a writer of sci-fi that features more or less smart AI, how could I resist?

  5. Some of them are as good as some of the dreck currently being published.

  6. The screaming constipated eggs? You win, AI. I give up this writing thing, I can never produce something as brilliant as that.

  7. I am the angry grass, the symposium square, the fatal wind tire…
    I dig it, baby. Reminds me of ‘Howl’.

Sorry, the comment form is closed at this time.