Empathy Deck

An emotional Twitter bot for a gallery installation

Empathy Deck is a digital commission by artist Erica Scourti for the Wellcome collection's Beyond Bedlam exhibition. It's a bot that runs on Twitter, trying to empathise with its followers from time-to-time, offering them something it's made itself. The artwork explores the changing shape of mental healthcare online. You can find it as @empathydeck on Twitter.

The programme copy explains it best:

Inspired by the language of divination card systems like tarot, the bot uses five years’ worth of the artist’s personal diaries intercut with texts from a range of therapeutic and self-help literatures. The texts are accompanied by symbols drawn from the artist’s photo archive, in an echo of the contemporary pictographic language of emoticons.

Somewhere between an overly enthusiastic new friend who responds to every tweet with a ‘me-too!’ anecdote of their own and an ever-ready advice dispenser, the bot attempts an empathic response based on similar experiences. It raises questions about the automation of intangible human qualities like empathy, friendship and care, in a world in which online interactions are increasingly replacing mental health and care services.

I first prototyped and then produced the software component of the work. Erica had a clear goal for the project - the fusion of self-help and personal text - along with the perspective that it should produce ‘cards’ based on her own artwork and designs. But beyond that, there was space to explore the terrain and process a little, and so that was where we began in the early stages of the project - sketching and prototyping in code.

We would often end up working sat next to each other - running the corpuses of text through our scripts to manipulate them, and eyeballing the output to see if it was heading in the right direction. This was a playful process - shaping code to generate prose that felt right, chatting with each other throughout. It also meant we built the domain language of the project together - both what the code called things, and how we thought about things. It was a really good piece of collaboration.

As the text-manipulation algorithms settled into place, we also worked on the code to generate the unique ‘cards’ that the bot gave out. Whilst the bot was generating text, it was important that its output had the form of a modern take on ‘goddess cards’ or tarot cards. This was achieved by taking Erica's own background art, some foreground ‘emoji’, and a variety of typefaces, including one based on Erica's own handwriting, and laying out each card as a small webpage. This meant we could prototype quickly in the browser. Once we'd got everything prototyped on screen, the final code used PhantomJS to take screengrabs of these miniature pages, turning them into jpeg files to attach to the final tweet.

A card from the Empathy Deck - which this time, chose to write in rhyming couplets.

Twitter integration for art projects is often a complex issue: it's usually outside the intended use of the service, and it was important to minimise the likelihood we'd be thrown off or blocked. A substantial amount of my work on the project was making sure our Twitter integration was rock-solid and highly conservative.

By ‘conservative’, I mean: making sure we didn't reply to retweets, links, or ongoing conversations, and not replying to conversations containing any of a very broad list of stopwords (or generating text containing those words). We also had to carefully design how we follow users. It was important for users to be able to see our replies to them, but we couldn't just ‘auto-follow’ users - that's strongly discouraged by Twitter. Jim Kang's Appropriate Tributes was a highly useful point of reference for approaches to these issues, and also a good example of all the many things that need thinking about!

Danny Birchall and Martha Henson were hugely helpful in their production roles during the build and post-launch. The project ran successfully for the duration of the Beyond Bedlam show, and the Wellcome have continued to support it after the physical show has closed. Erica and I have continued to update it since then with new content, and it continues to sit on the internet, making its cards.

Update: the Empathy Deck ceased updating in autumn 2018, when Twitter's changes to the APIs it made available to developers meant that the artwork could no longer function correctly. All its content remains online.