NaNoGenMo 2016
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


My entry for NaNoGenMo 2016. An exercise in cheap generative worldbuilding built from a Haskell combinator library, an event loop and vocabulary from a neural net trained on dictionary entries.

ANNALES is finished!

Blog posts

Annales: the gory details in three parts

  1. Vocabularies: using a neural network, Python and regular expressions to generate a nonsense vocabulary
  2. TextGen: a Haskell combinator library for making up randomised sentences (plus a one-paragraph explanation of how the State monad works!)
  3. Events: in which I get bogged down writing a succession algorithm, but also figure out how to correct a typo in a randomly-generated text

Code overview

Annales is build in three stages: vocabuary modelling, vocabulary mining and procedural generation.

Vocabulary modelling

The basis for the nonsensical names and words is a neural net which has been trained on all of the word definitions in WordNet. I built this a while ago to power a Twitter bot, @GLOSSATORY, using Justin Johnson's torch-rnn code.

Here is the eight-line script used to fetch around 82,000 definitions from WordNet

Vocabulary mining

I generated about 50,000 glossatory entries, and then generated vocabulary files for Annales from that with a Python script, This creates lists like men.txt and buildings.txt based on regular expressions.

Procedural generation

annales itself is a Haskell application which builds on TextGen, a Haskell combinator library I wrote for another Twitter bot, @amightyhost. It uses its own event loop to generate incidents and then uses TextGen, with the vocabulary files, to generate descriptions of those incidents.

Sample output