News for hackers. Stuff that matters.
Re:Truth from Zero? by alasdair_ on Tuesday December 19, 2017 @12:26PM (#15961859)
>did you look at the already existing playing MTG AIs: https://www.slightlymagic.net/wiki/List_of_MTG_Engines

Yes. I'm very likely going to use the guts of XMage to handle card text and encoding the game state and all legal actions. I'm deliberately trying to get a simpler version with only three cards working first so I can see if it's possible to "solve" (i.e. test every single possible action and response for every possible game and determine the optimal play each time) such a game.

A major issue is that determining what is in the opponents hand based on previous plays is pretty important in situations where such information cannot be brute forced and instead needs to rely on dependent probabilities.

>I believe exhaustively trying out all decks is not going to fly and deckbuilding should be centered around synergies + looking at what currently works (top decks).

I had decent success building a GA that could tweak the list for a simple burn deck by adding or removing single cards as a mutation. I only tested against a very simple opponent and all potential plays were hand-coded.

>I would personally settle on an AI bot that plays perfectly that I could feed decks to test.

The issue is that "plays perfectly" is an extremely tough bar (even against only one opposing deck). As a trivial example: Magic is full of "infinite" combos where a given loop can be completed an arbitrary amount of times. Knowing the "correct" point to stop the looping is extremely tough to code perfectly.

It's also possible to have, say, a trillion tokens on the board and it's legal to pick any one of them as a target - handling this kind of situation is also pretty hard to handle computationally.

Re:Truth from Zero? by iitalics on Tuesday December 19, 2017 @02:59PM (#15963660)
>It's also possible to have, say, a trillion tokens on the board and it's legal to pick any one of them as a target

Even more entertaining, is the fact that (IIRC) there are certain combos that cause infinite loops that can't interrupted, e.g. if neither player has a counter or kill spell, then the turn lasts indefinitely.

Re:Truth from Zero? by alasdair_ on Tuesday December 19, 2017 @03:28PM (#15963931)
At least if you find a general purpose-solution to "does this end?" you've also solved the Halting Problem. :)
Re:Truth from Zero? by catmanjan on Tuesday December 19, 2017 @10:15PM (#15966733)
I believe the creator of the loop loses the match in this case for slow play.
Re:Truth from Zero? by mirceal on Tuesday December 19, 2017 @12:56PM (#15962177)
yeah. defining the problem as hard does not even begin to describe it.

I believe that an AI that plays perfectly while seeing everything (i.e. oppponent hand + both libraryies, so no hidden state) would still be an impressive accomplishment and could be used to fine tune the deck-building process.