deckstats.net
You need to be logged in to do this.
The buttons above will open in a new window. Please return to this window after you have logged in. When you have logged in, click the Refresh Session button and then try again.

Author Topic: Magic Complexity study  (Read 813 times)


Morganator 2.0

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2669
  • Karma: 2550
  • Decks
Re: Magic Complexity study
« Reply #1 on: May 08, 2019, 04:19:00 am »
Is there a way to view this article without all the annoying pop-ups that want to make you punch a hole in your screen?

On a related note, is anyone selling computer monitors for cheap?

Edit: figured out how: load the article, then kill your internet connection. You guys can just read it here.

“Magic: The Gathering” is officially the world’s most complex game

A new proof with important implications for game theory shows that no algorithm can possibly determine the winner.

Magic: The Gathering is a card game in which wizards cast spells, summon creatures, and exploit magic objects to defeat their opponents.

In the game, two or more players each assemble a deck of 60 cards with varying powers. They choose these decks from a pool of some 20,000 cards created as the game evolved. Though similar to role-playing fantasy games such as Dungeons and Dragons, it has significantly more cards and more complex rules than other card games.

And that raises an interesting question: among real-world games (those that people actually play, as opposed to the hypothetical ones game theorists usually consider), where does Magic fall in complexity?

Today we get an answer thanks to the work of Alex Churchill, an independent researcher and  board game designer in Cambridge, UK; Stella Biderman at the Georgia Institute of Technology; and Austin Herrick at the University of Pennsylvania.

His team has measured the computational complexity of the game for the first time by encoding it in a way that can be played by a computer or Turing machine. “This construction establishes that Magic: The Gathering is the most computationally complex real-world game known in the literature,” they say.

First, some background. An important task in computer science is to determine whether a problem can be solved in principle. For example, deciding whether two numbers are relatively prime (in other words , whether their largest common divisor is greater than 1) is a task that can be done in a finite number of well-defined steps and so is computable.

In an ordinary game of chess, deciding whether white has a winning strategy is also computable. The process involves testing every possible sequence of moves to see whether white can force a win.

But while both these problems are computable, the resources required to solve them are vastly different.

This is where the notion of computational complexity comes in. This is a ranking based on the resources required to solve the problems.

In this case, deciding whether two numbers are relatively prime can be solved in a number of steps that is proportional to a polynomial function of the input numbers. If the input is x, the most important term in a polynomial function is of the form Cxn, where C and n are constants.  This falls into a class known as P, where P stands for polynomial time.

By contrast, the chess problem must be solved by brute force, and the number of steps this takes increases in proportion to an exponential function of the input. If the input is x, the most important term in an exponential function is of the form Cnx, where C and n are constants. And as x increases, this becomes bigger much faster than Cxn. So this falls into a category of greater complexity called EXP, or exponential time.

Beyond this, there are various other categories of varying complexity, and even problems for which there are no algorithms to solve them. These are called non-computable.

Working out which complexity class games fall into is a tricky business. Most real-world games have finite limits on their complexity, such as the size of a game board. And this makes many of them trivial from a complexity point of view. “Most research in algorithmic game theory of real-world games has primarily looked at generalisations of commonly played games rather than the real-world versions of the games,” say Churchill and co.

So only a few real-world games are known to have non-trivial complexity. These include Dots-and-Boxes, Jenga, and Tetris. “We believe that no real-world game is known to be harder than NP previous to this work,” says Churchill and co.

The new work shows that Magic: the Gathering is significantly more complex. The method is straightforward in principle. Churchill and co begin by translating the powers and properties of each card into a set of steps that can be encoded.

They then play out a game between two players in which the play unfolds in a Turing machine.  And finally they show that determining whether one player has a winning strategy is equivalent to the famous halting problem in computer science.

This is the problem of deciding whether a computer program with a specific input will finish running or continue forever. In 1936, Alan Turing proved that no algorithm can determine the answer. In other words, the problem is non-computable.

So Churchill and co’s key result is that determining the outcome of a game of Magic is non-computable. “This is the first result showing that there exists a real-world game for which determining the winning strategy is non-computable,” they say.

