How artificial intelligence is creating new ways of storytelling

Can a computer write a great novel or a script for a movie? Artificial intelligence (AI) is manna from heaven for sci-fi writers.

We've seen a sentient computer called HAL wreak quiet havoc in 2001: A Space Odyssey. We've watched a robot girl's will to survive in 2015's Ex Machina. Most recently we’ve seen an AI-meets-the-wild-west scenario in TV series Westworld.

Writers do a great job of making AI entertaining, but does it work the other way around? Can AI itself create, develop and write storylines, scripts and other art forms?

AI is spreading into every corner of human existence. So it should come as no surprise that it’s helping authors, journalists and writers to create in ever more inventive ways.

How AI can improve writing

AI can already help improve our writing skills. For example, the Hemingway App is an online writing editor created in 2013. It uses natural language processing (NLP) to recognize common writing problems and increase readability. And, yes, it re-wrote this paragraph.

You can even use the NLP-powered Dragon Dictation or the online to write without typing.

Data-mining of digital texts reveals fiction's most common emotional arcs.

Data-mining of digital texts reveals fiction's most common emotional arcs.

Sentiment analysis

Anyone with a basic knowledge of plot structure can easily predict the ending of most Hollywood movies. The famous 'three-act' structure goes something like this: establish protagonist and identify the problem, show protagonist's attempt to resolve the problem leading to worsening situation, then resolve problem. To put it another way: boy meets girl, boy loses girl, boy gets girl.

Armed with these commonly used structures, can a computer be taught how to construct stories and scripts? That's the question behind the work of the Computational Story Lab at the University of Vermont, where researchers are analyzing novels to identify the building blocks of all stories.

Inspired by legendary author Kurt Vonnegut's lecture on the shapes of stories and how they could be taught to computers, this AI is based upon sentiment-based text analysis.

Natural language processing is already used for hands-free text input.

Natural language processing is already used for hands-free text input.

Emotional arcs

As with most recent advances in AI, this one is down to surges in both big data and computer processing power.

"By classifying the emotional arcs for a filtered subset of 1,327 stories from Project Gutenberg's fiction collection, we find a set of six core emotional arcs which form the essential building blocks of complex emotional trajectories," say the authors of the The emotional arcs of stories are dominated by six basic shapes.

"Our ability to communicate relies in part upon a shared emotional experience, with stories often following distinct emotional trajectories and forming patterns that are meaningful to us." The researchers also identified which emotional arc did best, as defined by the number of downloads.

It turns out that the most popular novels are those based around the rise-fall-rise pattern of Cinderella followed by a tragedy, and a fall-rise-fall-rise pattern. Armed with that data, any computer is able to construct a basic story and, more importantly, have a grasp of what humans will find engaging.

AI studied online video for emotional moments.

AI studied online video for emotional moments.

Can an AI make you cry?

It can if it knows what buttons to press. AI can easily inspect how many comments there are on an online video, and digest all kinds of data about how well it performs on social media, but how about understanding the common emotional arcs in video stories that make them successful?

That was the question for researchers at the Media Lab at the Massachusetts Institute of Technology (MIT), who just published a detailed blog with consulting firm McKinsey & Company about their results.

The researchers had a deep neural network watch thousands of sections of films, TV and short online videos on Vimeo, and guess the emotionally special moments – the emotional arc.

"Think about this for a moment: machines can view an untagged video and create an emotional arc for the story based on all of its audio and visual elements," say the researchers.

"That’s something we’ve never seen before." People then watched the same clips, labeling which aspects had the strongest emotional power. The neural network then learned how to accurately predict audience engagement of a video on Twitter.

Forget happy endings

The AI also uncovered something that was perhaps surprising; people like sad endings.

As with the University of Vermont's finding that a Cinderella story ending in tragedy was one of the most popular emotional arcs, MIT's Media Lab discovered that the most engaging emotional trajectory was the rise-and-fall pattern, with the characters achieving early success and happiness before a steady decline into misfortune. It turns out that humans love a sad ending above all others.

This kind of insight underscores the probable future of AI in the short-term; to collaborate with writers and authors, and to be a storytelling tool right at the beginning of the process. Cue a rush of sad movies.

The screenplay for the movie Sunspring was written by a neural network.

The screenplay for the movie Sunspring was written by a neural network.

Can an AI write a movie screenplay?

It's already happening. Have you seen Sunspring or It's No Game? Released in 2016 and 2017 respectively, these short films' screenplays were written by Benjamin, a self-named system-on-chip running a long short term memory (LSTM) recurrent neural network.

The idea of filmmaker Oscar Sharp, the process behind Sunspring was a relatively simple one of imitation; feed a text-recognition engine a load of sci-fi movie scripts – including Interstellar and The Fifth Element – and allow it to dissect them until it could predict the words and phrases that most often appear together.

The resulting neural network then wrote a screenplay, and even the lyrics to the theme song using a database of 30,000 folk songs. The Guardian described it as a "dark, ominous atmosphere and gibberish script" while No Film School called it "dramatic and absurdly funny."

It is weird (and very funny – particularly when the main character coughs up an eyeball), but it's not weird enough not to act as at least the bare bones of something genuinely engaging.

Natural language generation can be used to write financial news.

Natural language generation can be used to write financial news.

Can an AI write the news?

Yes – and this too is already happening. The Institute of Electrical and Electronics Engineers (IEEE) reports that the Associated Press, Fox News and Yahoo! are using AI to construct data-driven stories such as financial summaries and sports score recaps.

No journalist is going to mind that task being automated, and in the long-term perhaps it will free up time for more investigative journalism. The software in question is the natural language generation platform 'Wordsmith' from Automated Insights.

However, like a lot of AI used in the creative process, Wordsmith is a tool for journalists, not a replacement for them; an author is required to give it significant direction, as well as very carefully proofread the resulting article.

It's also not very surprising that financial news can be automatically generated given the inverted pyramid structure to news coupled with the fact that a press release containing statistics is the only source.

AI has come a long way, but the fully automated reporter – able to leave a desk or conduct the interviews from which so many stories come from – is a long, long way off.

TechRadar's AI Week is brought to you in association with Honor.

Jamie Carter

Jamie is a freelance tech, travel and space journalist based in the UK. He’s been writing regularly for Techradar since it was launched in 2008 and also writes regularly for Forbes, The Telegraph, the South China Morning Post, Sky & Telescope and the Sky At Night magazine as well as other Future titles T3, Digital Camera World, All About Space and He also edits two of his own websites, and that reflect his obsession with travel gear and solar eclipse travel. He is the author of A Stargazing Program For Beginners (Springer, 2015),