*Author

PhuzzY LogiK

  • Guest
Let's talk about how non-random shuffling is one more time. https://elementscommunity.org/forum/index.php?topic=7601.msg84794#msg84794
« on: June 07, 2010, 06:51:17 am »
Here (http://elementscommunity.org/forum/index.php/topic,3193.0.html) is a post from about 3 months ago questioning the effectiveness of the card shuffling process.  I made a post at the bottom, but no one responded after that.  Here (http://elementscommunity.org/forum/index.php/topic,3883.msg42278#msg42278) is a post I made in hopes the potential problem would be brought to Zanz's attention and examined (as far as I know, it was not).  I dropped the matter, but it continued to nag at me.

Recently, Demagog started a similar topic (http://elementscommunity.org/forum/index.php/topic,7323.0.html) in General Discussion, which brought the issue back to the front of my mind.  I'm still not satisfied with the answers being given.  However, I wanted to look at it a different way than Demagog.  While playing several variations of Puppy's deck I noticed that I was losing a lot of games because I would either draw a majority of Quantum Towers and Supernovas (giving me a lot of quanta, but not much to play), or almost none of them (giving me a lot of play cards, but no quanta).  While I'm aware that this is bound to happen, it still seemed to happen a bit too much.

In order to look into this, I took a fairly simple approach.  In an excel sheet, I listed each card I drew in the exact order I drew it, using the exact same deck throughout.  The sheet currently lists my 10 most recent consecutive games.  The number of games is low, but that's because the process is slow and tedious.  Here's the deck I used:


Code: [Select]
500 500 52n 6qq 6qq 6qq 6qq 6qq 6qq 6qq 6rn 6rn 6rn 6rn 6u3 6u3 6u3 6u3 6u3 6u3 6u6 71b 74b 77f 7do 7gp 7q8 80h 80h 80h

The spreadsheet keeps track of the order of cards drawn, the FG faced, win/lose, cards won from spins, and comments that may explain how the match went (I can attach the actual excel documents if these are hard to see).  Here is a picture of the "cards drawn" portion:





Next, I went through and color-coded the chart.  Supernovas (6), Quantum Towers (7), Shards (4), Quints (3), and Nymphs (2) were each given a unique color.  All cards with only one copy in the deck were all grouped as black (8 ).  I added some spacing to make it easier to see each game individually.  A well shuffled deck should look something like a rainbow.  That's not exactly what I observed:




Look at the 1st game versus the 3rd or 5th game.  In the latter 2, there are definite clumps of cards (i.e., not well shuffled).  Game 9 is what I was talking about above with having all quanta and nothing to play: of the first third of the deck (10 cards), I got 5/6 Supernovas, 3/7 QTs, and only 2 "playable" cards.  As I said, I can expect this to happen eventually, but I achieved it in under 10 games.

[edited to remove numbers that were misleading at best]

Now I know some of you are going to say 10 games doesn't prove anything, but you're wrong.  If it were just one oddball thing that happened, I could accept that, but having this many glaring inconsistencies in this few of games is a pretty obvious sign something is flawed.  Playing 100 or 1,000 or 1,000,000 more games isn't going to refine the statistics, it's going to further skew them.

To be honest, this puts a little damper on the game for me.  No matter how good your deck is, you're not going to win if you don't get a good mix of cards.  Further, repeated observances of this problem (including other than my own) are brushed off and generally treated with apathy, so there doesn't seem to be any progress on fixing or addressing this.

Also, I took screen shots at random intervals (mostly when something more outlandish would happen), so I have some photographic proof I'm not making this up.  If a particular game looks fishy, I can post them.

[edited to fix a typo]

smuglapse

  • Guest
Re: Let's talk about how non-random shuffling is one more time. https://elementscommunity.org/forum/index.php?topic=7601.msg84839#msg84839
« Reply #1 on: June 07, 2010, 11:15:32 am »
I gather your major gripe is getting quantum cards vs. others.  So I made the process into a coin flip and used this deck in the trainer against level 1 opponent to get through it as quickly as possible:

Code: [Select]
7q0 7q0 7q0 7q0 7q0 7q0 7q0 7q0 7q0 7q0 7q0 7q0 7q0 7q0 7q0 7q5 7q5 7q5 7q5 7q5 7q5 7q9 7q9 7q9 7qb 7qb 7qb 7qb 7qb 7qb
Each Time a Tower came up I marked a 1, everything else a 2, in the exact order that they were drawn.  10 games.

Then I did the same thing using the deck shuffler from random.org.  If you do not believe that site is random I don't know what to tell you.
Can you guess which data set is from which?

(http://imageplay.net/)                  (http://imageplay.net/)

PuppyChow

  • Guest
Re: Let's talk about how non-random shuffling is one more time. https://elementscommunity.org/forum/index.php?topic=7601.msg84896#msg84896
« Reply #2 on: June 07, 2010, 02:54:23 pm »
This has been posted before, but basically, in a deck with lots of different cards, the probability of ANYTHING happening is rather low. Take a deck of 30 different cards. The probability of drawing card x first may be low, but just because it happens twice doesn't mean it isn't random. Drawing card y first has just as low of a probability.

In effect, there are a LOT of possible "uncommon" things. You could draw the eternity last, draw three supernovas in a row, draw both purple nymphs in a row, draw the elite oty followed by a quintessence, draw a pulverizor followed by an eternity... All of these things have low probabilities.

So actually, I would say that it isn't really odd to have something uncommon happen (even twice). Due to the sheer number of possible draws, you could probably look through any set of truly random draws and discover something rare happening twice. It would be uncommon not to have something uncommon happen.

Offline BluePriest

  • Legendary Member
  • ******
  • Posts: 3771
  • Reputation Power: 46
  • BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.
  • Entropy Has You
  • Awards: Slice of Elements 5th Birthday Cake
Re: Let's talk about how non-random shuffling is one more time. https://elementscommunity.org/forum/index.php?topic=7601.msg84907#msg84907
« Reply #3 on: June 07, 2010, 03:05:22 pm »
Theres only 1 reason I see this as flawed. You have 7 quantum towers, and 6 supernovas. For all you know the actual supernova and QT you got were different each time. For this to be more accurate, I think it is neccessary to not have any/very little duplicate cards. That way true randomness is seen. I agree with your data, that I doubt its truely random, i just think the results would be better if we could see an actual difference in the cards
This sig was interrupted by Joe Biden

Offline Glitch

  • Legendary Member
  • ******
  • Posts: 3730
  • Reputation Power: 65
  • Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.
  • Awards: 1st Trials - Master of LifeElements Short Story Competition WinnerPoetry in the Spirit of Elements
Re: Let's talk about how non-random shuffling is one more time. https://elementscommunity.org/forum/index.php?topic=7601.msg84917#msg84917
« Reply #4 on: June 07, 2010, 03:20:42 pm »
You're relying too much on perfect world statistics.

You expect to get equal variance of all your different categories, correct?

Supernovas (6), Quantum Towers (7), Shards (4), Quints (3), and Nymphs (2) were each given a unique color.  All cards with only one copy in the deck were all grouped as black [8]

In a statistically perfect world, you would draw one black creature for your first draw, at tower and a black card in random order, then a nova tower and black card in random order, then one nova or tower or black card.

The odds of this actually happening are:
8/30 * 14/29 * 7/28 * 18/27 * 12/25 * 6/24 * 15/23, or 0.167916042%
What would look shuffled to your eye would actually only happen every one in 900 games, and that game count is rounded down to factor in shards quints and nymphs.  In fact, it's more likely to draw 2 quints in a row, or draw three quantum towers in a row, than it is to get a "shuffled" hand.

Offline BluePriest

  • Legendary Member
  • ******
  • Posts: 3771
  • Reputation Power: 46
  • BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.BluePriest is towering like an Amethyst Dragon over their peers.
  • Entropy Has You
  • Awards: Slice of Elements 5th Birthday Cake
Re: Let's talk about how non-random shuffling is one more time. https://elementscommunity.org/forum/index.php?topic=7601.msg84929#msg84929
« Reply #5 on: June 07, 2010, 03:32:53 pm »
The only way I see to eliminate bias would be to have these criteria

1)All Monsters, no pillars. You may say the auto mulligan doesnt matter, however, the times the game DOES auto mulligan, may be the time that you would actually see the randomness you wanted
2)The deck can have no duplicate cards. This gets rid of the following illusion. You have card A, A2, B, C, D. In all reality, you have just as good a chance as getting card A,D together as you do A,A2. It just stands out to us more since it is the same card.

Then it can be tested properly. That way it is shy of any illusion we may make by the connections our brain makes.
This sig was interrupted by Joe Biden

Offline teffy

  • Hero Member
  • *****
  • Posts: 1689
  • Country: de
  • Reputation Power: 20
  • teffy is a Mummy waiting to discover the path to glory.teffy is a Mummy waiting to discover the path to glory.teffy is a Mummy waiting to discover the path to glory.teffy is a Mummy waiting to discover the path to glory.
  • May the oracle be with you
  • Awards: Slice of Elements 15th Birthday CakeSlice of Elements 14th Birthday CakeSlice of Elements 4th Birthday CakeSlice of Elements 3rd Birthday CakeWeekly Tournament WinnerSlice of Elements 2nd Birthday Cake
Re: Let's talk about how non-random shuffling is one more time. https://elementscommunity.org/forum/index.php?topic=7601.msg85192#msg85192
« Reply #6 on: June 07, 2010, 08:42:53 pm »
Quote from: PhuzzY LogiK
Let's look at what else I had happen in only 10 games:
1.  The chances of drawing 3 Shards in a row are ~0.1%, or about 1 in every 1,015 games.  I had it happen twice in 10 games.
2.  The chances of drawing 2 Quints in a row are ~0.7%, or about 1 in every 145 games.  I had it happen twice in 10 games.
3.  The chances of drawing 3 QTs in a row are ~0.9%, or about 1 in every 116 games.  I had it happen twice in the same game.
4.  The chances of drawing 5 QTs in a row are ~0.01%, or about 1 in every 6,784 games.  It happened to me after playing only 5 games.
In 1) you probably calculated Binomial[3,2]/ Binomial[30,2] =1/145 with Binomial [n,k]:= n!/(n-k!*k!)
In 2) you probably calculated Binomial[4,3]/Binomial[30,3]=1/1015
all probabilities are wrong in my opinion.
The number of good cases is not Binomial[3,2] in 1) or Binomial[4,3] in 2)
case 2) is the easiest.

