Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: [1]

Author Topic: Treasure Map Probability  (Read 10007 times)

0 Members and 1 Guest are viewing this topic.

kilik821

  • Pawn
  • **
  • Offline Offline
  • Posts: 1
  • Respect: +1
    • View Profile
Treasure Map Probability
« on: July 30, 2011, 05:11:35 am »
+1

David707 made an excellent post answering the question "Given n total cards in deck, t treasure maps, and p cards drawn, what is the chance of drawing 2 or more treasure maps?"  http://forum.dominionstrategy.com/index.php?topic=18.msg84#msg84

As a math major myself, his math didn't sit quite right with me.  I tried my hand at this problem and came up with this solution to the same question:



For the sake of TL;DR I will refrain from posting all of the mathematics involved in this, though if it is requested I will.  (Beware, I will have to write out an entire proof and it may be lost on some people)

I have included pictures of graphs with the chances of drawing 2 or more maps with different values of n, p, and t.

Please ask any more mathematical questions related to Dominion as the algorithm I have developed is very versatile and I have run out of questions to answer.  I will edit with any more information that is requested.
Logged

Fangz

  • Apprentice
  • *****
  • Offline Offline
  • Posts: 260
  • Respect: +13
    • View Profile
Re: Treasure Map Probability
« Reply #1 on: July 30, 2011, 12:20:59 pm »
0

Hi kilik, I'm a stats phd student myself though I haven't done much with the game.

However, I can vouch for your equation. It follows straightforwardly from application of combinatorics and exchangeability. However, it needs to be noted that this probability is in fact the long-run probability of drawing two or more treasure maps simultaneously per hand drawn. Practical application has a couple of problems: firstly you need to apply this formula to the remaining cards in your deck, not the entire deck. Secondly, there's an issue with draws that force a reshuffle - you need to condition on the fact that in theory at least, you know exactly what the first few cards you draw will be.

But for example, if you write this probability as 1-q, then it's true to say that if your deck will last you k hands with possibly some cards spare left over, then the probability of drawing two treasure maps in those k draws is indeed 1-q^k. Wait no it isn't, due to the correlation effect.  The average number of successes in those k draws is however (1-q)*k. If it's possible to only have one success (because you have 2 or 3 treasure maps) then this will equal the probability of drawing the right cards per deck cycle. David707's calculation is also correct, however. All of this can be validated with simulation code.

You shouldn't start your plots at 10 cards. Use of TM seriously without +cards generally requires lots of trashing. The real question is what having 1 haven or courtyard or similar does to these probabilities - but that's likely very difficult to calculate.
« Last Edit: July 30, 2011, 01:11:05 pm by Fangz »
Logged

Fangz

  • Apprentice
  • *****
  • Offline Offline
  • Posts: 260
  • Respect: +13
    • View Profile
Re: Treasure Map Probability
« Reply #2 on: July 30, 2011, 01:12:34 pm »
0

Here's a simulation to prove that this all works. Try it yourself in R!

#we choose deck size to be 15, hand size 5, two treasure maps

 n = 15; t = 2; p = 5; q = (choose(n-t, p) + choose(n-t, p-1)*t)/choose(n,p);  (1- q)*(n/p)

#kilik's formula gives   0.2857143 to be the probability per deck cycle

1- factorial(n/5)*factorial(n-t)*5^t/( factorial(n/5 - t)*factorial(n))

#david707 gives 0.2857143
wins = 0
maxiter = 100000
for (iteration in 1:maxiter){
deck = sample(c( rep(1, t), rep(0, n-t)))
wins = wins + (sum(colSums(matrix(deck, p)) >= 2) > 0)
}
wins / maxiter

#which should be pretty similar.
« Last Edit: July 30, 2011, 01:14:54 pm by Fangz »
Logged

david707

  • Baron
  • ****
  • Offline Offline
  • Posts: 51
  • Respect: +20
    • View Profile
Re: Treasure Map Probability
« Reply #3 on: August 02, 2011, 12:45:30 pm »
0

As fangz stated, my formula is for matching at least 2 maps at least once going through the entire deck drawing 5 cards at a time, whereas yours is for one particular hand of p cards. We're both right and both formulas are useful.
Logged

zorch

  • Herbalist
  • **
  • Offline Offline
  • Posts: 5
  • Respect: +1
    • View Profile
Re: Treasure Map Probability
« Reply #4 on: September 23, 2011, 03:38:19 pm »
0

Older post at this point, but I would point out that Chapel is a major enabler of Treasure Map.... thus it might actual be useful to start the graph at, say, 6 cards.
Logged
Pages: [1]
 

Page created in 1.491 seconds with 20 queries.