Timetwister solitaire (Magic theory)

Discussion in 'General CPA Stuff' started by Oversoul, Nov 22, 2017.

  1. Oversoul The Tentacled One

    Initially, I started this on Psarketos' Sway of the Stars thread, but it took on a life of its own pretty quickly. The discussion of Sway of the Stars as Shahrazad emulation got me thinking about something from many years ago, and I think there was at least one other Psarketos Magic theory thread in which I wanted to bring it up. So I'm doing it now. Starting a new thread because this is quite the tangent.

    Firstly, I want to note that while this story is hypothetical, meaning fiction, it's actually a kind of fusion of two different real-life incidents, but neither one individually works for my purposes when it comes to Magic theory, so I have to combine the two real events into one false one and exaggerate a bit. Not that it really matters, but there you have it. Also, both of my "based on a true story" events that I use as inspiration for this fantasy scenario on happened while mana burn was still part of the game. For our purposes, this will be a world without mana burn. I was actually opposed to the removal of mana burn from the game and argued against it here at the CPA, but I digress. Mana burn doesn't actually entirely invalidate the concept I have in mind, but it adds a layer of complexity to it and my scenario is a bit involved already. So to simplify the matter, let's just go with the official rules and have no mana burn...

    In this scenario, I'll be piloting a 60-card pile consisting entirely of cards from my favorite Magic set ever, Unlimited Edition. Here's my deck (which, alas, I do not own in real life, but perhaps some day)...

    4 Black Lotus
    4 Ancestral Recall
    4 Time Walk
    4 Fork
    4 Timetwister
    4 Wheel of Fortune
    4 Demonic Tutor
    4 Mox Pearl
    4 Mox Sapphire
    4 Mox Jet
    4 Mox Ruby
    4 Mox Emerald
    4 Sol Ring
    4 Dark Ritual
    3 Regrowth
    1 Fireball

    Now, some would call this deck unfair (among other things). In terms of Magic theory, we can pretty easily start to suspect that it is not the ideal first-turn kill deck for an environment with no restricted cards. But what if we want to build such a deck strictly out of cards from the greatest Magic set of all time (Unlimited Edition)? Still probably not ideal, but it looks like an excellent starting point. It's extremely fast, yet also one-dimensional, so opponents might be able to sabotage our attempts at winning. But my opponents, cads that they are, attempt to defeat me with decks consisting of cards from outside the glorious Unlimited Edition. How horrendous. At first, they are caught off-guard by the sheer speed and consistency of my deck. Oh, they try to race me with an early Entomb into Reanimate or to stop me with Force of Will, but their efforts fail. But they're starting to get wise to this. A well-timed Misdirection on my Fireball could be disastrous. It's just not fair: the new cards are so broken. I resolve to update my deck. Tomorrow, that is. Not just yet.

    And so I find myself sitting across from a new opponent. We'll call him, uh, Eddie Brock.

    Me: Mox Pearl, Mox Sapphire, Mox Ruby, tap the Pearl for Sol Ring, Time Walk, done. Next turn, I'll tap Sapphire and Ring for Timetwister, Mox Jet, Mox Ruby, tap Pearl for another Sol Ring, Black Lotus, and wow, I guess I fizzle. Pass the turn.
    Eddie: Island, Extract.
    Me: Fork the Extract.

    I search Eddie's library and find nothing of interest. I exile his Seventh Edition Vizzerdrix. Eddie searches my library and exiles my Fireball, of course. Confident that exiling my Fireball has utterly defeated me, Eddie Brock passes the turn.

    Eddie: You lose.
    Me: Do I? Black Lotus, Regrowth the Timetwister, cast Timetwister, Mox Jet, Dark Ritual, Dark Ritual, Demonic Tutor twice, Time Walk with Fork on my own Time Walk, done. Next turn, Ancestral Recall, Black Lotus, Mox Sapphire, Mox Emerald, Time Walk, Wheel of Fortune...
    Eddie: You can't win! I got rid of your kill card. You even wrote, "kill card" on that Fireball. You have no win condition. All you can do is take more turns. You have no way to kill me.

    But Eddie has it wrong...

    Here is where we enter the realm of Shahrazad Solitaire. I have lost my "kill card" for my deck. I cannot win through ordinary means. However, my deck has now "stabilized." It is easy for me to use a combination of Timetwister, Wheel of Fortune, and Regrowth to churn through my deck casting Time Walk and Fork (copying Time Walk) to generate multiple turns. I can power this engine with my Mox cards alone if necessary, but with the addition of Black Lotus, Demonic Tutor, and Dark Ritual, this is all even more explosive. It's also not strictly determinate. There is no guarantee that at a given point in the loop I will be able to continue generating extra turns. For example, I might cast Timetwister and draw into the following seven-card hand...

    Black Lotus
    Black Lotus
    Dark Ritual
    Black Lotus
    Dark Ritual

    But even though that will eventually happen, this deck is constructed such that the average turn can generate far, far more extra turns than would be necessary to make up for the turns in which no extra turns can be generated. Initially, when over half of my draws on average produce mana and do nothing else, it is possible that I get stuck, that I cannot find a way to cast Time Walk and must actually pass the turn to Eddie. But once we've passed a certain threshold, turns without a single Time Walk being cast become increasingly rare, and indeed turns with only one Time Walk become increasingly rare as well.

    Intuitively, once we know that once we've passed this threshold, we can continue taking extra turns indefinitely, never once allowing Eddie to take another turn. By Eddie's own admission (technically we didn't see his hand off the Forked Extract, so we don't know 100% of his deck but we're assuming it has no cards that can disrupt us on our own turn on the basis that he was up-front about this), he can do nothing to stop us and is effectively out of the game until the extra turns are depleted and he is allowed to untap.

    Infinite loops in Magic are powerful and can, in many environments, be practical enough to be competitive. But as far as theory goes, most infinite loops are straightforward because they are determinate. Fallen Angel eats Ornithopter and gets bigger, Enduring Renewal brings Ornithopter back, Fallen Angel eats Ornithopter and gets bigger, rinse, repeat. Once the loop is there, it's the same every time and every possible outcome is easy to account for. The loop in my deck, however, is indeterminate. I loop Timetwister, Regrowth, Time Walk, and Fork to generate extra turns, but the order in which those cards come up and in which other support for them in the deck arrives, well, that's random. And like I said, intuitively, we can see that once my deck gets going, it doesn't ever have to stop. That might not be the case for every indeterminate loop! I don't know if Magic has any such case. I do not remember ever having seen one, but it seems logical that such a deck could be constructed. What I mean by this is that we might have a deck of such a composition that it could generate a loop that would, eventually, fail.
  2. Oversoul The Tentacled One

    Intuitively, this deck, once it passes that threshold, will not fail. But we cannot prove that! Admittedly, mathematical proofs are not really my wheelhouse, though. But I do know a bit about eigenstates, and a randomized library of Magic cards can be thought of as a bunch of eigenvalues. Uh, that might be a bit esoteric. For those who didn't have the misfortune of studying far too much math in school, the plain English way of saying this is that a library of Magic cards can be described by the order of the cards in it, and the number of possible configurations is determined by both the number of cards in the library and by the frequency with which different cards occur (for our purposes, hitting Dark Ritual #1 followed by Black Lotus #1 followed by Fork #3 is identical to hitting Dark Ritual #2 followed by Black Lotus #4 followed by Fork #1).

    As I stabilize my infinite turns loop, my goal is still to kill Eddie. How? By decking him, of course. The problem is that Ancestral Recall, even with Fork and Regrowth on every single one, won't do it. After a Timetwister, Eddie has 7 cards in hand, one on the battlefield (Island), and 1 in exile (Vizzerdrix). That means I need to deck his 51-card library. Ancestral Recall cast 4 times with Fork cast 4 times copying Ancestral Recall and Regrowth cast 3 times to recast Ancestral Recall could be used to force Eddie to draw 33 cards. I may not be a mathematician, but I'm pretty sure that 51 is greater than 33. This means we'll need to make Eddie draw more cards!
  3. Oversoul The Tentacled One

    Wheel of Fortune could do it. If we were to cast each of our copies of Wheel of Fortune, that would force Eddie to draw 28 more cards. 33+28=51. That's exactly insufficient. It would be enough if we could pass the turn to Eddie, but we can't, so it's off by just 1 card. So that's a problem for me. But I have another, even bigger problem. Casting each of my Wheels also makes me draw 28 cards. I have 1 card in exile (Fireball), 1 card in my graveyard (Timetwister), and 7 cards in my hand. If, to build the consistency of my extra turns engine, I've played every artifact in my deck, then I would have 24 cards on the battlefield (4 of each Mox and 4 Sol Rings). That would leave my library, at the start of this, with 27 cards. Casting each of my Wheels would be exactly enough for me to deck myself. I'd be just shy of being able to deck Eddie and my own library would be just the right size for me to deck myself. Bad on both ends. Incidentally, I didn't contrive this scenario so that the math worked out that way. I already had the scenario (loosely based on two real-life games of Magic that happened years ago) and only did the math just now. Crazy. Anyway, yeah, under these conditions, I couldn't win...

    ...but I saw the problem coming even before I counted cards. It was apparent from looking at the game: Eddie has a bigger library than I do and my deck wasn't built to deck people in this manner because Fireball was my kill card. Can I still make this work? I think I've already laid out the answer. It's in those 24 cards. Each one I put on the battlefield stays there forever, consigning me to a smaller library. If my own library is bigger, I can survive all 4 Wheels. Leaving one Sol Ring or Mox in my hand, ignoring it as chaff to thicken my library and never, ever casting it, is itself sufficient to keep me alive after 4 Wheels. I'd have an empty library, but I wouldn't be decked. And neither would Eddie. So I don't have a path to victory doing that. See where this is going?

    If I plan ahead, I leave enough artifacts uncast that my library after a Timetwister will be big enough to withstand a Forked Wheel of Fortune plus 3 regular casts of Wheel of Fortune. I need to have a library that is, at minimum, 35 cards thick. By forcing Eddie to draw 35 cards off Wheel of Fortune, I reach the possibility of decking him by making him draw more than 16 cards. I need to use a single Fork on Wheel of Fortune, but the other 3 can be reserved for Ancestral Recall, as can my 3 Regrowths. That is more than enough Ancestral Recalls. In fact, I don't even need to Fork all of them. I just need to target him with 6 copies of the card in total, getting there with any combination of Ancestral Recall drawn off Wheel of Fortune, Ancestral Recall copied with Fork, and Ancestral Recall retrieved by Regrowth.

    The first question would be whether I can even get an extra turns engine to go off while holding onto 8 or more of my artifacts. I don't know of a mathematical model that Magic theory could use to answer this, but experience suggests that the answer is something like, "Yes, easily." The first few turns would be a little rough and I'd have a slightly higher chance of not hitting my fifth extra turn in a row, or perhaps my sixth or seventh. But the odds were already in my favor by that point and holding onto 8 artifacts in total should be fine and after a while, I'm confident that I'd be in the clear. If my early draws were lucky, I could be picky enough to prioritize getting Mox Ruby and Mox Sapphire onto the battlefield and holding onto Mox Pearl (no need for white mana), Mox Jet (Dark Ritual can turn black mana into more black mana), and Sol Ring (my instinct would be, if possible, to hold 2 and play 2). Mox Emerald would be of middling priority (Regrowth is nice, but if early draws had me playing other Mox cards, I'd hold onto Mox Emeralds and be fine).

    That gives me a possible path to victory, but it's not an especially likely one. What would need to happen would be that I'd draw exactly 1 Wheel of Fortune in my starting hand off the initial Timetwister. Then I would need to never draw 2 copies of Wheel in the same hand. On top of that, I would need to be sure not to hit Wheel of Fortune in the hand that I'd be discarding at instant speed (the one I'd draw off the Fork-generated copy of Wheel of Fortune). It needs to be this exact because I need to actually cast 5 copies of Wheel, and I don't want to waste my Regrowths because I need them to copy Ancestral Recall. I can't use Demonic Tutor to find cards at this point because that shrinks my library. So if Wheel ever gives me a hand that doesn't work, such as one that has multiple Regrowths early on when I still don't have targets for them, or one that has multiple copies of Wheel of Fortune, then my attempt to deck Eddie will not be able to work. And that's where Timetwister gets to dress up and play Shahrazad!

    As long as I navigate things correctly, I can "reboot the system" by finding and casting Timetwister, starting over from the same position in which I have 1 card in exile (Fireball), 1 card in graveyard (Timetwister), 7 cards in hand, 16 cards on the battlefield, and a 35-card library, while Eddie has 1 card in exile (Vizzerdrix), 1 card on the battlefield (Island), and a 51-card library. Mana isn't an issue because before I even bother trying to go for the kill, I make sure to start a fresh turn with untapped artifacts and a surplus of mana from Black Lotus and Dark Ritual being recycled by Timetwister.

    It is highly unlikely that a given start will have the cards in my library distributed such that I deck Eddie. Lots of individual eigenvalues produce the desired result, but their number is dwarfed by the number of ones that don't work. But if I'm paying attention and I bail out with Timetwister every time I hit a failure, then really, I'll get there eventually. I don't want to accidentally get rid of my last Timetwister and need Regrowth (which I want for Ancestral Recall) to get it back. To optimize this, part of my method here will be to only go for the kill when my initial hand off a "reboot" contains one copy each of Wheel and Fork and no more than one copy of either Timetwister or Regrowth. This isn't the only way to have a Timetwister available for rebooting, but it's the closest thing to a surefire way to have that option.

    Alas, it is too early to declare victory. I have a path to possibly decking Eddie, but I could still deck myself. My weakness lies in that Fork on my first Wheel of Fortune. It makes me discard my hand and draw 7 cards while another Wheel is on the stack. In order to deck Eddie, this maneuver is a necessary evil, but it comes with a danger. If this copy of Wheel hits the following hand...


    ...in any order, then I will be forced to discard all of my means of resetting the game. I'll deck myself instead of Eddie. But those seven cards all have to be next to each other (in any order amongst themselves, though) and they have to be on top of my library specifically when I cast Fork on Wheel of Fortune. No other combination kills me because I'm tracking my own cards and I always make sure to cast Timetwister or to cast Regrowth on Timetwister if I am about to run out of chances to reboot (if too many copies of Timetwister and Regrowth are in my graveyard already then when I draw the next one, I cast it).

    But astronomically unlikely as Eddie's potential victory would seem, my own victory also requires an unlikely sequence of cards. It's just that I can reboot if I don't get it. No Wheel and Fork in my first hand off Timetwister? Reboot. Multiple copies of Wheel in the same hand ever? Reboot. Forks and Regrowths with no Ancestral Recall to target? Reboot. Reboot, reboot, reboot. When in doubt, just start over. Because I can.

    Some massive, ridiculous number of eigenvalues, of library configurations, can't deck Eddie and will have to be rebooted. But hidden among them are ones that do work. I do have some options. Even if Fork and Ancestral Recall never coincide in the same hand, I can get my extra 2 copies through Regrowth. If Fork does coincide with Ancestral Recall, especially if this happens early on and multiple times, then I can potentially discard a Wheel of Fortune and later Regrowth it. Least numerous are the ones that kill me instead, the ones that draw exact wrong hand of cards off that Fork copy of Wheel. Because those are the only simple cases and the line between "this configuration can kill Eddie" and "this configuration will need to be rebooted" cannot be exactly specified. Or perhaps it could. But there are so many variables!

    The only way to know for sure is to play it out, and I think that could take a long, long time.
  4. Psarketos Metacompositional Theoretician

    The answer is Library of Leng ;)
  5. Oversoul The Tentacled One

    That would be cheating. As you can see, there is no Library of Leng in this decklist! However, I applaud you for choosing a card that exists in Unlimited Edition, the greatest Magic set of all time. :p
    Psarketos likes this.
  6. Psarketos Metacompositional Theoretician

    This post made me realize that a better "win at first upkeep of the game" deck would forgo direct damage for your Wheel of Fortune concept, with the added bonus of defeating any number of players at once.

    Library of Anticipation - Freeform deck (40 cards)

    15 Black Lotus
    9 Leyline of Anticipation
    2 Library of Leng
    14 Wheel of Fortune

    69% chance of milling every other opponent (presuming less than 70 card decks) with opening hand at the first upkeep of the game. I skipped finding the first mulligan stats as that is 3% better than the Channel Banefire option even with their first mulligan taken into account. Turns out you may be on to something regarding the power and utility inherent in Wheel of Fortune... ;)
    Oversoul likes this.
  7. Spiderman CPA Man in Tights, Dopey Administrative Assistant

    I commend you for playing against Eddie :D
  8. Oversoul The Tentacled One

    Good, good. Forsake the ways of the blasphemous Reforge the Soul and join the cult of Wheel of Fortune. Sure, it ain't cheap, but we have so much more mana open and we get that classic Daniel Gelon artwork. :p

    Take care not to trip over those signs lying around. The ones that say stuff like, "This card is banned" and "This card is on the Reserved List." Just ignore them and you'll be fine.
  9. Oversoul The Tentacled One

    In analyzing this scenario, I double-checked my own math because I was sure that somewhere in there I'd inevitably make a mistake. I seemed to be getting all of the numbers right and was actually just a little bit proud of myself, although in the back of my mind I did figure I'd made some numerical mistake that I didn't catch. Well, I still haven't spotted a numerical mistake, but I was casually reviewing the recent threads dealing with Magic theory, curious if there'd been bits I hadn't digested, and it suddenly dawned on me that there's an obvious conceptual mistake. Oops.

    Here's why. I correctly determined that to make Eddie vulnerable to decking with Ancestral Recall, I would need to cast 5 copies of Wheel of Fortune, forcing him to draw 35 cards on top of the 7 cards he drew off a Timetwister that had reset the system. And somehow, I made the assumption that this meant casting Fork on Wheel of Fortune. I did this even though I noted that I could use Regrowth on Ancestral Recall. Fork on Wheel of Fortune opens up the possibility that I don't get to use card that I would want to use, which creates the biggest hurdle this approach to maximizing lethal eigenvalues in my scenario and also leads to the remote possibility that I might deck myself if I happen to draw the exact wrong 7 cards off the Fork copy of Wheel of Fortune. But both of those problems go away if, instead of Forking Wheel of Fortune, I Regrowth it. Fork on Wheel of Fortune means that I lose access to any sorcery-speed stuff in the Wheel at the top of the stack. Regrowth means that I never give up on a card if I don't want to. Even though the actual computation of eigenvalues is a task beyond me, I can eyeball this and tell intuitively that Regrowth on Wheel instead of Fork on Wheel leads to far more of the eigenvalues I want, the ones that kill Eddie.
  10. Psarketos Metacompositional Theoretician

    I mean, if we are discussing conceptual mistakes, not simply replacing the Fireball with Library seems like a first premises kind of error... :)
  11. Oversoul The Tentacled One

    I realize that your comment is tongue-in-cheek, but I got this whole scenario based on a deck that I ran for casual playtests of broken decks and I really was running something very close to this. I vaguely recall that at one point I had a bunch of penny sleeves with basic lands shoved into them and slips of paper (never liked taking a marker to my basic lands for proxies, which was the usual technique at the time) with descriptions of Unlimited cards, including "(kill card)" on the slip of paper for Fireball. The whole purpose was to get at the concept of indeterminate loops that are theoretically playable but would require inordinate time.

    I first thought of the Four Horsemen deck from Legacy, but the problem there is that the whole thing is so darn practical! Sure, the deck is somewhat infamous for its own reasons, but outside the constraints of tournament logistical rules relating to time and "slow play" it functions just fine and kills reliably. Setting aside the issue of whether the judges should rule against that sort of thing, the entire concept of "slow play" is a tournament conceit that need not apply to Magic in any other setting. And if that tournament-specific constraint is ignored, Four Horsemen isn't that slow. You could get unlucky and take several minutes to shuffle into a good configuration, but it usually wouldn't take long because the configuration they need to reach is like...

    [top of library]
    [any cards or none]
    Dread Return OR Sharuum the Hegemon OR Blasting Station
    [any cards or none]
    Dread Return OR Sharuum the Hegemon OR Blasting Station
    [any cards or none]
    Dread Return OR Sharuum the Hegemon OR Blasting Station
    [any cards or none]
    Emrakul, the Aeons Torn
    [any cards or none]
    [bottom of library]

    That is, the whole library's order is irrelevant as long as Emrakul does not show up before those other three specific cards. The three specific cards can be in any order and at any distance from each other, so long as they all show up before Emrakul. And if that turns out not to be true and the library is in an order with Emrakul showing up before one of those cards, then the whole library gets shuffled back up and the process starts over. Oh, it's complicated compared to some decks, but in realm of all Magic theory, that scenario is exceedingly simple. So I wanted to kick it up a notch, to demonstrate that situations exist that lead to one player needing to repeat a more involved loop and to get a far more demanding configuration of cards. So I drew on experience to see what I could come up with. Having the foresight to run a copy of Library of Leng would give me the option to kill Eddie more easily, but that's kind of the opposite of the goal! If I were to devote some real work to this, I'd abandon the "all Unlimited cards" premise and contrive something where the kill has even more specific requirements.

    Anyway, I like the idea of pairing Library of Leng with Wheel of Fortune. Not sure if it has any practical applications, but it does look cool.
  12. Psarketos Metacompositional Theoretician

    "Practical applications" outside "winning at the first upkeep of the game in Freeform format," I suspect you mean!

    Also yes, my comment was tongue in cheek, though it could be rephrased more meaningfully along the lines, "If you value a particular state or outcome, building the mechanics of your deck to achieve that state deterministically might be a more valuable premise than doing so in a stochastic manner."

    For the theory side, these are interesting questions. Gamble + coin flip cards red decks are another tool I am imagining where you could build stochastically to better understand how the mathematics turn out, mixing the built-in randomness of deck shuffling with chained mechanics that add randomness specifically.
  13. Oversoul The Tentacled One

    The countermeasure to that is, of course, for your opponent to ensure that neither of you ever takes an upkeep. :p
  14. Psarketos Metacompositional Theoretician

    Challenge accepted!

Share This Page