The Magic Café
Username:
Password:
[ Lost Password ]
  [ Forgot Username ]
The Magic Cafe Forum Index » » Shuffled not Stirred » » Memorized Stack Trainer (Free) (8 Likes) Printer Friendly Version

 Go to page [Previous]  1~2~3~4~5 [Next]
msc455magic
View Profile
Inner circle
Taipei, Taiwan
1522 Posts

Profile of msc455magic
Great stuff. Thanks!!!
Harald
View Profile
New user
82 Posts

Profile of Harald
Thank you Joe for posting. There is a software named stackview, available for free at stackview.com which also might interest you if you did not know that before.
Jasper-1975
View Profile
New user
4 Posts

Profile of Jasper-1975
Super!

I will definitely use this when trying to learn the Aronson stack.....again Smile

But also Stackview, mentioned above, is a great tool.
CardWiz
View Profile
Special user
Charleston, SC
625 Posts

Profile of CardWiz
Quote:
On 2010-02-28 22:28, huruey wrote:
Hi CardWiz. As you seem interested, I thought I'd explain why the more common shuffling algorithm as suggested by Mike is superior to swapping cards at random positions a large number of times. Firstly, the second algorithm produces no more random a result than the sequential swapping algorithm. In the first algorithm, every card in the deck is swapped to a random position at least once, meaning that regardless of the input order, all the permutations of the output are equally likely, which is as random as you can get. The algorithm you suggested, however, is in fact LESS random, as by only swapping random elements, regardless of the number of iterations, there is still a chance of some elements not being swapped at all. In terms of efficiency of the function, the first algorithm is also much faster, requiring only 52 iterations rather than say 10000.

I hope this makes sense. Smile

Joe


Yes, I see your point, but with 10000-100000 loops (which only takes about .2 seconds) every card is practically guaranteed to be called upon, and with 52 loops there is always the chance of swapping a pair twice.

But I suppose it does not matter as both sequences get the job done.

CW
People have been calling me "Yu" lately. I don't know, must be Chinese.
Medifro
View Profile
Inner circle
Washington D.C
1213 Posts

Profile of Medifro
Joe that's AWESOME

~ Feras
huruey
View Profile
Loyal user
York, UK
205 Posts

Profile of huruey
Quote:
On 2010-03-01 23:21, CardWiz wrote:

Yes, I see your point, but with 10000-100000 loops (which only takes about .2 seconds) every card is practically guaranteed to be called upon, and with 52 loops there is always the chance of swapping a pair twice.

But I suppose it does not matter as both sequences get the job done.

CW


It does not matter if a card gets swapped twice, because by the end of the loop there is still a 1/52 of any card appearing at any position in the array. If you are having trouble seeing this, consider an alternative algorithm which more clearly produces the most random deck possible (for pseudo-random numbers at least), which creates a second array then loops through each element of the input array, randomly assigning it to any empty position in the second, thus every element has a 1/52 chance of finishing in any position in the output array. The first algorithm achieves this same result. When the loop is on an element, it has a 1/52 chance of going to any position in the array. The other 51 iterations, it has a 1/52 chance of being swapped with the current element. Counting itself, as it may end up swapping with itself, this means that every element is equally likely to swap to any position.

Also, regarding speed, for a start you'll find older browsers take significantly longer, and rather than 0.2 seconds, it would be taking closer to 5 seconds, and just one more 0 would take that to 50 seconds, and just a couple more operations inside the loop would might double that again. Also, should you, for any reason, later want to repeat the operation many times in succession, for example to produce test data for some model which involves shuffling a deck of cards, multiplying your shuffling operation by just 10000 more could leave people waiting several hours. It is always best to use the most efficient algorithm because in real life, you don't necessarily know when you or somebody else may want to use a procedure for something more intensive, especially in industry when many people end up working on and using the same code.


Joe
Joe Williamson
Chair of the University of York Magic Society
Free Memorized Stack Trainer: http://huruey.webs.com
Furniture
View Profile
Elite user
London
415 Posts

