Elements the Game Forum - Free Online Fantasy Card Game

Elements the Game => Newbie Area => Tutorials => Topic started by: Selenbrant on June 17, 2010, 08:55:00 pm

Title: Determine the right amount of copies; Draw Chance
Post by: Selenbrant on June 17, 2010, 08:55:00 pm
Global Moderator Comment These tables do not account for the automulligan, so don't use them for pillars, towers, novas and the like.

Its about the chance to draw X copies of a certain card depending on:
There is also a topic that explains hypergeometric probability or at least how to use an online calculator:
http://elementscommunity.org/forum/index.php/topic,7893.0.html for those who lack math skills.
Edit: Coinich added some nice 4D graphs there.

Or just look at the tables I already made.
I will regularly add new tables for different deck sizes and different probabilities.
If the table is slope just zoom out a bit

N = 30
X>0
n --->
M = 1
M = 2
M = 3
M = 4
M = 5
M = 6
123456789turns: coin toss won
12345678turns: coin toss lost
789101112131415cards drawed
23,3326,6730,0033,3336,6740,0043,3346,6750,00
41,8446,9051,7256,3260,6964,8368,7472,4175,86
56,3862,0767,2471,9276,1379,9083,2586,2188,79
67,6973,3178,1682,3285,8688,8391,3293,3695,02
76,3981,5285,7289,1291,8493,9995,6696,9397,89
83,0087,4390,8693,4795,4396,8797,9298,6599,16
N = 32
X>0
n --->
M = 1
M = 2
M = 3
M = 4
M = 5
M = 6
123456789turns: coin toss won
12345678turns: coin toss lost
789101112131415cards drawed
21,8825,0028,1331,2534,3837,5040,6343,7546,88
39,5244,3548,9953,4357,6661,6965,5269,1572,58
53,6359,1964,2968,9573,1977,0280,4683,5586,29
64,8270,4575,3879,6683,3686,5389,2291,4993,38
73,6278,8983,2986,9389,9092,3094,2395,7496,93
80,4685,1588,8691,7794,0195,7297,0197,9598,63
An own table for 32 cards just because I saw so much decks with exactly 32 cards.
N = 40
X>0
n --->
M = 1
M = 2
M = 3
M = 4
M = 5
M = 6
123456789turns: coin toss won
12345678turns: coin toss lost
789101112131415cards drawed
17,5020,0022,5025,0027,5030,0032,5035,0037,50
32,3036,4140,3844,2347,9551,5455,0058,3361,54
44,7849,8054,5058,9163,0266,8470,3973,6876,72
55,2260,6565,5770,0174,0177,6080,8083,6486,16
63,9369,4074,1878,3481,9585,0687,7390,0091,93
71,1476,3980,8284,5387,6290,1892,2994,0095,39
N = 50
X>0
n --->
M = 1
M = 2
M = 3
M = 4
M = 5
M = 6
123456789turns: coin toss won
12345678turns: coin toss lost
789101112131415cards drawed
14,0016,0018,0020,0022,0024,0026,0028,0030,00
26,2929,7133,0636,3339,5142,6145,6348,5751,43
37,0441,4345,6149,5953,3756,9660,3663,5766,61
46,4151,4056,0360,3264,2967,9571,3274,4277,26
54,5759,8564,6368,9472,8376,3179,4382,2184,68
61,6466,9971,7075,8579,4782,6385,3787,7489,79
N = 60
X>0
n --->
M = 1
M = 2
M = 3
M = 4
M = 5
M = 6
123456789turns: coin toss won
12345678turns: coin toss lost
789101112131415cards drawed
11,6713,3315,0016,6718,3320,0021,6723,3325,00
22,1525,0827,9730,7933,5636,2738,9341,5344,07
31,5435,4239,1442,7246,1649,4652,6255,6458,53
39,9544,4848,7552,7756,5560,1063,4266,5469,45
47,4652,4156,9961,2165,0968,6571,9174,9077,63
54,1459,3364,0368,2672,0775,4978,5581,2983,73
I think thess tables could be used to find the right amount of copies you need depending on how necessary you need a card. Especially for cards you actually only need once. For this cards you have to decide between readiness of the card and getting this card more then once(=dead card).
For example(first table) with 3 Hopes you will have a chance of 67,24% to get at least 1 hope with your 9th card (or 2/3 turn). With 4 Hopes you would have a chance of 78,16%.
If you think you had a bad draw you can also use them to see whether you were really unlucky or not.  ;)