That’s interesting work that raises important foundational questions for game theory. For example, Churchill and co say the leading formal theory of games assumes that any game must be computable. “Magic: The Gathering does not fit assumptions commonly made by computer scientists while modelling games,” they say.

That suggests computer scientists need to rethink their ideas about games, particularly if they hope to produce a unified computational theory of games. Clearly, Magic represents a fly in the enchanted ointment as far as this is concerned.
« Last Edit: May 08, 2019, 04:24:55 am by Morganator 2.0 »

nifty129

  • Guest
Re: Magic Complexity study
« Reply #2 on: May 08, 2019, 05:15:57 am »
That makes sense to me, the difference between magic and something like chess is that it's impossible to always know what the optimal play is. For example when do you hold up your counters and when do you drop your bombs. A human can determine that if you do not get to counter a spell turn 3, turn 4 it's best out to play something small to tell your opponent yes you know I have a counter and I know that you know, but I'm gonna keep pinging you with this small stuff till you grow the stones to play something. That's a non binary sequence of deductive reasoning.

Soren841

  • Hero Member
  • *****
  • Posts: 5092
  • Karma: 606
  • Decks
Re: Magic Complexity study
« Reply #3 on: May 08, 2019, 12:50:33 pm »
Define cheap, Morg.. also nifty, chess is a bad example because it is not a solved game. Checkers is better.
Nils is the God I worship

Morganator 2.0

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2669
  • Karma: 2550
  • Decks
Re: Magic Complexity study
« Reply #4 on: May 08, 2019, 01:57:38 pm »
Chess is a game that has been solved. Computer algorithms (most famously, Deep Blue) can beat chess grand masters. Even some of the chess games you can get on your phone have this algorithm; if you set the game to the max difficulty, you're likely playing against the Deep Blue algorithm.

The catch being that with games like chess and checkers is that any boardstate has a finite number of moves. Think about the starting state of chess: you have two knights with two different moves each, and eight pawns, with two different moves each (1 square forward or 2 squares forward). So on your first turn of chess, you have 18 different moves. Finite.

Now the same is true for a game like Magic: The Gathering. There is a finite number of cards in your hand, and a finite number of creatures that can attack. What makes games like this more difficult to solve, is that there is an element of randomness. You don't know what card is on top, and it can change the outcome of the game. Anyone who has ever top-decked a win knows this.

So as mentioned in the article, chess is solvable because you can test the outcome of every given move, for every given boardstate. Trading card games are harder, because they have an element of randomness to your starting hand, as well as random draws.

And I haven't even brought up deck building yet.

So I'm not surprised that Magic is the most complex real-world game. There is so much that goes into it.

But it is solvable, to some degree. Look at Standard. Every three months, is doesn't take long for people to figure out the meta. People very quickly figure out what the best decks for the season are, and this is because of a smaller card pool, and because there are so many people that brew decks for standard.

So while Magic is incredibly complex and difficult to solve, don't let that stop you from trying.

Soren841

  • Hero Member
  • *****
  • Posts: 5092
  • Karma: 606
  • Decks
Re: Magic Complexity study
« Reply #5 on: May 08, 2019, 02:20:40 pm »
You know the definition of solved right? Chess is unsolved
Nils is the God I worship

MonteTribal

  • Hero Member
  • *****
  • Posts: 546
  • Karma: 361
  • Decks
Re: Magic Complexity study
« Reply #6 on: May 08, 2019, 03:30:39 pm »
So as mentioned in the article, chess is solvable because you can test the outcome of every given move, for every given boardstate.

Chess is solvable, as there is a finite amount of moves, but there are way too many possible board states for current computing power to determine. Currently, modern computers win by using 'Perfect Play', which is looking several steps into the future for the most optimal plays. But they can only dig so far before running out of memory.

dokepa

  • Jr. Member
  • **
  • Posts: 90
  • Karma: 38
  • Decks
Re: Magic Complexity study
« Reply #7 on: May 08, 2019, 04:08:02 pm »
Neither is solved , but chess would be far more easier to be solved for it has the same pieces and same board stat at the beginning of each game . Now if you played the same magic cards and had the same opening hand and each deck was shuffled the same way it would be far less complex . Certainly a great trolling forum ( can I have my cookie now)  :D

