Login | Register


All times are UTC - 7 hours


It is currently 2019-Jun-19 10:30 am




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Scry 2 question
AgePosted: 2019-Jan-18 8:36 pm 

Joined: 2015-Dec-22 4:41 am
Age: Drake
I hope this isn't considered strategy related. I personally see it as a logic puzzle.

Let's say I'm playing EDH solitaire, all 100 catds are in my library, and I'm able to scry 2 any number of times. Is it theoretically possible for me to rearrange all 100 cards in any desired order? If so, how? Bonus question: What is the minimum number of necessary scry 2 instances needed to arrange the library in a desired order assuming that the initial order is random and unknown at the start.

_________________
.


Top
 Offline Profile  
 
 Post subject: Re: Scry 2 question
AgePosted: 2019-Jan-18 11:22 pm 

Joined: 2016-Feb-13 2:14 pm
Age: Drake
Location: Orlando, Florida
You can ship the cards to the bottom until you find the first two you want, and then ship them to the bottom together. Repeat that by cycling through your library over and over, and your be able to build your library from the bottom up.

Bonus is impossible to determine, since the cards are random to begin with, plus you don't know the remaining cards in your library.


Top
 Offline Profile  
 
 Post subject: Re: Scry 2 question
AgePosted: 2019-Jan-19 12:03 am 

Joined: 2011-Feb-15 7:09 am
Age: Drake
Yes, you can move any card up one position when you scry two to the bottom. It might take a huge number of iterations to move each card up to the required position, e.g. you want the card initially on the bottom of the pile under the top 2, you have to scry the whole deck once to achieve it.
After you see the whole deck once you can get more efficient by tracking every card to make better decisions


Top
 Offline Profile  
 
 Post subject: Re: Scry 2 question
AgePosted: 2019-Jan-19 2:31 am 
User avatar

Joined: 2010-Dec-10 12:16 pm
Age: Elder Dragon
Where D = DeckCount, I think the equation would roughly be:

D^2*(D/2+(D-1)/2)

It's a rough estimate based on:

- The best you can do is swap the position of two cards
- At east every other cycle, if the count is even, you will have to leave one card on top so that the next cycle through you aren't seeing the same pairing of two cards to swap
- Based on above, you'll have to go through the deck at least twice for each card to put in order

So, D squared for each card in the deck
D/2 for each pair in the deck
(D-1)/2 for the offset to change the pairs seen

If the deck count has an even number of cards, the latter will provide the offset, if the deck count has an odd number of cards the former provides the offset.

I'd have to test the equation, but it should get you close

Example:
- Library with 70 cards remaining

D^2*(D/2+(D-1)/2)
70^2*(70/2+(70-1)/2)
4900*(35+69/2)
4900*(35+34.5)
4900*69.5
at least 340,550 iterations of scry 2

_________________
V/R

HK

Hazezon Tamar - Manland theme
Seshiro the Anointed - Snake Tribal
Jedit Ojanen of Efrava - Cat and Warrior Dual Tribal
Doran, the Seige Tower - Wall Tribal
Progenitus - Hydra themed Proliferate Deck
Karona, the False God - Backstabbing Hug


Top
 Offline Profile  
 
 Post subject: Re: Scry 2 question
AgePosted: 2019-Jan-19 8:45 am 
User avatar

Joined: 2010-Jul-18 9:59 pm
Age: Elder Dragon
(This sort of thing has never been my strong point so I may well be wrong here but...)

I'm not so sure. For the sake of clarity, let's assume the cards in the deck are numbered 1-100 and that's the order you want them in when you're done.

Clearly, getting 1 and 2 together is fairly trivial.

However then it gets more tricky. You want to keep 1 and 2 together, so when you see them you have to scry them both together. So you've just put 1 and 2 on the bottom. You scry until you see 3 or 4, then leave that card on top and effectively Scry 1 until you see the other card of 3 or 4. So eventually you have 1 and 2 together in the deck somewhere and 3 and 4 together on the top (or bottom). How then do you get 2 and 3 next to each other without breaking up 1 and 2, or 3 and 4?

That's the bit I can't figure out.