I hope the table is clearly arranged and useful. You can also tell me which table you need and I will edit them.
Title: Re: Draw Chance
Post by: PuppyChow on June 17, 2010, 10:09:52 pm
If you want the equation (anyone)

I have an equation I use that's a bit more limited, but simpler to use :) . All it will tell you is the probability of drawing at least one of a certain card which you have a certain amount of in a certain number of draws,

p = ( ( (t-c)! / (t-c-d)! ) / ( t! / (t-d)! ) )
p = Probability
c = Number of the type of card you're testing for in the deck
d = Number of cards you're drawing
t = Number of cards in the deck

It looks more complicated than it really is, since I can't use fraction bars :P .

So if I had six precognitions in a 30 card deck, and I wanted one in my hand of seven, then the probability would be:

p = 1-((30-6)!/(30-6-7)!) / ((30)!/(30-7)!)
p = 1-.17
p = .83
p = 83%
Title: Re: Draw Chance
Post by: coinich on June 17, 2010, 10:39:49 pm
http://elementscommunity.org/forum/index.php/topic,7893.0.html

I actually think we're probably all using the same formula to get the same answers, but that table puts it nicely too.  I was almost envisioning a 3D graph with the x axis being the number of cards wanted included in the deck, the y axis being the number of cards in the deck, and the z axis being the number of that card wanted in a hand...
Title: Re: Draw Chance
Post by: Selenbrant on June 17, 2010, 11:44:38 pm
I guess your equation is wrong, with c=1 the fraction is always reduced to "0", although it should be d/30 for d cards drawed.
I hope I am not wrong with this statement, maybe I have something on my eyes and its already late so be dont be angry with me if I am wrong.

My equation:
6 copies , 7 draws and 30 total to get AT LEAST 1:

p(X>0)=1-p(X=0)
=1 - 24/30 * 23/29* 22/28 * 21/27 * 20/26 * 19/25 * 18/24

the upper sequence: 24, 23, 22, 21, 20, 19, 18 is done with: (t-c)! / (t-c-d)! --> (30-6)! / (30-6-7)! --> (24)! / (17)! --> 24*23*22*21*20*19*18
the lower sequence: 30, 29, 28, 27, 26 ,25, 24 is done with: (t)! / (t-d)! --> (30)! / (30-7)! --> (30)! / (23)! --> 30*29*28*27*26*25*24

Your lower sequence will be 29*28*27*26*25*24*23, because the "-1".
I cant imagine that the "-1" will realise "exactly 1", but I will think about that tomorrow or the day after. Maybe you find my or your fault. ;)
Title: Re: Draw Chance
Post by: Selenbrant on June 18, 2010, 12:20:37 am
Ok, I cant help but calculating it...
For p(X>0) I didnt need hypergeometric, but for p(X=1).

My tables says for c=6, d=7 and t=30: 83,00(82,999)
I used hypergeometric..

p(X=1)39,669
p(X=2)+31,317
p(X=3)+10,439
p(X=4)+1,491
p(X=5)+0,081
p(X=6)+0,001
p(X>0)=82,998
My table isnt wrong, but your calculating seems to be, I get 39,669 for exactly 1.
Title: Re: Draw Chance
Post by: PuppyChow on June 18, 2010, 01:09:53 am
Actually, I'm calculating for "At least 1," (I should edit that in), and you're right that the "-1" isn't needed.
Title: Re: Draw Chance
Post by: Selenbrant on June 18, 2010, 11:23:50 am
http://elementscommunity.org/forum/index.php/topic,7893.0.html

I actually think we're probably all using the same formula to get the same answers, but that table puts it nicely too.  I was almost envisioning a 3D graph with the x axis being the number of cards wanted included in the deck, the y axis being the number of cards in the deck, and the z axis being the number of that card wanted in a hand...
Are you able to do this? I cant... ;). My knowledge in informatics is too limited. I elected mechanical engeneering and maths as advanced courses. But at least I can take the work typing all this numbers on. Too I guess for pillars it can be more intersting to know the chance getting at least 3 or 4.(I know about the QI and the QI is working pretty well, but it could be a nice addition)
Should I add some further tables? Tables are so cute.  :))

Actually, I'm calculating for "At least 1," (I should edit that in), and you're right that the "-1" isn't needed.
Ohh, sorry, I thought I read "exactly 1" or rather I misinterpreted your sentence:
Quote
So if I had six precognitions in a 30 card deck, and I wanted one in my hand of seven, then the probability would be:
Title: Re: Determine the right amount of copies; Draw Chance
Post by: Chapuz on December 26, 2013, 07:00:26 pm
This tables do NOT count the auto mulligan, therefore they are all wrong and with a considerably big error.

