Forget the White Walkers. Stop worrying about the Lannisters. The most dangerous threat to your favorite characters isn’t a dragon or a traitor. It’s a computer program. Students at the Technical University of Munich built a machine learning algorithm to answer the big question fans have been screaming about for years. Who dies next in A Song of Ice and Fire?

The project uses data from A Wiki of Ice and Fire. It analyzed over 2,000 characters. The goal was to find patterns in George R.R. Martin’s brutal world. The algorithm looked at gender, age, social standing, and house affiliation. It tracked which books characters appeared in. It noted who was still alive.

The results were stark. Men die more often than women. Only 57 percent of male characters survive to the end of the fifth book. For women, the number is 79 percent. Nobility offers no protection. Peasants don’t fare much better. Being powerful just makes you a bigger target.

The algorithm predicts Tommen Baratheon will be the next character to die with 97 percent certainty.

The model ranks potential deaths based on these statistical markers. Tommen Baratheon tops the list. He sits on the Iron Throne. His predicted death probability is 97 percent. Stannis Baratheon comes in second. Daenerys Targaryen is third at 95 percent.

Does this mean the showrunners have to follow the code? No. The students admitted the model has limits. In testing, it only predicted a character’s death with 49 percent precision. That is barely better than a coin flip.

Still, the idea of a Game of Thrones death predictor is fascinating. It treats fiction like a dataset. It strips away emotion and looks for cold hard stats. Will Martin subvert the data? Can Jon Snow really come back? The algorithm doesn’t know. It just calculates odds.

We will have to wait and see if the machine was right. Or if the writer has a different script. For now, the numbers are the only prophecy we have.