Чи магія: Збір Тюрінга завершений?


24

Мені відомо, дуже конкретне питання, і я сумніваюся, що на нього відповість кожен, хто вже не знайомий з правилами магії. Перехресне повідомлення на Draw3Cards . Ось вичерпні правила гри Magic: The Gathering . Дивіться це питання для переліку всіх магічних карт. Моє запитання - чи гра Turing завершена?

Для отримання більш детальної інформації див . Публікацію на Draw3Cards .


1
(1) What is the input? Do you assume that you know the content and the order of the cards in both players’ decks? (2) To analyze its complexity, a problem must have infinitely many possible inputs. For example, we cannot say that chess is EXP-complete (even if we say so, it means that the generalization of the chess to an n×n board is EXP-complete). How do you generalize the game? (3) The game may be too complicated to analyze its complexity, but I do not know.
Tsuyoshi Ito

1
@Daniel: Thanks. In fact I checked it too, but I was not sure if anyone wants to analyze the game where each card except for land cards are restricted to at most 4 copies and only the number of land cards can grow.
Tsuyoshi Ito

1
@Daniel: Not sure if the logic works that way because there are several different types of land cards. After all, the original game itself may be complicated enough to be Turing complete. What I am not sure is whether the asker really wants to analyze the game where almost all cards in a deck are necessarily land cards. I will wait for the asker to reply.
Tsuyoshi Ito

4
@Daniel: That's not a reasonable objection! Most hardness reductions for games output something that looks more like the reduction than the original game. (Hamiltonian cycles don't naturally arise in draughts, for example.)
Jeffε

1
@Tsuyoshi - I think that would be asking if Magic is decidable. For this question to be meaningful, you could assume perfect information - all libraries and hands are revealed, and all random coin-tosses and the like are predetermined. Is it possible to determine from every Magic position who the winner is?
ripper234

Відповіді:


21

Alex Churchill (@AlexC) has posted a solution that does not require cooperation between the players, but rather models the complete execution of a universal Turing machine with two states and 18 tape symbols. For details, see https://www.toothycat.net/~hologram/Turing/ [archive].


1
The link is dead for me. Should we recreate the solution in the answer to be complete?
Artem Kaznatcheev

1
The solution is being hosted at toothycat.net/~hologram/Turing for the moment.
AlexC

15

Ok, I have a solution that avoids the mana burn issue I ran into. This is kind of a hack, since I need to make the assumption that players can identify specific lands, which I don't think is dealt with in the rules. In practice this is the case, since they can be arranged in a line based on the order in which they are played.

First, the full description of the problem from the Draw3Cards site:

A positive answer would be composed of these components:

  1. A computable function fM from Turing Machines to ordered Magic decks (where the order of the library matters)
  2. Two well defined deterministic & computable strategies to play Magic (that do not depend on the deck). Let's call them Strategy TS (Turing Strategy) and Strategy IS (Input Strategy).
  3. A computable way fI to encode any string of zeros and ones as a Magic Input deck. One such way would be to take the Gödel number of the string and put as many islands in the Input deck.

The additional condition that should be satisfied is this: Given a Turing Machines TM, let us consider the result of the Magic game between strategy TS playing with deck fM(TM) against strategy TI playing with deck fI(I), when the libraries are not shuffled before the game starts. This game should be won by the first player if and only if TM(I) = true.

So here is the idea. We have 2 players, A and B. B will supply the input, while A will directly implement a Turing machine. The decks will be composed almost entirely of land, but also the Gemstone Array card to void mana burn. A will have 3 types of land: Islands, Mountains and Forests. The basic idea is to use tapped land to represent a 1 and untapped land to represent a 0. Islands will be used to represent the state of the tape, Mountains to index the current position along the tape and Forests to represent the internal state of 24 state 2 symbol Turing machine (I believe there is a universal one due to Rogozhin).

The decks are ordered as follows: A's deck: Gemstone Artifact; 6 Forests (since 25=32>24 plus an additional forest); For m=0 to infinity: 2m+1 Islands followed by 1 Mountains. Note that the number of mountains (which can be either tapped or untapped) is always the number required to index every island, plus a halting state.

B's deck: Gemstone Artifact; 6 Forests (since 25=32>24 plus an additional forest); For m=0 to infinity: 2m+1 Input Lands followed by 1 Mountains. Note again that the number of mountains (which can be either tapped or untapped) is always the number required to index every island held by A, plus a halting state. The Input lands are taken to be Plains (to represent a 0 in the input string), Swamp (to represent a 1 in the input string) and Islands (which are used after the end of the input string has been reached.