The chances that the 3 Quintessences are on position x, y and z is   1 / Binomial[30,3]
How many positive cases do we have, with 2 Quintessences in a row?

I count 28+27+26...+1+1+2+...+27=1/2*28*(28+1)+1/2*27*(27+1)=784

Binomial[30,3]=4060

784/4060~0,193=19,3%, you had it twice in 10 games ,that´s 20%

People, be careful with combinatorics and statistics!
It´s often different from that, what you expect.

I hope, I calculated it right...

btw. Smuglapse is right, you really can´t see the difference.
And zanzarino uses the Fisher-Yates algorithm to shuffle the deck - twice
I`m teffy, here - and Ringat on Kongregate

Offline teffy

  • Hero Member
  • *****
  • Posts: 1689
  • Country: de
  • Reputation Power: 20
  • teffy is a Mummy waiting to discover the path to glory.teffy is a Mummy waiting to discover the path to glory.teffy is a Mummy waiting to discover the path to glory.teffy is a Mummy waiting to discover the path to glory.
  • May the oracle be with you
  • Awards: Slice of Elements 15th Birthday CakeSlice of Elements 14th Birthday CakeSlice of Elements 4th Birthday CakeSlice of Elements 3rd Birthday CakeWeekly Tournament WinnerSlice of Elements 2nd Birthday Cake
Re: Let's talk about how non-random shuffling is one more time. https://elementscommunity.org/forum/index.php?topic=7601.msg85203#msg85203
« Reply #7 on: June 07, 2010, 08:53:49 pm »
Quote from: PhuzzY LogiK
Let's look at what else I had happen in only 10 games:
1.  The chances of drawing 3 Shards in a row are ~0.1%, or about 1 in every 1,015 games.  I had it happen twice in 10 games.
2.  The chances of drawing 2 Quints in a row are ~0.7%, or about 1 in every 145 games.  I had it happen twice in 10 games.
3.  The chances of drawing 3 QTs in a row are ~0.9%, or about 1 in every 116 games.  I had it happen twice in the same game.
4.  The chances of drawing 5 QTs in a row are ~0.01%, or about 1 in every 6,784 games.  It happened to me after playing only 5 games.
In 1) you probably calculated Binomial[3,2]/ Binomial[30,2] =1/145 with Binomial [n,k]:= n!/(n-k!*k!)
In 2) you probably calculated Binomial[4,3]/Binomial[30,3]=1/1015
all probabilities are wrong in my opinion.
The number of good cases is not Binomial[3,2] in 1) or Binomial[4,3] in 2)
case 2) is the easiest.

The chances that the 3 Quintessences are on position x, y and z is   1 / Binomial[30,3]
How many positive cases do we have, with 2 Quintessences in a row?

I count 28+27+26...+1+1+2+...+27=1/2*28*(28+1)+1/2*27*(27+1)=784

Binomial[30,3]=4060

784/4060~0,193=19,3%, you had it twice in 10 games ,that´s 20%

People, be careful with combinatorics and statistics!
It´s often different from that, what you expect.

I hope, I calculated it right...

btw. Smuglapse is right, you really can´t see the difference.
And zanzarino uses the Fisher-Yates algorithm to shuffle the deck - twice
@Smuglapse
I guess that the left one is from random.org , cause it´s named DataR.jpg and the other one DataE.jpg, E for Elements :)
I`m teffy, here - and Ringat on Kongregate

