Cambridge student's coding skills help him reach Pokémon World Championships

Published on June 15, 2026
Cambridge student's coding skills help him reach Pokémon World Championships
Stephen Bevan

Marcus Koh will compete in the international event’s Video Game Championships in August, as the global phenomenon this year celebrates its 30th anniversary.

And the 22-year-old – who came second in the Birmingham Pokémon Regional Championships 2026 in January – will ready himself for the challenge using a unique computer code he devised to predict how the Pokémon he has ‘trained’ are likely to fare against opponents, and how he can adjust their training to dramatically improve his chances of winning.

The code has transformed how Marcus approaches tournaments in the competitive esport, where players each manage a team of six Pokémon, but can select only four to battle against one another in a series of strategic, turn-based, matches. 

“Preparation is half the battle in Pokémon,” said Marcus. “And the preparation leading up to a tournament often requires quite a few weeks of work. Pokémon is similar to chess in that there are a lot of different elements to strategise and plan out, but there’s also a huge amount of customisation as players have to be deliberate about how they train their Pokémon to use in battle.”

“I’m someone who tries to win by doing my ‘homework’, and the code saves me a huge amount of time!”

Christ’s College undergraduate Marcus came up with the idea for the tool after studying the Computational Projects section of his Mathematics degree course. 

He said: “I’d never done computer coding before I came to Cambridge, but maths and Pokémon have certain things in common – skills that are transferrable. The analytical skills you need to assess your options in Pokémon are the same kind of problem-solving skills that are used all the time in maths.”

Marcus’ code lets him simulate Pokémon battles and calculate thousands of different possible outcomes. He can assess how his Pokémon are likely to perform against different opponents and, crucially, how much damage they are likely to sustain from an attack. Through training he can then adjust his Pokémon’s ‘stats’ – numerical values for attributes like ‘attack’, ‘defence’, and ‘speed’ – to massively improve his chances of success. 

Online calculators already let players calculate single-hit damage outcomes – barring a critical hit, there are a total of 16 possible outcomes for every attack –  but Marcus’ code goes further by assessing survival odds across multiple attacks, when an opponent attacks with more than one of their Pokémon, and the number of possible damage outcomes rises rapidly.

He said: “A double-attack scenario has 256 possible damage outcomes, and with more and more attacks the number of possible damage outcomes increases exponentially. I can use the code to calculate the probability that I will survive a combination of attacks, and see how I can change different aspects of my Pokémons’ training to increase my odds of winning.”

The code also uses the mathematical concept of recursion – essentially, solving a problem by breaking it into smaller versions of the same problem in an ongoing loop – to help Marcus win in a stalemate scenario, where Pokémon are barely able to damage one other and become locked in a battle in which neither can progress.

He said: “In maths, you might use a recursive loop to estimate things like the future populations of animal species – I used it to get my Pokémon into the best possible shape going into these long, drawn-out battles. I've turned an abstract situation into one governed by a set of mathematical rules.” 

Qualifying for the World Championships is no easy feat. At the end of the annual competitive season, during which thousands of players amass championship points, the top players from each of the various regions in the world earn a place. In the case of Europe, players need to finish in the top 80 to qualify. 

“The World Championships is a highly selective, invite-only esports tournament attended by top Pokémon players from all over the world,” said Marcus. “It is the pinnacle event of the competitive season; a strong performance there would truly solidify your mark as one of the best players in the world.”

Amazingly, Marcus, an active member of the University’s Pokémon Society, has only been playing Pokémon competitively for three years. Last year he came 138th out of almost 400 competitors in his first World Championships, held in Anaheim, California. And as well as coming second in the Birmingham Regional Championships in January, he also competed in the Seville Special Championships in March and achieved a top 16 placement.

He said: “I’m thrilled to be competing in my second World Championships. I feel that I’ve learned and improved so much as a player since last year, so I’m really hoping to give it my best shot. With this year’s World Championships being played on the new platform Pokémon Champions for the first time ever, I’m excited to take on the challenge of adapting to the new format and mechanics.”

 

“I’m someone who tries to win by doing my ‘homework’, and the code saves me a huge amount of time!”
Cambridge maths undergraduate Marcus Koh
Cambridge University maths student Marcus Koh
Yes