If you think waiting for the final season of Game of Thrones is bad, spare a thought for fans of the books.
Writer George R.R. Martin is notoriously slow when it comes to writing the books in the fantasy series on which HBO’s Game of Thrones is based, A Song of Ice and Fire.
The series is planned for seven books but Martin has only completed five of them to date. In a rather disturbing trend for eager readers, the books are becoming fewer and farther between.
Martin started working on the series in 1991 and completed the first three books in nine years. But then it took 11 years for him to knock out books four and five.
The sixth book, titled The Winds of Winter, has been a work in progress since 2011, and after thinking it might come out this year, fans are now pinning their hopes on a 2018 release.
Well one fan, software engineer Zack Thoutt, decided he wasn’t going to take it anymore so he is using a type of artificial intelligence (AI) called a recurrent neural network (RNN) to write the next book.
“I’m a huge fan of Game of Thrones, the books and the show,” Thoutt told Motherboard. “I had worked with RNNs a bit in that class and thought I’d give working with the books a shot.”
Thoutt fed the 5,376 pages of the first five books into the RNN, gave the network a prime word for each chapter and instructed it on a word limit.
According to Denny Britz, a former member of the Google Brain team, RNN’s are good at making use of sequential information. “RNNs are recurrent because they perform the same task for every element of a sequence, with the output being depended on the previous computations.” This makes RNNs great at Natural Language Processing (NLP), which is the ability for machines to use and understand language.
Spoilers? Kind of…
The results of Thoutt’s experiment are fascinating but not the greatest literature ever.
If you are really hardcore, you can read the whole five chapters over at Github. Here is a taste from the opening for chapter one. It may be enough for you:
Arya saw Jon holding spears. “Your grace,” he said to an urgent maid, afraid. “The crow’s eye would join you.”
“Aye, Pate.” the tall man raised a sword and beckoned him back and pushed the big steel throne to where the girl came forward. Greenbeard was waiting toward the gates, big blind bearded pimple with his fallen body scraped his finger from a ring of white apple. It was half-buried mad on honey of a dried brain, of two rangers, a heavy frey.
“Six men wanted to kill one Stark, this grey o’ all of three.”
“Was sam old enough, or sad?”
“They were to be reborn away in my blood, so Jaime seems to like a man,” Sansa said feebly.
Shakespeare it ain’t.
“It’s obviously not perfect. It isn’t building a long-term story and the grammar isn’t perfect. But the network is able to learn the basics of the English language and structure of George R.R. Martin’s style on its own,” Thoutt told Motherboard.
But later the AI does make some interesting predictions, including Jaime killing Cersei (quite likely actually), Varys killing Daenerys (nah) and Jon riding a dragon (probably).
It’s all very interesting but there’s clearly a long way to go before AI will be banging out a best seller. As a person who earns his living at the keyboard, that’s just fine with me.