Lil Spellbook: A Poetwitch
@LilSpellbook is my newest twitterbot / generative poem. She tweets a new gentle spell every three hours, with her magicks drawing on household ingredients and focussed on self-care. With me as her human caretaker, she incorporates requests into her grimoire and retweets photographs of magicks performed: we are a cyborg poetwitch. I wrote her while researching the writing of a much larger ritual performance, as part of getting to grips with the aesthetics and possibilities of magical thinking. She was made with the help and suggestions of many friends, and of course it's backers here on Patreon that give me the time to do projects like this.

In many ways, @LilSpellbook is my simplest bot. I made her with Cheap Bots Done Quick, a wonderful tool which strips bot-making down to only the writing, with no heavy coding required. She's built out of many nested randomised elements, but from a small overall library and set of sentence structures: unlike Promptatron, she doesn't draw on a complete dictionary of randomised elements, and unlike WeAreRain, she doesn't have infinite variation in structure. However, she's also the bot that took the most writing, the bot where the poetry was writing enough elements and structures to make her interesting.

There are two principles behind the writing of @LilSpellbook: the first, that every noun, verb, adjective and preposition should draw from a randomised list; the second, that those lists should create a consistent tone.

To understand the first principle, you can look at the JSON source. I've tried to organise it so that the nesting of elements is clear. In Tracery, which CBDQ is built on, when a word is surrounded by ## it means that there's a list of random elements of that name. So the "Structure" section expands into the lists under "Spellname" and "Spellprocess", which in turn expand into the lists of liquid, dust and fire spells, which in turn have many lists of randomisable elements. When you look at a @LilSpellbook tweet, each word results from at least three layers of randomisation. The idea behind all of this is that there should be enough variety that every new spell feels a little fresh and surprising, and that you can read a stream of fifty or so without finding it too repetitive or seeing the machinery too clearly. I'm still not wholly satisfied, and would like to vary the grammar a lot more and expand the random lists, both of which CBDQ makes very easy; however, I'm not sure what it will take to make something as truly consistently unexpected as, say, @poem_exe: I'm not sure it's possible without drawing on dictionary-length lists and procedural grammars.

The second principle is less about form and more about content. I wanted @LilSpellbook to feel gentle, kind and caring, with occasionally flashes of humour and darkness. With a poetic twitterbot, each tweet is its own poem, but each tweet also gets its meaning from the whole stream of tweets, the whole space of possibility. That means that all of the lists of random elements have to be consistent in tone, and that the probabilities of different sorts of elements need to be balanced. When there's a darker or more absurd element in a list, it's less likely to turn up: you can see each list as being a weighted possibility space. I used a thesaurus to help me write the bot, so you can also imagine me looking at a list of synonyms and, for each one, deciding whether it fits in the overall tone, and what weighting it should have within that tone. I'm fairly satisfied with the overall effect, but I'll have to let her run on her own for a while to see how the balance plays out, and if it needs tuning.

Writing generative texts has much in common with writing static texts: you're still trying to make the right words happen in the right order. But rather than trying to pick the one right word for a given moment, you're trying to define the right set of words, and rather than trying to fix a text to communicate a specific idea to the reader, you're trying to describe a possibility space to communicate an overall feel of the experience. But then, that last clause is unfair: poets are rarely trying to fix singular meaning, even in static texts. In both forms of writing, you're trying to make meanings happen that you didn't quite expect, looking for serendipity and surprise in the gap between text and reader. In generative texts, randomisation is just another tool to make that magic happen.