I couldn't make this tables counting the auto mulligan when I tried some months ago.

Admins: please remove this thread from the tutorials section.
Title: Re: Determine the right amount of copies; Draw Chance
Post by: andretimpa on December 26, 2013, 07:14:22 pm
Counting the automulligan shouldn't be hard. I think I can give it a shot.

Just to be sure, that's how the automulligan works (right?):
-Draw 7 cards
-If at least one of them is a 0-cost card, keep the hand
-else, draw 7 cards again. Always keep the new hand.
Title: Re: Determine the right amount of copies; Draw Chance
Post by: Blacksmith on December 26, 2013, 08:55:11 pm
Well I don't really see the use of this thread anymore since we got this.
Does math meath for you.
http://xenocidius.webs.com/openinghandsimulator.htm
Title: Re: Determine the right amount of copies; Draw Chance
Post by: Higurashi on December 27, 2013, 12:48:18 pm
A simulator doesn't do math. It collects empirical data. This is a math table used for a quick look; a simulator takes time.
Title: Re: Determine the right amount of copies; Draw Chance
Post by: andretimpa on December 29, 2013, 11:05:35 pm
I managed to consider the effect of the mulligan (need to polish the end result, since it is not in terms of the right variables yet) and I can tell that the draw chances of all cards get affected, not only pillars.

In a nutshell, if you have a chance P of having a mulligan with a given deck, then using the mulligan multiplies the probability of a draw that has no 0-cost cards in the first 7 by P and the probability of all other draws gets multiplied by (1+P).

So those tables are all indeed flawed, since the draws for N>7 depend on starting hands of both types, them there is no quick and dirty fix. When I have the correct results I'll post them here.
Title: Re: Determine the right amount of copies; Draw Chance
Post by: CuCN on December 29, 2013, 11:35:51 pm
The draw chance of any card depends not only on the number of copies of the card and the size of the deck, but also the number of zero-cost cards in the deck.
Because the mulligan is a bit weird in EtG (it leaves the original hand on top of the deck), I don't see an easy way to calculate the correct probabilities. Populating the tables using a simulator may be the only real solution.
Title: Re: Determine the right amount of copies; Draw Chance
Post by: andretimpa on December 29, 2013, 11:42:00 pm
The draw chance of any card depends not only on the number of copies of the card and the size of the deck, but also the number of zero-cost cards in the deck.
Because the mulligan is a bit weird in EtG (it leaves the original hand on top of the deck), I don't see an easy way to calculate the correct probabilities. Populating the tables using a simulator may be the only real solution.

If my calculations are in the right direction you can write the result as a sum over 3 variables of a bunch of things involving factorials. Not doable by hand, but feasible to calculate in a computer.

The game reshuffles the deck after the mulligan, doesn't it?
Title: Re: Determine the right amount of copies; Draw Chance
Post by: Chapuz on December 29, 2013, 11:46:23 pm
The game reshuffles the deck after the mulligan, doesn't it?
We don't know if it shuffles again or if the cards are sent to the bottom of the deck. Take the option you like most, the result won't change considerably
Title: Re: Determine the right amount of copies; Draw Chance
Post by: andretimpa on December 29, 2013, 11:50:47 pm
Quote from: chat
[15:39:38] Chapuz: 1) the deck is shuffled. 2) You draw 7 cards. 3) if you didn't get any 0-cost cards, the deck is reshuffled and you draw another 7 cards
[15:39:45] Chapuz: am I right?
[15:39:53] ColorlessGreen: yeah, 4 year old outdated thing in tutorials != current thing in stats forum
[15:39:55] ColorlessGreen: no
[15:40:16] Chapuz: no?
[15:40:19] ColorlessGreen: (3) if you didn't get any 0-cost cards, a new hand is drawn out of the cards you don't currently have in your opening hand and your opening hand is put back on top of the deck
[15:40:30] ColorlessGreen: meaning the top seven cards are guaranteed non-zero-cost
[15:40:41] ColorlessGreen: and the second opening hand has a higher than normal chance of zero cost cards

I'll try to do it like this. I foresee some nasty correlations appearing though ...

First conclusion: The mulligan has no relevance for n>14, that is after the first 7 cards have been drawn.
Title: Re: Determine the right amount of copies; Draw Chance
Post by: andretimpa on January 09, 2014, 01:50:04 am
I think I got an answer. It is not pretty but should be easy to use it to build a tool like the one Xeno got, but without doing simulations.

https://dl.dropboxusercontent.com/u/7229007/mulligan.pdf
blarg: