Artificial Intelligence

Software engineer trains artificial intelligence to finish ‘Game of Thrones’ novel


As the seventh season of the hit HBO series Game of Thrones came to an end last Sunday, fans all over the world are desperately counting the days until the next installment in the series airs on TV, which is expected not before spring 2019. Meanwhile, readers of A Song of Ice and Fire, the book on which the TV show is based, have been waiting even longer for the next chapter to come out. A Dance with Dragons, the fifth novel in a seven-part series was published back in 2011, and the writer George R.R. Martin has been writing the next part ever since. With no release date in sight, however, fans are growing impatient, especially given the fact that the book ended with a series of cliffhangers which makes the waiting even more excruciating.

However, one full-stack software engineer and a staunch fan of the serial has decided to cut the time short and write his own version of the book. Zack Thoutt has been training a recurrent neural network (RNN) to predict the events of the unfinished sixth novel of the series and write his own ending. He has completed a course on artificial intelligence and deep learning and decided to apply the knowledge he gained into something he found useful. “I’m a huge fan of Game of Thrones, the books and the show,” Thoutt told Vice’s Motherboard.  “I had worked with RNNs a bit in that class and thought I’d give working with the books a shot.”

Neural networks are generally a class of machine learning algorithms that imitate the thought processes that are naturally going around in animals brains, while Thoutt is using a subclass called a recurrent neural network that works well with sequences of data such as text. “You take a set of input data, pass it through the network, and get a set of outputs,” Thoutt said. “In order to train these models, you need to know what the model should ideally output. The neural network compares the data it outputs with the targets and updates the network learns to better mimic the targets.”

Using this model, Thoutt added the 5,376 pages of the first five books to the network, which resulted in five full predicted chapters which he published online. He admitted there were certain problems during the process. For instance, the network has written a few times about the characters who have already died.

Sansa Stark actually being of House Baratheon, Jaime Lannister killing his sister-lover Cersei, Jon Snow riding a dragon, Varys poisoning Daenerys are just some of the predictions that will intrigue and amuse the fans of the series, and that were produced by the artificial intelligence Thoutt programmed. Some of the written fragments are already existing on fan-theories websites but Thoutt admits he didn’t feed the network with anything but the original books. In the absence of a new reading material, however, passages written by Thoutt’s network will maybe do the trick for the millions of deprived fans, at least until Martin finishes his long-awaited book.



To Top