• Jon Snow (Kit Harington), in a scene from "Game of Thrones," season 5. Courtesy HBO. (AAP)Source: AAP
Here be spoilers about Game of Thrones characters, so read at your own peril.
Signe Dean

21 Apr 2016 - 2:18 PM  UPDATED 21 Apr 2016 - 4:06 PM

Hot on the heels of a recent network science study which mapped the relationships of Game of Thrones characters in order to determine their social influence, comes A Song of Ice and Data.

This time it’s a whole portal - a web app developed as part of a JavaScript course of the Technical University of Munich, Germany. The students “wanted to tell some of the Game of Thrones stories using data that we acquire on the web.”

Acquire data they did indeed. The project’s algorithms have been regularly scraping and analysing information from websites such as Wikipedia, Twitter, Wiki of Ice and Fire, and the Game of Thrones wiki, with results used in several projects on the website - such as a map that lets you follow characters across Westeros, and get a summary of information about each location.

But there’s more to it than just collecting and displaying info - with all this data at their fingertips, the young developers decided to run some stats while they wait for Winds of Winter - the sixth novel in the series - to come out.

“We figured that it will be pretty cool to design some machine learning algorithm that will answer the question that is on every Game of Thrones’ fan mind - which character is likelier to die next?”

As they explain on the website, machine learning “learns from a sufficiently large number of examples from the past to automatically compile statistics on them and to predict whether an event is likely to happen in the future.”

To do this, they found features common to all already dead characters and used these features to predict the likelihood of death for people still alive. The goal was to create a data set which describes each character - dead or alive - using the exact same features, over 30 of them in total.

Amongst these standardised features were things like appearance in a certain book of the series, marriage status, relation to a dead character, nobility, age, gender, and others.

According to their results, 43% of male characters were dead by the end of the fifth book, while 79% of women have survived. Meanwhile the most likely age for a character to die is between 31 and 40 years old, and men are more likely to die than women - 33% against 23% respectively.

But it’s possible to drill down to specific characters, too. According to the computation, the worst odds of survival at the moment are for the boy king Tommen Baratheon. There’s only a 3% chance he’ll make it through the next book or TV season.

The algorithm got it right when it comes to Stannis Baratheon, ranking him at 96% likelihood of meeting a grisly end, which has indeed already happened.

Sansa Stark has the best chance of survival right now - even though she’s been through hell, there’s a 97% chance she will keep surviving through the next instalment. Shockingly, Daenerys Targaryen is 95% likely to die soon.

But probably the most interesting outcome from this computation is the statistical fate of Jon Snow, whose demise in season 5, episode 10 was unwelcome by many fans, causing considerable outrage.

You see, the computer says there’s only an 11% chance of Jon Snow dying. Take from that what you will.

Read these next
Mathematicians shocked to find pattern in ‘random’ prime numbers
Researchers have discovered unexpected patterns in the last digits of prime numbers, adding to our understanding of the fundamentals of arithmetic.