National Novel Generation Month -- Day 1
Wed, Nov 1, 2017
2 minutes read

I have this year finally managed to have a go at NaNoGenMo, the attempt to write code to generate a novel, in analogy to NaNoWriMo, where people try to actually write a novel themselves (which sounds like rather a lot of hard work). Instead, I will instruct the computer to do it for me.

My approach will consist of various stages, and at the top level I am planning to generate a broad and abstract sequence of events that will be fleshed out in subsequent stages. I have chosen the framework of Vladimir Propp, who analysed Russian folk tales and came up with a list of 31 narrative functions, which can be grouped into four distinct sections. I’m generating a list of sections, where each section can have up to four functions, and then I pick the appropriate number of functions randomly from the list of functions for each section.

There are some constraints, so you cannot have a return unless you also had a departure beforehand. I have implemented a very simple routine which churns out sequences that fulfil their constraints. Quite primitive at the moment, but perhaps a starting point.

Some example outputs (for their meaning see the Wikipedia link above) are:

  • (complicity trickery departure departure villany first-donor-func hero-reaction wedding pursuit)
    This is a bit weird, as there are two departures (but they could be different people), and after the wedding there is a pursuit, so the hero is chased away by a villain after he got married and rewarded/promoted. Strange, but perhaps leading to an interesting story!

  • (interdiction trickery interdiction trickery departure departure departure first-donor-func struggle struggle transfiguration difficult-task)
    Here the hero gets a warning/command twice, and each time a villain attempts some deception. This time, three people leave (I think that needs to be cut down to single occurrence only!) and a lot of fighting is happening.

Thing is, I can imagine writing a story around those functions. The challenge is to see if the computer can do that, too. Still early days. The main concern with this whole thing is that the generated novel will either be trivial and boring, or non-sensical and incoherent. Probably even both. I am under no illusions that the final result will be worthwhile reading; but I will only find out at the end!

Back to posts