Image via media.mit.edu

Just in time for Halloween, scientists at MIT have created a horror writer’s worst nightmare: an artificial intelligence that writes its own horror stories. The fiction-writing computer program is entitled “Shelley,” after the writer Mary Shelley who penned Frankenstein. Brought to life by the MIT Media Lab, Shelley is a computer program that writes short scary tales, operating off of human interaction.

Shelley premiered on Twitter last week and began tweeting out some of “her” own stories. Shelley first posts a few sentences to begin a story and encourages other users to continue the story with their own words, using the hashtag #yourturn. Once another person has added to the story, Shelley will continue based off of that user’s suggestion for the story, which can result in multiple versions based off of Shelley’s original lines that began the tale.

Currently, Shelley is not capable of writing full-length stories on her own. According to Joseph Frankel from Newsweek, Shelley is similar to the game “exquisite corpse,” where multiple people draw a single portion of a monster on a folded paper, and once everyone has added their section, the paper is unfolded to hopefully form into one cohesive image. Shelley then acts as one of these participants, adding her own section of a story and interacting with the other writers to create one complete tale.

Image via registercitizen.com

“She’s creating really interesting and weird stories that have never really existed in the horror genre,” stated Pinar Yanardag, a scientist at the MIT Media Lab. For example, one of Shelley’s stories began with a pregnant man awaking in a hospital bed.

Since Shelley is still learning, some of her responses can sound a bit odd. While all of Shelley’s excerpts can be found on her website, here is an example of one of Shelley’s short stories:

“I noticed a shadow of someone standing in the corner of my room, just staring. I thought that my roommate was already in bed and was going to close my door. I got up and walked to the door. “Hello?” I mumbled under my breath. I got no reply. My door was closed, and my heart was pounding against my chest. The door opened. The shadow from the living room was right in front of my face. She was staring at me. I couldn’t move. I started to scream and cry, and I couldn’t wake up.”

In order to expertly write horror tales as well as any human, Shelley learns from data provided on the subreddit r/nosleep, where amateur writers have posted their own scary stories. On the subreddit, there are about 140,000 stories in which Shelley can learn from. The same MIT researchers also created the horrifying image generator the Nightmare Machine.

Machine-learning algorithms need to process large amounts of data so Shelley’s intake of horror stories written on the online forum, which contains over 700 megabytes of horror stories produced over the last ten years, was more practical than training Shelley in classic horror such as Stephen King or Edgar Allen Poe.

While copyright of the horror classics would be one obstacle, the availability of horror classics is another. “If you look at all the literature by Lovecraft or Stephen King or Edgar Allen Poe, it would be just a few megabytes,” stated Manuel Cebrian, one of the MIT researchers. “We would still not have enough data.”

Two of Shelley’s creators, Yanardag and Cebrian, are also budding horror writers and they believe that Shelley could be an essential tool that could help end writer’s block. “You tend to get stuck,” stated Cebrian. “This kind of technology helps you write the next paragraph so you don’t get so-called writer’s block.”

In a less horrifying twist, Shelley may very well be the secret to finishing a horror writer’s next upcoming novel.