Play Test Shuffle

TappedOut forum

Posted on April 18, 2013, 11:42 a.m. by jrbromberg

I love this site and the ability to play test your decks and other people's decks but the randomizing / shuffle feature in the play tester works so poorly. I wish they would come up with a better algorithm.

theemptyquiver says... #2

I never paid much attention, nor felt like there was a glaring issue when play testing.

But I've been known to gloss over things before...

April 18, 2013 11:56 a.m.

MindAblaze says... #3

I don't understand this complaint. How is the randomizer not random. You don't know what to expect, I always hit the button two or three times and it never seems stacked. I will agree sometimes I have a hard time not mulliganing to five, but that happens in real life too.

April 18, 2013 12:23 p.m.

jrbromberg says... #4

I hit the shuffle button too. It does help. Two or three time never seems enough though. I suppose it's like real life. Arranged decks need a lot of shuffling before they play well. Maybe they should have the play tester shuffle more before it loads the first time. I just don't like having to hit the shuffle button 10 to 15 times every time i use it.

April 18, 2013 12:45 p.m.

theemptyquiver says... #5

i always shuffle 7 times. with real cards or virtual cards.

April 18, 2013 12:51 p.m.

theemptyquiver says... #6

i also like to make 7 piles when i power pile shuffle.

April 18, 2013 12:51 p.m.

RussischerZar says... #7

Seems you would like Griselbrand :P

I always wondered why he doesn't cost 7 mana though... ;P

April 18, 2013 12:54 p.m.

theemptyquiver says... #8

I do like that card, although I've actually never owned/played with it.

April 18, 2013 1:12 p.m.

deleteme says... #9

I am pasting my response from an earlier discussion:


I am using the Fisher-Yates shuffle algorithm to shuffle the library in the playtester. Each shuffled permutation has the same chance of appearing as any other permutation.

People have periodically reported to me that the shuffling from the playtester is not good, so I took this weekend to verify the even distribution of results from shuffling.

In a sixty card deck, there are 8320987112741390144276341183223364380754172606361245952449277696409600000000000000 possible unique permutations of the deck. A 100 card deck has ~9.33 10157 permutations!

I used small deck sizes (2 through 5) to test the algorithm. (There probably isn't enough computing power on the planet to test against a full deck size of 60 or 100 cards.)

I shuffled a deck factorial(n) * 10000 times, counted how many times each permutation appeared, then tested that each permutation appeared as frequently as any other one. I gave myself a one percent variance to reduce the sample size. My tests confirm that the algorithm works as it's designed. I ran it in Firefox, Safari, and Chrome.

The pattern of cards you describe is a valid permutation but it doesn't "feel" shuffled. Sometimes the same cards of the same name really do get clumped together. The shuffle algorithm should not try to evenly distribute cards, or detecting for consecutive runs of a card and reshuffling - that would be stacking your deck.

One of the main objectives of deck design is to achieve smooth consistency by putting additional copies of a card in the deck. Maybe what you're experiencing is the deck working.

April 18, 2013 3:35 p.m.

"Maybe what you're experiencing is the deck working"

BURN!

April 18, 2013 3:38 p.m.

sarcasm detected.

April 18, 2013 3:39 p.m.

pablucas says... #12

The thing is that if by turn 4 u casted 3 of your four Lightning Bolt u will think that ur deck rules, but if by turn 4 u have in your hand 3 of the 4 copies u have of Crypt Ghast you will think that u didnt shuffle enought the deck, or that the shuffling algorithm doesnt work.Bottom line, the algorithm works, but we have zero understanding of how probability works

April 18, 2013 3:57 p.m.

MindAblaze says... #13

indeed.

April 18, 2013 4:35 p.m.

jrbromberg says... #14

I understand it must seem like I'm looking for an excuse for a poor deck design. I'm not. It was my first thought as well. Good deck design is the best way to avoid problems that come up from an unfortunate shuffle.

To deleteme: you might have gotten the wrong idea when I said "play well". An evenly stacked deck is not what I'm looking for. The results of the play tester, to my eye, are unrealistically clumped when compared to my real life deck. My physical deck and virtual deck are identical and I have compared the two by viewing all the cards in order after loading the play tester and shuffling my deck several times. My, admittedly limited, results show the play tester performing much better after I hit the shuffle button many times.

April 18, 2013 4:39 p.m.

so we can all agree to just spam the shuffle button a few extra times then and live happily ever after?

grab club and starts walking out to the barn, where the horse died.

April 18, 2013 4:53 p.m.

jrbromberg says... #16

For Reference

My Shuffle
7 card pile shuffle
sleeve shuffle then overhand shuffle then repeat
repeat all

My Software
chromium browser
xubuntu os

April 18, 2013 4:57 p.m.

pablucas says... #17

Well i think i have the solution, yeago should buy a hardware random number generator so that when we playtest the deck is "really" random.Now seriously i think the sw random generator of the playtester works well, the problem is on the human side. Unless its flawed on a very very very obviously way, the only way to notice that the shuffling isnt randomized enough (or well enough) is by using the playtester to draw the initial hand for, i dont know, say a full year and writing down the results, and then seeing if each combination is equally probable.I generally tend to trust the algorithm rather than the human experience when we talk about randomness, cause making an experiment to refute the quality of the generator would take a long long long time :D

April 18, 2013 11:37 p.m.

ShadowLand says... #18

I have to admit, I laughed a lot reading this. But now I know to shuffle seven times. Got it. I am good with the randomness. I have decks clump all the time in real life and it's not due to a lack of shuffling, most times it's a product of overshuffling if anything

April 20, 2013 1:38 p.m.

Rhadamanthus says... #19

If the shuffler uses the Fisher-Yates algorithm, then the reason the results people are observing feel "wrong" is probably because no human being actually shuffles that way. The simple explanation of a Fisher-Yates shuffle is that from the starting order of the deck, one-by-one a random card is taken out and put on top of a new pile off to the side. There are a few slightly different ways to implement it, but the end results are the same.

Riffle/bridge shuffles, pile shuffles, and repeated loose cut shuffles performed by players in real life work in a much smaller subset of the space of permutations covered by Fisher-Yates. There are general structures for permutations in each of them that appear with considerable probability (including a perceived lack of clumping), but in Fisher-Yates any permutation has equal probability of appearing, which deleteme has already noted. For each real life method there are permutations that are either mathematically impossible for them to produce, or practically impossible in the context of the 3 minute pre-game procedure.

Fisher-Yates is an "ideal" shuffle in the eyes of a mathematician (yours truly) or a computer programmer (deleteme, I presume), but it's not something a player of physical card games will ever actually experience.

April 20, 2013 3:55 p.m.

jrbromberg says... #20

That makes sense, thank you.

April 20, 2013 9:24 p.m.

noctwolf says... #21

What most people hate about this randomizer is that it is too random. In real life people hardly randomize their decks at all. We make sure the lands and cards aren't clumped before we go to a tournament then shuffle a few times. THis still generically separates the stuff we want separated. No to mention combo pieces that are next to each other on the board generally winding up close to each other. This generator is truly random, we just all cheat in real life without thinking about it.

May 2, 2013 9:07 p.m.

This discussion has been closed