Profile of Furniture
I created a trainer in Excel few months ago. You may find some ideas, like the ACAAN trainer, for you web built-in version

tamariz
Close.Up.Dave
View Profile
Inner circle
Behind you!
2913 Posts

Profile of Close.Up.Dave
Anyone remember this one? http://www.stackview.com
Mike Powers
View Profile
Inner circle
Midwest
2623 Posts

Profile of Mike Powers
Joe's explanation is dead on. You really can't get more random than switching every card with a random card. And the loop is only 1 to 52. I think this is the standard way to "shuffle" a deck.

"It doesn't simulate a real riffle shuffle, though. In a real shuffle cards fall in clumps. Persi Diaconis worked out the math on shuffling. It takes 7 "good" riffle shuffles to randomize a deck. I think "random" in this case means that you can't find a pattern in the shuffled deck that gives you any info as to the initial condition of the deck before the 7 shuffles. "

From Wikipedia: ( http://en.wikipedia.org/wiki/Shuffling#Randomization )

"A famous paper by mathematician and magician Persi Diaconis, and mathematician Dave Bayer, on the number of shuffles needed to randomize a deck, concluded that the deck did not start to become random until five good riffle shuffles, and was truly random after seven, in the precise sense of variation distance described in Markov chain mixing time; of course, you would need more shuffles if your shuffling technique is poor."

Mike
nspikito
View Profile
Elite user
413 Posts

Profile of nspikito
Thanks, Joe. This is a super tool, both for learning a stack and keeping it fresh.
Spike
leosx1
View Profile
Regular user
143 Posts

Profile of leosx1
Thank you Joe, what a great tool ! adding a tune of a song to each specific card also helps me a lot in remembering the card.
Scott F. Guinn
View Profile
Inner circle
"Great Scott!" aka "Palms of Putty" & "Poof Daddy G"
6576 Posts

Profile of Scott F. Guinn
Hi Joe,

I'm one of those "Joyal guys", but I used CHaSeD instead of SHoCkeD order. Unless I'm missing something, that isn't an option in your trainer. How hard would it be to add the CHaSeD stack? I know I can put it in myself, but it might be good to have it as a preset, if it's not too much trouble:

JH,6C,6H,4C,10D,AD,7C,4H,9C,5D,QH,AS,KC
7H,10S,4S,JS,9H,KD,5S,7S,2C,QC,AH,10H,6S
9S,7D,QD,5H,KH,4D,3C,3H,10C,9D,QS,3S,3D
2H,8C,2S,JC,2D,8H,8S,KS,AC,JD,5C,8D,6D
"Love God, laugh more, spend more time with the ones you love, play with children, do good to those in need, and eat more ice cream. There is more to life than magic tricks." - Scott F. Guinn
My Lybrary Page
huruey
View Profile
Loyal user
York, UK
205 Posts

Profile of huruey
CHaSeD Joyal has been added. Smile

In other news, I am going to attempt to develop an app version over the next 6 weeks.

Joe
Joe Williamson
Chair of the University of York Magic Society
Free Memorized Stack Trainer: http://huruey.webs.com
lunatik
View Profile
Inner circle
2589 Posts

Profile of lunatik
Hi Joe,are you planning on making an iPhone app? That would be awesome!
"Don't let your Dreams become Fantasies"
lunatik
View Profile
Inner circle
2589 Posts

Profile of lunatik
I was looking at your stck but I see 2 queen of hearts back to back, was this correct?

Quote:
On 2010-02-28 12:33, Lawrence O wrote:
Huruey,

The drawback of the Si-Stebbins had always been the repeated alternation of the suites. There is however an "Advanced Si Stebbins" stacking which solves this issue. When the card is an even card jump one step in the CHaSeD order (thus, for example, after an even Hearts, you'd get a Diamond). When the card is odd just go to the next suite in the CHaSeD order (thus, for example, after an odd Hearts, you'd get a Spade).
This produces the following stack which looks totally random but is easy to trace and remember. One of the beauty of the Si-Stebbins is that given a number, is easy enough to calculate the identity of a card after several shuffles and given a card, it's easy enough to tell its position. This is the principle behind Juan Tamariz's Total Coincidence (the only effect to match the impact of Out Of This World).
AC, 4H, 7D, 10C, KS, 3D, 6C, 9S, QD, 2H, 5D, 8C, JS, AD, 4C, 7S, 10D, KH, 3S, 6D, 9H, QS, 2C, 5S, 8D, JH, AS, 4D, 7H, 10S, KC, 3H, 6S, 9C, QH, QH, 2D, 5H, 8S, JC, AH, 4S, 7C, 10H, KD, 3C, 6H, 9D, QC, 2S, 5C, 8H, JC

Now I'm a fan of Palyndromic or Mirror stacks. Following this second principle, the Si-Stebbins is followed all the way up to one half of the deck and is then done in reverse order for the second half. The mirror stack offers a lot of advantages for getting at a card or different effects.
The Palyndromic or Mirror Si-Stebbins stack (the "Si-Stebbins Pro" Stack) uses the same Suite system as the Advanced Si-Stebbins
AC, 4H, 7D, 10C, KS, 3D, 6C, 9S, QD, 2H, 5D, 8C, JS, AD, 4C, 7S, 10D, KH, 3S, 6D, 9H, QS, 2C, 5S, 8D, JH, JC, 8S, 5H, 2D, QH, 9C, 6S, 3H, KC, 10S, 7H, 4D, AS, JC, 8H, 5C, 2S, QC, 9D, 6H, 3C, KD, 10H, 7C, 4S, AH

I've formatted them so that you can copy/paste them in your software
"Don't let your Dreams become Fantasies"
Scott Cram
View Profile
Inner circle
2662 Posts

Profile of Scott Cram
Quote:
On 2010-03-19 08:52, lunatik wrote:
Hi Joe,are you planning on making an iPhone app? That would be awesome!


There's already Stacked Deck (iTunes Link).

I reviewed it here, and then gave another review to the update.
huruey
View Profile
Loyal user
York, UK
205 Posts

Profile of huruey
Quote:
On 2010-03-19 11:37, Scott Cram wrote:
Quote:
On 2010-03-19 08:52, lunatik wrote:
Hi Joe,are you planning on making an iPhone app? That would be awesome!


There's already Stacked Deck (iTunes Link).

I reviewed it here, and then gave another review to the update.


Ah. I was planning on doing an iphone version, but I guess there's no need or it. Smile

Joe
Joe Williamson
Chair of the University of York Magic Society
Free Memorized Stack Trainer: http://huruey.webs.com
Scott Cram
View Profile
Inner circle
2662 Posts

Profile of Scott Cram
You could still put one out, Joe. Who knows? Maybe you could do a better one!
lunatik
View Profile
Inner circle
2589 Posts

Profile of lunatik
Anyone else know the answer to my question about the two queen of hearts in lawrences modified si stebbens?
"Don't let your Dreams become Fantasies"
fyi2
View Profile
Loyal user
291 Posts

Profile of fyi2
Just a thought you might consider adding Osterlind's stack BCS as well. (You'd need to get Richard's permission but I have found him very generous)
The Magic Cafe Forum Index » » Shuffled not Stirred » » Memorized Stack Trainer (Free) (8 Likes)
 Go to page [Previous]  1~2~3~4~5 [Next]
[ Top of Page ]
All content & postings Copyright © 2001-2018 Steve Brooks. All Rights Reserved.
This page was created in 0.24 seconds requiring 5 database queries.
The views and comments expressed on The Magic Café
are not necessarily those of The Magic Café, Steve Brooks, or Steve Brooks Magic.
> Privacy Statement <

ROTFL Billions and billions served! ROTFL