_________________
"Degenerate, unfun decks generally come from degenerate, unfun players in my experience." - Cthulus Thrall

"- if this spell is played ten times in a given game then I suggest you warm up the tar and pluck some chickens" - tarnar

"I'm happy to serve as a quote machine" - Sheldon


Top
 Offline Profile  
 
 Post subject: Re: Scry 2 question
AgePosted: 2019-Jan-19 9:22 am 

Joined: 2012-Mar-31 11:52 am
Age: Elder Dragon
Viperion wrote:
(This sort of thing has never been my strong point so I may well be wrong here but...)

I'm not so sure. For the sake of clarity, let's assume the cards in the deck are numbered 1-100 and that's the order you want them in when you're done.

Clearly, getting 1 and 2 together is fairly trivial.

However then it gets more tricky. You want to keep 1 and 2 together, so when you see them you have to scry them both together. So you've just put 1 and 2 on the bottom. You scry until you see 3 or 4, then leave that card on top and effectively Scry 1 until you see the other card of 3 or 4. So eventually you have 1 and 2 together in the deck somewhere and 3 and 4 together on the top (or bottom). How then do you get 2 and 3 next to each other without breaking up 1 and 2, or 3 and 4?

That's the bit I can't figure out.

I was wondering that as well.


Top
 Offline Profile  
 
 Post subject: Re: Scry 2 question
AgePosted: 2019-Jan-19 10:03 am 

Joined: 2011-Feb-15 7:09 am
Age: Drake
Viperion wrote:
So you've just put 1 and 2 on the bottom. You scry until you see 3 or 4, then leave that card on top and effectively Scry 1 until you see the other card of 3 or 4. So eventually you have 1 and 2 together in the deck somewhere and 3 and 4 together on the top (or bottom). How then do you get 2 and 3 next to each other without breaking up 1 and 2, or 3 and 4?

The simplest procedure puts one card into place at a time. If we skip to the point where 1 and 2 are in order then you keep scrying everything to the bottom until you find 3. Keep 3 on top while you let 1 and 2 come back to the top. When you scry 3 and 1 put 3 on top and 1 bottom. Then put 2 bottom then put 3 bottom. , You have 1,2 and 3 in order on bottom. Now look for 4 and repeat.
I'm pretty sure there are faster algorithms.


Top
 Offline Profile  
 
 Post subject: Re: Scry 2 question
AgePosted: 2019-Jan-19 10:24 am 

Joined: 2012-Mar-31 11:52 am
Age: Elder Dragon
Ah, that makes sense. Thanks for the explanation.


Top
 Offline Profile  
 
 Post subject: Re: Scry 2 question
AgePosted: 2019-Jan-19 11:11 am 
User avatar

Joined: 2010-Jul-18 9:59 pm
Age: Elder Dragon
Ah of course that makes sense

_________________
"Degenerate, unfun decks generally come from degenerate, unfun players in my experience." - Cthulus Thrall

"- if this spell is played ten times in a given game then I suggest you warm up the tar and pluck some chickens" - tarnar

"I'm happy to serve as a quote machine" - Sheldon


Top
 Offline Profile  
 
 Post subject: Re: Scry 2 question
AgePosted: 2019-Jan-19 12:16 pm 
User avatar

Joined: 2016-Nov-27 2:39 pm
Age: Dragon
Just for the record, in a tournament setting, someone with infinite Scry can even do this stuff without needing to know how it works. Quoting here:

murgatroid99 wrote:
An Official Ruling (requires a Judge Apps account to view) by high-level tournament judges explicitly says that you can take those shortcuts:

Quote:
A player with the ability to scry 1 ‘infinitely’ may shortcut this action by examining the library without reordering it and cutting it to a specific location. A player with the ability to scry 2 or more infinitely may shortcut this action by rearranging her library in any way she likes, but she must do so quickly. Players are not required to know the mathematics or technical steps behind this.

_________________
Decks: Chaos colored dragons, Mathas, the Instigator (politics and mayhem).
Beloved precons: Atraxa, Praetors' Voice; Saskia the Unyielding; Freyalise, Llanowar's Fury.