crimsonking

  • Hero Member
  • *****
  • Posts: 620
  • Karma: 226
  • Decks
Re: Magic Complexity study
« Reply #8 on: May 09, 2019, 12:24:48 pm »
I think Magic is unsolvable because part of the rules are written on the cards and you don't know what cards your opponent has in his deck.
Being that correct, Magic is as much unsolvable as Yugi-oh or any other trading card game, which kind of sucks imho.  :-\

robort

  • Patron
  • Hero Member
  • *****
  • Posts: 1750
  • Karma: 434
  • Decks
Re: Magic Complexity study
« Reply #9 on: May 14, 2019, 12:14:47 am »
I haven't replied but lol my 2 cents. First it is partially solved and why I say is because we wouldn't have ban lists if some part of this game hasn't been solved.

2nd Optimization and for it to work one needs to make an optimal play everytime. You can program the computer to do this but it won't factor in luck as for example, your opponent top decking that card he/she needs. You can optimize your land from basic to fetch, shock et-cetra. Plus when the computer does the optimal play like say attacks into an opponent totally expecting no blocks but the opponent blocks with his llanowar elves.

Also depends on what format we are looking at for optimization which again brings in ban lists on certain formats. Are we letting the computer play with all magic cards or we letting the computer play casual magic, standard, modern, edh, legacy, tiny leaders, arch enemy or et-cetra?

The goal is to win and by optimizing play by obtaining that goal by the highest percentage possible to win. But no it won't be completely solved
A legend in my own mind or so what the voices keep telling me

crimsonking

  • Hero Member
  • *****
  • Posts: 620
  • Karma: 226
  • Decks
Re: Magic Complexity study
« Reply #10 on: May 14, 2019, 09:24:42 am »
From a general perspective you're right, but from a mathematical point of view I think your approach doesn't apply.
Let say you have a 3/3 creature and your opponent has a 2/2, the correct play would be to attack, unless the opponent has a combat trick like Giant Growth.
Ok, you'd say, let's evaluate the odds that my opponent has a combat trick in hand, if they are favorable I attack, if not I hold on.
Ok, I say then, but the opponent too can do so and decide whether to put Giant Growth or not against the odds.
That actually happened for instance before Treasure Cruise were banned in Legacy.
The deck to beat was UR Delver and players piloting it started swapping out Daze for something else because people would play around it anyway.
Again, I didn't read the actual demonstration, but I'm pretty confident Magic is unsolvable because of the deck building aspect of the game.
As for the ban list, that's not an argument because people would just play mirror matches, the game will be more boring but essentially the same.
By the way, the ban list too is part of the game, so you can't call it out to justify your point.

nifty129

  • Guest
Re: Magic Complexity study
« Reply #11 on: May 14, 2019, 07:45:06 pm »
You might have gone into a bit too much detail there. I think the point is that any algorithm from a coding point of view can only calculate within a given set of parameters.

Any instant card that a opponent could have, would have to be wagered against a expected deck list, so you could create a program that could win a game using one deck against another.

But as soon as the cards change, the variables change and the program no longer works.

Arena best of one is a great example, you don't know what decks you'll be facing, and have to react based on best guesses.

A computer scientifically can't win a game without being given the variables before hand.

We see this with practice bot sparky, she's terrible.

robort

  • Patron
  • Hero Member
  • *****
  • Posts: 1750
  • Karma: 434
  • Decks
Re: Magic Complexity study
« Reply #12 on: May 14, 2019, 11:36:00 pm »
As for the ban list, that's not an argument because people would just play mirror matches, the game will be more boring but essentially the same.
By the way, the ban list too is part of the game, so you can't call it out to justify your point.


Then by all means I thank you for making my point. It is the same because of the same goal. That goal is to win and by optimizing that win then one has to optimize the cards he/she is playing. The higher chance for someone to win then they are more then likely to play those cards.

This same concept is applied in texas hold-em. Pocket AA's are the best starting hand and are the best optimized chance of winning. There are more variables after this happens though.
There are cards banned that gave one the best optimized chance of winning but unlike waiting for pocket AA's to arrive, in magic those cards have already been choosen.

The ban list(s) wasn't created just for the sake of creating a banlist(s).

A legend in my own mind or so what the voices keep telling me