Neural Network Writes New Game of Thrones Novel
Ashley Allen / 6 months ago
While we tap our fingers, waiting for George R.R. Martin to finish the next novel in his A Song of Ice and Fire series, one ambitious fan is taking matters into his own hands. Martin’s The Winds of Winter – the sixth novel in the series that inspired HBO’s Game of Thrones – is still without a release date. In the meantime, though, software engineer Zack Thoutt is offering an intriguing alternative. Thoutt programmed a recurrent neural network (RNN) to write the next book in the series, and the results are curious.
New Game of Thrones Novel
Thoutt fed the 5,376 pages of the first five A Song of Ice and Fire novels into the RNN. Using a predictive algorithm, the RNN produced five chapters of its literary continuation. He told Vice Motherboard:
“I’m a huge fan of Game of Thrones, the books and the show. I had worked with RNNs a bit in that class and thought I’d give working with the books a shot.”
Not a “Perfect Model”
The text, albeit fun, is a mess. As Thoutt explained:
“It is trying to write a new book. A perfect model would take everything that has happened in the books into account and not write about characters being alive when they died two books ago. The reality, though, is that the model isn’t good enough to do that. If the model were that good authors might be in trouble. The model is striving to be a new book and to take everything into account, but it makes a lot of mistakes because the technology to train a perfect text generator that can remember complex plots over millions of words doesn’t exist yet.
I start each chapter by giving it a prime word, which I always used as a character name, and tell it how many words after that to generate. I wanted to do chapters for specific characters like in the books, so I always used one of the character names as the prime word … there is no editing other than supplying the network that first prime word.”
POTENTIAL SPOILER ALERT
Despite some wonky grammar, non sequiturs, and the inadvertent resurrection of dead characters, the RNN-written passages feature a hint of insight. Remarkably, the network predicts one popular fan theory – that Jamie Lannister will kill his sister, Cersei – will come true. It writes:
“Jaime killed Cersei and was cold and full of words, and Jon thought he was the wolf now, and white harbor…”
Thoutt confirms that it fed the network only text from the books, not fan theories. Elsewhere, the RNN thinks Sansa is really a Baratheon:
“I feared Master Sansa, Ser,” Ser Jaime reminded her. “She Baratheon is one of the crossing. The second sons of your onion concubine.”
It might not be canon, but the five chapters – available on Github – will provide a bit of fun as the long wait for The Winds of Winter undoubtedly continues.