Top
 Offline Profile  
 
 Post subject: Re: Scry 2 question
AgePosted: 2019-Jan-22 4:01 am 
User avatar

Joined: 2010-Jan-25 4:50 pm
Age: Elder Dragon
So lets say in a 100 card deck all the cards are in the “worst” spot is there a way to find the maximum number of scry 2 you would ever need in order to organize it?

_________________
Kuro, Pitlord (Life gain)
Derevi (Manlands)
Marchesa (Modular)
Retired:
Krenko, Mob Boss (Goblins)
Zedruu the Christmas Goat (group hug)
Ramses Overdark (Assassin Deck)


Top
 Offline Profile  
 
 Post subject: Re: Scry 2 question
AgePosted: 2019-Jan-22 8:03 am 

Joined: 2014-Sep-13 7:28 am
Age: Elder Dragon
Bruticus wrote:
So lets say in a 100 card deck all the cards are in the “worst” spot is there a way to find the maximum number of scry 2 you would ever need in order to organize it?

I don't know the answer to this mathematically, but if you are asking because of the notion that you have to specificy a number instead of saying "infinite", you don't need to name the exact number. You can say one trillion, and after your deck is organized as you wish, the rest of the scry 2's are "top, top", "top, top" repeatedly.

I know that doesn't help if you were asking strictly out of curiosity.


Top
 Offline Profile  
 
 Post subject: Re: Scry 2 question
AgePosted: 2019-Jan-23 2:59 am 

Joined: 2008-Jan-25 8:26 am
Age: Elder Dragon
Location: Calgary
There's definitely a means of stating an upper bound depending on the sorting algorithm you choose.

This is a computing science sorting problem in disguise.

You have a 100 element array, or more accurately, a 100 element not-quite-a-stack.

You can pop ( remove from the top of stack ) two elements at a time, at which point you can see their value ( the rank from 1 to 100 that you want them to be once sorted )

Then you must push ( put on top ) or "bottom-push" ( put on bottom ) either element.

OldVig provided a valid algorithm to this. The best-case is that it's already sorted, and you spend 50 scrys bottom-pushing. The worst-case is math which I'm not qualified to do with any accuracy or confidence.

_________________
"(P)art of the joy of Commander (is) being forced to work with what we (have), even if it (isn't) optimal. Optimal usually isn't that interesting." - papa funk


Top
 Offline Profile  
 
 Post subject: Re: Scry 2 question
AgePosted: 2019-Jan-23 4:05 am 
User avatar

Joined: 2016-Nov-27 2:39 pm
Age: Dragon
tarnar wrote:
There's definitely a means of stating an upper bound depending on the sorting algorithm you choose.

This is a computing science sorting problem in disguise.

You have a 100 element array, or more accurately, a 100 element not-quite-a-stack.

You can pop ( remove from the top of stack ) two elements at a time, at which point you can see their value ( the rank from 1 to 100 that you want them to be once sorted )

Then you must push ( put on top ) or "bottom-push" ( put on bottom ) either element.

OldVig provided a valid algorithm to this. The best-case is that it's already sorted, and you spend 50 scrys bottom-pushing. The worst-case is math which I'm not qualified to do with any accuracy or confidence.

The worst case scenario is probably close to about ten thousand scry operations: scry 100 times for seeking each of 100 cards, sending only one card to the bottom each time. 100x100 = 10,000.

_________________
Decks: Chaos colored dragons, Mathas, the Instigator (politics and mayhem).
Beloved precons: Atraxa, Praetors' Voice; Saskia the Unyielding; Freyalise, Llanowar's Fury.


Top
 Offline Profile  
 
 Post subject: Re: Scry 2 question
AgePosted: 2019-Jan-23 4:32 am 

Joined: 2011-Feb-15 7:09 am
Age: Drake
I think the worst case is lower than 10000. If you take a random 2 cards that you're not currently interested in, you can still make sure you bottom then in sort order, so if you draw 76 then 23 you bottom then in the reverse order and reduce the overall number of cycles. I think that's bubble sort iirc


Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: intreped and 47 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to: