AI Is Coming: Next Game of Thrones Chapter Written with Deep Learning

George R.R. Martin probably has nothing to worry about — yet.

But fans who have been waiting for years for a new chapter in the popular fantasy series A Song of Ice and Fire — the basis for HBO’s Game of Thrones —  saga are getting a little taste of what may be to come, thanks to AI.

Zack Thoutt, a data scientist and developer, is using an AI system to help finish the novels. Fans have waited six years – with no official release date in sight – for The Winds of Winter, the penultimate book in the series, to be published. Martin is notorious for taking his time writing the books due to the many characters and complex plotlines.

General audiences may be more familiar with HBO’s adaptation of the series, titled Game of Thrones, which just wrapped up its seventh season last month. With the show being ahead of the books, and the final season rumored to premiere in early 2019, fans are growing impatient.

As an avid fan of the show, Thoutt was inspired to apply AI to Game of Thrones after taking Udacity’s deep learning nanodegree program earlier this year.

“I’m just a really big fan and I’ve wanted the last book to come out for a while,” said Thoutt in a conversation with AI Podcast host Michael Copeland. “Everyone, when the show first started, thought the books would stay ahead of the show, and I had done a project for my nanodegree that was pretty similar to the Game of Thrones project that I ended up doing, and that one wrote scripts for The Simpsons.”

Thoutt is using recurrent neural networks, which works well with data sequences. To feed the network with text, he had to create a unique number ID for each word that appeared in the books. According to Thoutt, there was a total of around 32,000 unique words in series.

After the network starts remembering certain plot points, it then begins generating patterns.

“When you want to start making predictions, which in this case is writing text, but writing new text, you feed it a prime word,” said Thoutt. “So I used words for the characters of the book, you know ‘cause in the books the chapters are named after a character…I would feed it ‘Tyrion’ and then it would predict the next word in the sequences, with a little bit of randomness added in.”

The results can be comical. Some confirm popular longheld fan theories, while others throw out random curveballs, such as Sansa Stark somehow being a Baratheon and Jon Snow also being a Lannister.

Thoutt plans to continue updating his AI system, which he calls George AI Martin after an interview with VICE, and is encouraging people online to offer him suggestions. You can read the AI-generated chapters on his GitHub.

And, if all goes well before the next season or book comes along, he may just know everything, giving Bran Stark a run for his money.

AI Podcast: A UC Berkeley Assistant Professor on the Robotics Revolution

And if you missed last week’s episode, give it a listen. Sergey Levine, a UC Berkeley assistant professor, chats about how he teaches robots to learn.

How to Tune in to the AI Podcast

The AI Podcast is available through iTunes, DoggCatcher, Google Play Music, Overcast, PlayerFM, Podbay, Pocket Casts, PodCruncher, PodKicker, Stitcher and Soundcloud. If your favorite isn’t listed here, email us at aipodcast@nvidia.com.

 itunes