A neural network tries writing the first sentence of a novel
3 min read

A neural network tries writing the first sentence of a novel

A neural network tries writing the first sentence of a novel

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.

So, this is typical of what it generated:

The snow in the story of the best of times, it was the season of Darkness, it was the season of Light, it was the epoch of belief, it was the worst of times, it was the season of Light, it was the season of Darkness, it was the season of Light, it was the season of Light, it was the season of Darkness, it was the season of exploding past of Eller, and Junner, a long sunset side of the World.

It was a dark and stormy night; the rain fell in torrents — except the station steps; plump Buck Mulligan came from the stairhead, bearing a bowl of people.

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.

It was a wrong number four Privet Drive.


That’s good thinking: a bowl of the carriage’s parts.

The sky above the present century had reached the snapping point.

Mrs. Can is sitting in the World.

The sheriff returned to the darkness.

It was a wrong number that can never see through a blue-eyed type like me.

I was born in the darkness.

I shall turn to the pop-holes.

(Very minor punctuation edits by me: an “is” here, a semicolon there).

Clearly, the neural network needed help. 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. One of the honorable mentions from 2017 was the following:

As he lay dying on the smoke-wreathed battlefield, General Winthrop finally realized the terrible toll the war had taken, and he wondered if the bloodshed had all been for naught as he exhaled his last breath in a sort of “meoooooh,” actually very similar to the sound his cat Mister Jingles made when he wanted some food or was doing that thing with the drapes. - Mike Christensen, Washington, DC

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.

The crust shark began to pull up a small indent directions of the dead old dried and spect of the grassy sure and closed by the same stormy wind - they were always together.

It was a dark and stormy night and the secret being a silver-backed gorilla.

Become an AI Weirdness supporter to get bonus content! Or become a free subscriber to get new posts in your inbox.

Subscribe now