smuglapse

  • Guest
Re: Let's talk about how non-random shuffling is one more time. https://elementscommunity.org/forum/index.php?topic=7601.msg85370#msg85370
« Reply #8 on: June 08, 2010, 12:07:14 am »
@Smuglapse
I guess that the left one is from random.org , cause it´s named DataR.jpg and the other one DataE.jpg, E for Elements :)
teffy gets a cookie!

      :earth :earth :earth :earth
 :earth :darkness :earth :earth :earth :earth
 :earth :earth :earth :darkness :earth :earth
 :earth :darkness :earth :earth :earth :earth
 :earth :earth :earth :earth :darkness :earth
      :earth :earth :earth :earth

PhuzzY LogiK

  • Guest
Re: Let's talk about how non-random shuffling is one more time. https://elementscommunity.org/forum/index.php?topic=7601.msg85528#msg85528
« Reply #9 on: June 08, 2010, 04:22:53 am »
First, thanks all for the responses, I appreciate them!


I gather your major gripe is getting quantum cards vs. others.  So I made the process into a coin flip....
Each Time a Tower came up I marked a 1, everything else a 2, in the exact order that they were drawn.  10 games.

Then I did the same thing using the deck shuffler from random.org.  If you do not believe that site is random I don't know what to tell you.
Can you guess which data set is from which?
The "quantum cards vs. others" situation is what was happening often enough that it made me take notice.  I believe it is the result of a bigger problem.

