Starting with Setting

My procedural novel generator (see also part one, part two, and part three) has now been augmented with some rudimentary support for settings, both time and place. An example follows:

Here is a tale from the world of Samoa. Samoa is mostly populated by Italians.

I, Giusa Rosi, am a thirty-nine-year-old woman. I have black hair. I have green eyes. I stand 146 centimetres tall. I am somewhat reluctant to accept new ideas. I am easily disturbed or irritated.

Baffaele Bianchiccino is a fifteen-year-old boy. He has black hair. He has green eyes. He stands 184 centimetres tall. He is very open to new ideas and experiences.

I do not know Baffaele Bianchiccino very well. I scorn Baffaele Bianchiccino. I do not trust Baffaele Bianchiccino.

One thousand three hundred sixty-four seconds ago, I walked to Lita.

Seven hundred fifty-four seconds ago, I met Baffaele Bianchiccino. Then, Baffaele Bianchiccino and I walked to Rovo.

Ten seconds ago, Baffaele Bianchiccino kicked me. I kicked Baffaele Bianchiccino.

Clearly, I have been focusing more on the story itself rather than the writing style (no serious author would mark up each line with the exact number of seconds ago the event took place).

Character Traits

This is part 3 of my procedural novel generator series. In the first two parts of this series (Part 1 and Part 2), I begun on the very basics of a procedural novel generator. Mostly it was simply name generation. Now I have added some rudimentary character traits, physical and psychological. To begin, here’s a sample of what can be generated now:

Here is a tale from the world of Carins.

I, Edwal Gan, am a seventeen-year-old boy. I stand 183 centimetres tall. I have a contusion of the skin. I am conscientious. I am somewhat reserved. I am somewhat reluctant to accept new ideas. I am not agreeable.

Ving Murphy is a twenty-seven-year-old woman. She stands 150 centimetres tall. She is often the centre of attention. She is agreeable.

I do not know Ving Murphy very well. I scorn Ving Murphy. I do not trust Ving Murphy.

Twenty seconds ago, I met Ving Murphy. Then, Ving Murphy punched me, inflicting a contusion of the skin. I punched Ving Murphy.

At present, as is probably obvious, the entire plot is scripted. This means that the characters currently do not have free will and so the character traits are inconsequential. However, they exist now and will provide a back-end for more complex functionality in the future. In addition to character traits, an injury system is present now, although injuries do not bother the characters one bit.

The personality traits already affect the outcome of meetings, however, with more alike people getting along better (unfortunately, this bonus to relations is nullified by the scripted attacks, which means the relationship between the characters is always negative) and the physical traits already affect the severity of the injuries. Unfortunately, making the plot unscripted is a very difficult task, so it’s likely that the next few parts will involve more character work before free will can even be considered.

A Procedural Novel Generator, Part 2

Some small amount of progress has been made on the procedural novel generator I started recently.

Firstly, I’ve improved how text is written. Instead of requiring each word be hard-coded, new backend functionality exists to make writing easier.

def describe(self, perspective=None):
    """Return a list of words describing the meeting."""
    if perspective in self.characters:
        others = [char for char in self.characters if char is not perspective]
        return writer.pack(
        return writer.pack(

The above code shows using the new functionality to conjugate verbs and to make lists, two annoying things in English that are good to have finished.

The very basics of character generation have been dealt with. Now each character has a name, age, and sex. There are still no character traits and the descriptions of characters are extremely plain.

A new time and event system is now in place in the world. Currently the time system is very linear; events can only follow other events. The events are also hard-coded at present and not generated on the fly. Finally, there are only two types of events at present, and neither is fleshed out. The events system is mostly there as a skeleton for future refinements. Consequently, the system is not yet very flexible.

Here’s a sample of what is generated at present:

Here is a tale from the world of Manontome.

I, Rosentina Rombante, am a forty-one-year-old woman. Giovigicelchiosa Savettino is a twenty-eight-year-old man.

Fifteen seconds ago, I met Giovigicelchiosa Savettino. Five seconds ago, Giovigicelchiosa Savettino punched me.

I hope to get some more variation in the stories in the near future—right now the only change from one story to the next is the names of the characters.

Read the next part on character traits.

Likeable Literature, Part 1

The major criticism about computerizing creativity is that it doesn’t make sense: creativity is a topic for which strict and hard rules about good and bad will never be achieved. I disagree with this sentiment. There is certainly an easy way to define a goal for computerized creativity: to make the product “likeable”. In the coming weeks I will attempt to explore certain pieces of literature that are “likeable” and try to identify what makes them so. Firstly, however, I need to overcome my own preconceptions about what makes literature likeable. What better way to do this than to analyze the 21st century’s greatest literary surprise: Fifty Shades of Grey.

From what I’ve heard, the Fifty Shades of Grey movie (although I haven’t watched it myself) is pretty bad. Not only that, but it supposedly removed a lot of the book’s more extreme content to be more palatable to the masses. The film directors took a “taboo” book, and removed the “taboo” parts to make a movie.

It seems that most people who read the book are doing it as rebellion against societal norms. Removing those parts from the movie is simply discarding the allure of the book. Now it becomes a low-quality movie based off a low-quality plot.

Fifty Shades is not really well-written, but it has been a pretty successful book. The movie cannot share equal claim to that success. That means that people simply don’t like its plot. So, logically, people could not have liked the plot of Fifty Shades either.

What makes people like literature? Fifty Shades demonstrates that it’s not necessarily the quality of the writing—E. L. James, though no doubt a clever and imaginative writer, is certainly no Shakespeare.

That is not to say, however, that Fifty Shades could have survived without decent writing. There are in fact many examples of good writing in the book:

Behind the solid sandstone desk, a very attractive, groomed, blonde young woman smiles pleasantly at me. She’s wearing the sharpest charcoal suit jacket and white shirt I have ever seen. She looks immaculate.

In merely three sentences James has described the essence of this setting. The words she chooses are precise and have exactly the right connotations. Throughout the novel, many such quality descriptions are present. Unfortunately, these descriptions are often intermixed with ad-hoc and seemingly awkward dialogue. (“Oh my…”)

I argue that it is indeed the combination of its taboo topic and the good parts of the writing that makes Fifty Shades so popular. This is contrary to what seems to be public opinion. Common sense dictates that a taboo book will be unpopular, and that even a bit of bad writing will cancel out the good, and of course that the plot is what matters most. Based on these heuristics there is not one iota of justification for Fifty Shades‘ success.

But there is no denying what is fact—that the book has been wildly successful. The only reasonable conclusion is that the common sense is in error. “Likeable” literature is not necessarily “good” literature. Fifty Shades will never, ever be a literary classic. English students will not in a million years look to Fifty Shades for inspiration. No aspiring author would even dare to crib from this book. But despite all this, we like it.

A Procedural Novel Generator

I have embarked on a weeks-long journey to demonstrate computational creativity. I will start with a procedural novel generator. The goal of this project is to generate a world, characters, and a plot, and then express that plot as a novel.

I anticipate that this will be a large project, so I’ve brought in machinery from LIJN (a past project of mine) to get it started. So far, piggybacking on LIJN’s sentence tokenizer, I’ve gotten done a rudimentary way for the computer to “write”:

story = [syntax.Word('this'),

…which when reassembled will produce this not-so-interesting output:

This is a test story, set in the world of Cinova.

It is a demonstration of what is to come.

The name of the world is generated with a Markov chain algorithm also conveniently already included in LIJN.

I hope to get some more done on this in the following weeks and post updates when there’s something interesting.

You can read Part 2 here.