How to Make a Twitterbot that Loves You Back
The iterative art of making Twitterbots
Twitter bots are big. (Thank you, Russia.) And making Twitter bots has never been easier. But why make one? For me, it grows out of a desire to write not one Tweet but a whole pile of them. To make not a meal but a recipe. Not to plant a flower but to to throw handfuls of wild flower seeds onto the ground and see what surprises shoot up. Of course, it helps if you also have something to say about formulaic communication, random choice, or combinatorics.
That’s how my kids and I got started on the Hallmark Holiday Movie Generator Bot. As we were sitting with my parents, watching endless marathons of sappy Hallmark movies, my daughter recognized a pattern, a formula, and we started making up our own as we sat around the fire: Woman who doesn’t believe in Xmas moves to small town, meets prince, and finds romance and Xmas joy. Overworked man loses a parent, moves out to the country, hires a nanny who helps him find romance and the holiday spirit. One Xmas season later, we found ourselves making a Twitterbot to generate these films.
There’s some chaotic joy in making a bot. The fun of authoring possibilities. It’s the joy of lists. The joy of holiday games like “The Minister’s Cat.” It’s not about crafting the one perfect phrase, as it might be in writing a poem, but about delighting in the multiplicity. Recently, it’s become even easier to go from idea to functioning Twitterbot thanks to tools, such as Zach Whalen’s Google Doc’s spreadsheet.
The style I use has its origins in the combinatoric work of Raymond Queneau, whose Cent mille milliards de poème (Hundred Billion Thousand Billion Poems) offered a generator of many poems made of paper cut up into strips. Basically, this style of Twitterbot chooses one word, phrase, or image from column A, then one from column B, et cetera. The formula is an algorithm for creating meaningful sentences. The formula is like Mad LIBS but every section of the sentence is blank, a placeholder waiting for a selection from a big list.
Admittedly, I am a relative novice in the world of Twitterbot making. I could not win a race versus horse_ebooks. I could not get a job in Russia. But here are a few of my early bots. Meet @HolidayMovieBot, @Termsof SBot (Terms of Service Bot), and @Tweet Like Prez. The last is a bit anomalous as it merely ReTweets headlines from Breitbart News sandwiched in: TERRIBLE! and Very Bad. Of course, it plays off the reports of Twitterbots intervening in the 2016 election but also mimics the way the Commander-in-Tweet responds to news via his favorite outlets. It’s surprising similar to the President’s own Tweets.
Terms of Service Bot claims to read all those online contracts we click through without even a glance. It plays on the legal logic of the Internet (i.e., All your base are belong to us.).
An Algorithm for Making Twitterbots
The process I use for making bots is drawn from traditional modes of writing: an iterative process of creation and testing. Here’s a little algorithm to follow when making Twitter bots:
- Develop your pattern
- Populate your list
- Test it
- Revise it
OR in simpler terms:
Build, Test, Repeat
But I get there’s a stage I’m leaving out, which is “invention.” Something must inspire you to create a bot formula. For example, @HolidayMovieBot was born of our holiday passtime, watching a too many of these tales with a bit too much attention, which led to my kids and I making fun of the premise. Even those who love the formula of these films, mock it, affectionately, I suppose.
I mean, anything that has a drinking game and bingo, has a celebrated formula that people love to roast (and toast!). Bots play with these repeated elements, and the best bots have the most delightful recombinations. The joy of making bots is to be surprised or amused by an unexpected or under-expected combination.
How to make a simple Twitterbot
Let me sketch out the steps for making a simple Twitter bot. Again, I highly recommend Zach Whalen’s spreadsheet. Once you follow his steps, you can then go on to compose your bot. I’ll lay out the basics here.
The HolidayMovieBot, for example, selects a random component from each column and then strings them along into sentences. (In linguistic or semiotic terms, the options can be thought of as the paradigm and the structure of the sentence, the syntagm.) Basically there’s an overall structure with slots (A, B, C, etc.) into which you can insert any of a whole list of items.
HolidayMovieBot follows the pattern:
* Title * subject [adjective + person/job], predicate, predicate, verb + object [adjective + person/job], “who” verb “them” preposition “they” predicate.
an adjective person, does something, does something else, [meets] an adjective person who [rejects]them [until] “they” do something else.
Basically, it’s the formula for every holiday romance on Hallmark’s channels or Lifetime network. Of course, what makes this fun is that its formula plays on the formulaic nature of those films (although I believe my students from film school might restrict these films to the name “movies.”). This formula also works because plot synopses themselves are formulaic. Playing with and against those formulas that makes botmaking such fun.
Great bots play in the linguistic pleasure dome of the fungible. It’s writing with Legos. Interchangeable bits. The movable type of formulaic phrases. Fridge magnets. On the other hand, punchlines kill combinatorics. Though my HolidayMoiveBot has a robust vocab, because most end in memorable or at least specific punchlines, the combinatoric infinity of my bot is essentially limited to the number of unique endings. By contrast, in Terms of Service Bot, each item has an equal weight (or greater interchangeability) and so the combinatoric possibilities seems more vast.
Take the above example. While this post is fun, you can really only read that last phrase (about Snapchatgram) once before you’ve been there, done that. Such recognizable and memorable lines, though fun in themselves, become tiring on repeat viewing. (Perhaps this also explains why the holiday movies prefer forgettably similar locations, plots, cast members, dialogue…)
The real fun of a Twitterbot comes from using more inconspicuous pieces that can be mixed together like a tasty stew. For an example of amazing combinatoric might, take the Magic Realism Bot, an amazing creation of surreal synopses, created by Ali and Chris Rodley.
Although we detect a pattern, the variability in the combinations feels infinite. The formula is what this bot — and perhaps every bot — is all about — though sometimes, or often in the case of the Magical Realism Bot, the Tweets are greater than the sum of their randomly chosen parts.
Reconfiguring your bot
As another formula has it, writing is rewriting. For that reason, I like to take my bots offline nightly to tweak their formulas, like the behavioral specialists on Westworld.
There is an awful lot of tweaking involved. Some tweaks come from adjustments to the formula as the results become clear. For example, when I forget that if I put in a variable article (a/an/the), I might produce titles with incorrect pairings of “a” with nouns starting with a vowel.
Other tweeks come from audience feedback.
Far be it from me to promote pandering to an audience on an art project, but I learn a lot from what people favorite or RT. But I also get a sense of the role the bot plays in their Twitter lives. I should note few botmasters I know follow their bots’ feedback as frequently as I do. Most of the #botALLY botmasters I’ve chatted with say they test their bots aggressively at first, either by previewing offline or merely letting it run, and then turn the bot down to post less frequent once they’re happy with it. However, I’d recommend listening to the feedback. I’ve discovered quite a lot from it. So far @HolidayMovieBot has received two types of responses: snarky and sincere.
The snarky followers, possibly brought by this Boing Boing post, make fun of Hallmark movies. They seem to prefer my punchline endings, even when they break the genre or push the formula too far. These followers fundamentally use the bot to tease or connect with their loved ones who are caught in the Hallmark spell. Perhaps they too have been forced to drink a cup of cheer while watching these.
On the other hands, the sincere followers like the movies and like @holidayMovieBot as an homage to their seasonal favorite. They respond better (like, RT, favorite) to close facsimiles of the actual movies, rather than parodies. They prefer the sincere imitation rather than the insincere mimicry. Which makes sense because these movies build audience through repetition and predictability, which is after all a staple of the season. Think, endless playings of “Rudolph the Red Nose Reindeer,” showings of It’s a Wonderful Life, or adaptations of A Christmas Carol.
My Presidential bot also gets its share of feedback. For example, people seem to enjoy to tweeting at @TweetLikePrez, who lives with them on the #maga hastag, either to correct him or to pile on his mockery.
All this exposure to algorithmic or combinatoric creation can also in turn influence your writing. Take the Hallmark Holiday Movie Bot. After a few weeks of staring at the combinations, I found myself adding custom lists of phrases that followed a repeated structure, for example, “moves to [name of a real or imagined small town].” Because I wanted more variety in that particular section of the sentence, I couldn’t just let the bot do the work. But writing maybe 16–20 of those phrases, I realized I was now writing with the aesthetics of a bot. The iterative process reiterates my writing.
Perhaps, as Rita Raley has suggested, we are all moving toward forms of computer-assisted writing, whether by choice or by technological determinants. Like the ideal lovers of Hallmark romances, computers finish our sentences, complete our thoughts, fill in the blanks. Making Twitterbots is a form of detournement in that process, an act of resistance. I make bots to meditate on formulaic production but also to play with the power of combinatorics that I first learned about from art theorist Bill Seaman and from those toys I had as a kid, the ones where you can turn the head and change the face, change the torso, and change the foundations, the very things they’re standing on.
But I am afterall a writing teacher. So, I keep trying to make better bots — better, something more engaging or more engaged with. I’m interested in the communication ecology of Twitter. What do people want from bots? How do they perceive them? I’m reminded of e-lit artist Aaron Reed’s comment that more people followed his ebooks bot than him. I want to know what makes a bot more or less interesting — or that makes it interesting enough for a human to want to engage with its output — whether to scold or to like. In other words, I treat botmaking like every other kind of process, as an iterative process of building, testing, and revision. Because it’s all about the algorithm, after all.