Strategy: A and B both play one land a turn in the order in which they are drawn. When each has drawn 4 forests they play Gemstone Artifact. Note A goes first, so already has an Island when B draws plays his first input card.

A and B simply continue to place their cards in order until B has exhausted their Plains and Swamps and plays their first Island. On his next go, A for all i taps his ith Island iff Bs ith Input Land was a swamp. A initialises his turing machine by tapping his first Forest and Mountain. If he has tapped an odd number of cards he taps his extra forrest, and uses all this mana to add tokens to Gemstone Array. From here on the play proceeds as follows: B uses their turn to simply mirror the state of A's mana. B taps his ith Input Land iff A's ith Island is tapped. Similarly B taps his ith Forest(Mountain) iff A's ith Forest(Mountain) is tapped. As A always taps an even number of cards, so does B, and the mana is used to add tokens to Gemstone Array.

On A's turn, all of A's mana becomes untapped, so A looks at the state of B's mana, represents the state of A's mana on the previous turn. A applies the transition rule according to the universal (24,2) machine to B's state to obtain his new state.

Гра триває таким чином до тих пір, поки машина для твердіння не зупиниться. У цей момент А ставить свої гори в зарезервований «готовий» стан (все невикористаний стан). Якщо машина Тьюрінга зупинилася у прийнятому стані, B копіює штат гір А, але вибирає всю їхню землю, що залишилася, нехтуючи використанням масиву Gemstone, тим самим розпочинаючи процес самогубства шляхом спалення мани. На черзі А, якщо гори Б перебувають у стані "закінченого", а вся інша земля Б пробита, А просто нічого не робить (зауважте, що його гори автоматично знаходяться у "закінченому" стані). Якщо гори А знаходяться в готовому стані, але нічого іншого не витягується, Б продовжує самогубство шляхом спалення мани. Це повторюється, поки Б не помер.

Якщо ж машина закінчується у стані відхилення, B залишає усі їх картки невикористаними. Якщо всі картки Б не використані, А натискає на всі його картки, починаючи той самий процес самогубства шляхом спалення мани. Якщо картки A не мають гірських карт, а гори невикористані, B залишає усі свої картки невикористаними. Це призведе до продовження самогубства мани, поки він не програє гру.

Це повинно відповідати критеріям, про які йдеться у запитанні, і, отже, коли це замовлення дозволено, я вважаю, що гра Тюрінг завершена в тому сенсі, який описаний у питанні.


2
Cool. An extra thought: As long as any player taps more than 1 land per turn, you can use charges on the Gemstone Array to avoid mana burn. For example, if I need to tap 3 lands, I turn two mana into a charge, spend the charge to generate one mana, then spend the two remaining mana to create a new charge. -- of course, you solved this problem already anyway. :)
Daniel Apon

2
Aewsome! It might also be easier to simulate a 2-counter machine (using different types of mana as the counters) instead of directly simulating a Turing machine: en.wikipedia.org/wiki/…
Jeffε

3
Your reduction also implies that (cooperative) Magic with a finite number of cards is PSPACE-hard.
Jeffε

3
@Joe - there is no longer mana burn in Magic. You could use Platinum Angel to avoid losing due to running out of cards in your graveyard.
ripper234

1
@Joe - you missed my comment earlier that the concept of mana burn has been completely removed from the rules. You can fix it by having each player have a copy of Fireball in his deck.
ripper234

7

Alex Churchill, Stella Biderman and Austin Herrick published this paper showing that Magic is Turing Complete

Abstract—Magic: The Gathering is a popular and famously complicated trading card game about magical combat. In this paper we show that optimal play in real-world Magic is at least as hard as the Halting Problem, solving a problem that has been open for a decade [1], [10]. To do this, we present a methodology for embedding an arbitrary Turing machine into a game of Magic such that the first player is guaranteed to win the game if and only if the Turing machine halts. Our result applies to how real Magic is played, can be achieved using standard-size tournament-legal decks, and does not rely on stochasticity or hidden information. Our result is also highly unusual in that all moves of both players are forced in the construction. This shows that even recognising who will win a game in which neither player has a non-trivial decision to make for the rest of the game is undecidable. We conclude with a discussion of the implications for a unified computational theory of games and remarks about the playability of such a board in a tournament setting.

Використовуючи наш веб-сайт, ви визнаєте, що прочитали та зрозуміли наші Політику щодо файлів cookie та Політику конфіденційності.
Licensed under cc by-sa 3.0 with attribution required.