Guide

Magic the Gathering is the most complex game of all

Spektrum der Wissenschaft
2.3.2020
Translation: machine translated

Surprise for algorithmic game theorists: they would never have dreamed that a game could be so complex. However, "Magic" can sometimes overwhelm computers, as a recent research paper shows.

Whoever was in Las Vegas in September 2018 could easily feel transported to the popular TV series "The Big Bang Theory": In one room, 24 grown men were battling each other with colourful fantasy playing cards depicting magical creatures and spells. It was actually the annual "Magic: The Gathering" world championship, in which players compete for prize money totalling 300,000 dollars.

In the meantime, the card game has also captivated many people from a scientific point of view, as it seems to be overturning decades-old beliefs of game theorists: Apparently Magic, with its many cards, complicated rules and ingenious strategies, is more of a challenge for computers than computer scientists thought possible.

For extremely large numbers, there is therefore no efficient way to decompose them into their prime factors, while it is very easy to check the result. Such problems are known in computer science as NP problems.

Surprise for game theorists

However, as Churchill and his two colleagues have now shown, this is the case with Magic. They even suspect that the trading card game could be even more complex. To come to these conclusions, the researchers used a common concept in theoretical computer science: a so-called Turing machine. This computer model, introduced in 1936 by British scientist Alan Turing, simulates the way classical computers work.

A classic question in the discussion of Turing machines is whether a machine ever reaches the end of the calculation of a problem or continues to run endlessly. As early as 1936, Turing showed that there is no way to answer this question in general for all possible algorithms.

Churchill and his team have now succeeded in proving that the question of the outcome of a Magic duel corresponds to the halting problem: this means that there are game situations in which a computer cannot calculate who will win.

The scientists arrived at the surprising result by showing that Magic: The Gathering has the same functions as a Turing machine, or "Turing-complete", as experts say. In other words, Magic can be used to simulate a Turing machine and vice versa.

To this end, Churchill, Biderman and Herrick constructed a special starting situation between two Magic players and identified the possible moves with the essential functions of a Turing machine: reading, writing and moving the tape. As a result, the game has all the properties of the theoretical computer model and can be analysed using the tools of theoretical computer science.

A game as a computer

Before the start of a Magic game, a player selects 60 cards from their collection - this selection from the huge pool of available cards and the resulting combination possibilities lead to the extraordinary complexity of the game. Once the player has made a selection, he carefully shuffles his cards and then takes seven of them into his hand. The remaining cards form their draw pile.

The cards include creatures that attack the opponent, as well as spells and artefacts. One card is drawn at the start of each round. As soon as a player has to pick up a card from an empty draw pile, they lose. Otherwise, you defeat your opponent by reducing their life points to zero or lower with targeted attacks.

In the game designed by Churchill and his colleagues, Alice and Bob compete against each other. Bob is in a situation where he has no cards in his hand and his draw pile is empty - so he is on the brink of defeat. However, he controls all the creatures on the table. Alice can therefore only try to attack Bob's creatures with the cards from her deck.

In the initial state, the tape is arranged so that the read head rests on the weakest creature (2/2); to the right of it are all white creatures in order of strength and, similarly, all green creatures to the left. A white creature with the values 5/5 is therefore on the third space to the right of the head. The type of creature is indicated by a symbol on the square.

Churchill and his team have designed the game in such a way that Bob cannot win. Therefore, the Turing machine only stops when Alice wins, otherwise it continues to run forever. Such situations can actually arise in real Magic games. There is even a rule according to which a game ends in a draw if moves are repeated over and over again.

The researchers were able to show that their imagined game situation can actually occur in a realistic duel - and is not just an artificial construct. They also assume that other game situations can lead to similar dead ends. The authors write that the game therefore reaches at least complexity level NP. However, to check whether it is perhaps even more complex, a different approach must be taken.

However, the result remains astonishing from a game theory perspective, even if it may come as less of a surprise to Magic players: some of them have long boasted that they have mastered an extremely complicated game. Now they can officially claim to play the most complex game in the world.

Try it out now

Spectrum of science

We are a partner of Spektrum der Wissenschaft and want to make scientifically sound information more accessible. Do you like the articles from Spektrum? Then follow Spektrum der Wissenschaft or subscribe to the magazine and support scientific journalism.

[[small:]]

25 people like this article


User Avatar
User Avatar

Experts from science and research report on the latest findings in their fields – competent, authentic and comprehensible.


Toys
Follow topics and stay updated on your areas of interest

Guide

Practical solutions for everyday problems with technology, household hacks and much more.

Show all

These articles might also interest you

  • Guide

    10 board and card games you must have

    by Alessandro Grieco

  • Guide

    From action-packed to strategic: 5 board games for the whole family

    by Michael Restin

  • Guide

    Five quick games with Jass cards

    by Ramon Schneider