I like what you did, but how often do you play a 30 card deck with 15 Towers?  I have a 30 card deck with 7 Towers, and yet I'm able to draw similar clusters to your deck with over twice as many Towers.  If you include Supernovas, I have 13 "quanta" cards.  I'd repeat your experiment, but to be honest, I'm not sure exactly what you did.


Quote from: PuppyChow
This has been posted before, but basically, in a deck with lots of different cards, the probability of ANYTHING happening is rather low. Take a deck of 30 different cards. The probability of drawing card x first may be low, but just because it happens twice doesn't mean it isn't random. Drawing card y first has just as low of a probability.

In effect, there are a LOT of possible "uncommon" things. You could draw the eternity last, draw three supernovas in a row, draw both purple nymphs in a row, draw the elite oty followed by a quintessence, draw a pulverizor followed by an eternity... All of these things have low probabilities.

So actually, I would say that it isn't really odd to have something uncommon happen (even twice). Due to the sheer number of possible draws, you could probably look through any set of truly random draws and discover something rare happening twice. It would be uncommon not to have something uncommon happen.
I see what you're saying here, but I just don't find it intuitive.  It's like saying "There are nearly infinite ways you could die each day, so it is inevitable that at least one will happen and you will die today."  If the probabilities of every one of these potential combinations is so low, why am I seeing the same ones over and over?  Shouldn't the fact that they are so rare mean I should see several of them before one repeats?


Quote from: BluePriest
Theres only 1 reason I see this as flawed. You have 7 quantum towers, and 6 supernovas. For all you know the actual supernova and QT you got were different each time. For this to be more accurate, I think it is neccessary to not have any/very little duplicate cards. That way true randomness is seen. I agree with your data, that I doubt its truely random, i just think the results would be better if we could see an actual difference in the cards
This is a very good point and one that, honestly, I'm not sure how to answer.  I think this type of situation is what Demagog was attempting to answer with his post/data.  I'd have to defer to his results for this one.


Quote from: Gl1tch
You're relying too much on perfect world statistics.

You expect to get equal variance of all your different categories, correct?

