Remix.run Logo
▲ 0x3444ac53 2 days ago

Ehhh, not quite. The tokens are their own independent objects that act identical to the original, but are removed from the game if they change zones. When anything enters onto the battlefield, it has to notify every other permanent on the battlefield that it has entered, and then those permanents triggers are all put on the stack in addition to the trigger that goes on the stack with whatever enters. The main thing is that either player can respond to the stack at any point even as things are resolving and coming off of it. And there is a very important difference between static abilities (usually called replacement effects) and triggered abilities. Replacement effects don't use the stack, triggered abilities do.

Let's say I have 128 scute swarms, and play a land. That land triggers all 128 scute swarms, causing them to create copies of themselves. That doesn't just happen, instead, all 128 triggers go onto the stack. Priority then goes to the next player, who can respond (which will add another thing to the stack), before passing back to me. The top trigger on the stack resolves putting a creature on the battlefield (which might cause more triggers to be added to the stack), and then that priority passing happens again until the stack is empty.

So if my opponent has a card in play that says they gain one life whenever a creature I control enters, then that is also a triggered ability. So for all 128 creatures, they come into play 1 at a time, and notify all other objects when they do. In this example, each time one of those original 128 triggers resolves, another trigger is added and my opponent gains 1 life, that has to go onto the stack, I get the opportunity to respond to it, and then it resolves, and we continue.

And if Scute Swarm is currently in the meta, then it would make sense to have a card that gains me life whenever a creature my opponent controls enters. So it would be smart to also have a lot of cards that trigger off me gaining life. Let's say that I have two separate cards in play that do so.

So, 128 triggers on the stack, one resolves, my opponent gains a life, that resolves, two other triggers go on the stack, they both resolve. And then we continue this pattern with the other 127 triggers. And importantly as the next one resolves and puts a creature into play, there is yet another permanent that has to be checked for triggers before we can continue.

Meaning that while 128 seems somewhat doable (nevermind that that number can and willget bigger), the actual number of triggers we have to resolve is 4 times higher, and each time one resolves we have to check the state of the entire game to see if we need to do anything else before we move on.

▲deathanatos 2 hours ago | parent | next [-]

> The tokens are their own independent objects that act identical to the original, but are removed from the game if they change zones.

This is still model-able with a qtx×type structure. Yes, a token Scute Swarm might be a different object vs. a Scute Swarm, but that's still pretty finite:

  ...
    1× Scute Swarm
    4× 1/1 green insect token creatures
  256× Scute Swarm token creatures
> Let's say I have 128 scute swarms, and play a land. That land triggers all 128 scute swarms, causing them to create copies of themselves.

Sure, but we can represent this as "the 256× Scute Swarm stack has triggers on when lands are played", so, in effect, we have two trigger registrations, but representing here 257 separate firings of that trigger. E.g., our stack would be something like,

  ^ 256×Scute Swarm token creature landfall trigger
  |   1×Scute Swarm landfall trigger
> Priority then goes to the next player, who can respond (which will add another thing to the stack), before passing back to me. The top trigger on the stack resolves putting a creature on the battlefield (which might cause more triggers to be added to the stack), and then that priority passing happens again until the stack is empty.

Now, this is definitely more complicated, but I think we can still do it with reasonable resource consumption. At the moment we execute that a player can respond to the stack, we let them do so, or let them declare (probably secretly) where in the stack to interrupt (including not at all). E.g., a player's response could be summarized as "I'll permit all 256 Swarm landfall actions to resolve", and if all players do so, then we can batch resolve them. If any player chooses something different (such as "I'm doing this now", or "I'm permitting 20 to resolve, and then interrupting", then we can allow that (and cancel any other players' commands to permit the resolutions, as someone else doing something might cause them to reconsider, of course).

It would be pretty hard to say if this'll hold over the entire game (there may be cases where batch consideration just does not work) but I think this is going to be "good enough" for most sane play.

▲amluto 2 days ago | parent | prev [-]

Indeed.

My point is that the state is highly compressible (including the stack). And that it should be possible to have an engine operate on the compressed state by resolving multiple copies of a repeat together.

It is indeed the case that the players have opportunities to respond to each individual event, which means that a strategy can have an exponentially large branching factor: a strategy can choose to let any prefix of a repeating unit through before responding. But I bet that, if there is a stack containing a consecutive block of 100M repeats of the same thing, there are not actually 100M interesting choices of which one to respond to.

▲fireflywedding 4 hours ago | parent [-]

[flagged]