Supernovas (6), Quantum Towers (7), Shards (4), Quints (3), and Nymphs (2) were each given a unique color.  All cards with only one copy in the deck were all grouped as black [8]

In a statistically perfect world, you would draw one black creature for your first draw, at tower and a black card in random order, then a nova tower and black card in random order, then one nova or tower or black card.

The odds of this actually happening are:
8/30 * 14/29 * 7/28 * 18/27 * 12/25 * 6/24 * 15/23, or 0.167916042%
What would look shuffled to your eye would actually only happen every one in 900 games, and that game count is rounded down to factor in shards quints and nymphs.  In fact, it's more likely to draw 2 quints in a row, or draw three quantum towers in a row, than it is to get a "shuffled" hand.
I don't expect the statistics to be perfect, but I think it's fair to expect them not to be off by an absurd margin.  Out of curiosity, where are you getting your numbers for the odds you state?  I understand the denominators (drawing cards from the deck), and the 1st, 3rd, and 6th terms I think are the black cards, but I can't get the other numerators.


Quote from: teffy
In 1) you probably calculated Binomial[3,2]/ Binomial[30,2] =1/145 with Binomial [n,k]:= n!/(n-k!*k!)
In 2) you probably calculated Binomial[4,3]/Binomial[30,3]=1/1015
all probabilities are wrong in my opinion.
The number of good cases is not Binomial[3,2] in 1) or Binomial[4,3] in 2)
case 2) is the easiest.
I guess I should have stated my disclaimer that I put in my earlier post.  I have no training or experience in prob or stats, so I'm making this up as I go.   I'm certainly open to correction.  That said...

I didn't use any fancy distributions.  From my understanding, "Binomial [n,k]:= n!/(n-k!*k!)" is the binomial coefficient ("n, choose k").  This solves for the number of ways to draw k cards out of n total, but not the chance of drawing a specific card multiple times in a row.

I came up with my numbers like this:
Drawing 3 Shards in a row:
Probability of drawing 1 Shard (# of Shards/Total number of cards) * Probability of drawing a second Shard (-1 potential Shard, -1 cards total) *
Probability of drawing a third Shard (-1 potential Shard, -1 cards total)

This works out to:
(4/30) * (3/29) * (2/28) = 9.85x10^-4 = 0.0985% ~ 0.1%

The other cases were done in a similar manner.

Quote from: teffy
The chances that the 3 Quintessences are on position x, y and z is   1 / Binomial[30,3]
How many positive cases do we have, with 2 Quintessences in a row?

I count 28+27+26...+1+1+2+...+27=1/2*28*(28+1)+1/2*27*(27+1)=784

Binomial[30,3]=4060

784/4060~0,193=19,3%, you had it twice in 10 games ,that´s 20%
I don't follow what you're doing here:
1.  I don't understand how you're getting 784 for your "positive cases" (I don't see what method you're using).
2.  In your binomial, you're finding the number of ways to choose 3 cards from 30, but you only have positive cases for drawing 2 Quints.  How can you compare these if they are for a different number of draws?

Kli4d

  • Guest
Re: Let's talk about how non-random shuffling is one more time. https://elementscommunity.org/forum/index.php?topic=7601.msg85529#msg85529
« Reply #10 on: June 08, 2010, 04:23:39 am »
I don't think I'm as smart as you people but how about you just get 30 pieces of paper with names of particular cards written on them to match this deck and repeat the excel spreadsheet.

Offline Demagog

  • Legendary Member
  • ******
  • Posts: 2557
  • Reputation Power: 40
  • Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.Demagog soars like the Phoenix, unable to be repressed.
  • New to Elements
Re: Let's talk about how non-random shuffling is one more time. https://elementscommunity.org/forum/index.php?topic=7601.msg85560#msg85560
« Reply #11 on: June 08, 2010, 06:16:52 am »
Kli4d, I don't think that really works with this. He's looking at how cards are clumped together.

It's actually very similar to what I'm doing, except on a larger scale. Like I said, I've used a lot of decks where there were only a few of certain cards, and these cards were often very very close to each other in the deck. So it would make sense that if every card "attracts" the cards around them in the deck order, you would see much more clumping than you would if there was no "attraction."

I haven't been able to do much with my "research" lately since I've been busy, but I'll try to speed it up so I can share the results.

Also, Phuzzy, if you want the excel tables I'm using, I can give them to you and you can do this too.

 

blarg: