Dominion > Dominion Articles

Money density math: Gold/2xSilver/Cache, Silver/Peddlers, trashing estates

(1/3) > >>

jonaskoelker:
Motivation

I have $6 and two buys; when should I get Gold vs. Cache vs. 2xSilver? I'm playing BM on a board with no terminal draw; should I go for a cantrip copper over Silver? I'm playing a wonky board with nothing going on; is Hermit or Ironworks a better BM enabler?

Here I'll do some money density math to give partial answers to such questions.

Comparing purchases, the generic math

Let m be the total money in your deck and c be the number of cards, not counting cantrips (because they draw a replacement card when you play them). Then your money density, d, is m/c.

If you add a bundle of c1 cards which in total produce m1 money, your new money density d_1 is (m+m1)/(c+c1). If you add another bundle of c2 cards which produce m2 money, your new money density d_2 is (m+m2)/(c+c2).

The first bundle is better, in the sense of increasing your money density the most (or equivalently, in the sense of having the highest post-change money density) when d_1 > d_2, that is, when (m+m1)/(c+c1) > (m+m2)/(c+c2). Rewriting,

--- Code: ---    (m+m1)/(c+c1) > (m+m2)/(c+c2)
<=> (m+m1)(c+c2) > (m+m2)(c+c1)
<=> m*c + m1*c + m*c2 + m1*c2 > m*c + m2*c + m*c1 + m2*c1  [distributive law]
<=> m*(c2-c1) + m1*c2 > c*(m2-m1) + m2*c1                  [subtract (m*c + m*c1 + c*m1) on both sides]

--- End code ---

It seems obvious that if you add the same number of cards, the bundle with the most money is better. Let's sanity-check the math, letting c1=c2:

--- Code: ---    m*(c2-c1) + m1*c2 > c*(m2-m1) + m2*c1
<=> m*0 + m1*c1 > c*(m2-m1) + m2*c1  [apply c1=c2]
<=> c*(m1-m2) + c1*(m1-m2) > 0       [move stuff around]
<=> (c+c1)(m1-m2) > 0
<=> (m1-m2) > 0                      [assuming c+c1 > 0]
<=> m1 > m2

--- End code ---
In words, bundle 1 is better when it has the most money. Obvious truth is obvious, and the math passed a simple sanity check.

Next, let's assume (WLOG) that the second bundle has more cards; c2=c1+dc (dc > 0);

--- Code: ---    m*(c2-c1) + m1*c2 > c*(m2-m1) + m2*c1
<=> m*(c1+dc-c1) + m1*(c1+dc) > c*(m2-m1) + m2*c1
<=> m*dc + m1*dc > c*(m2-m1) + m2*c1 - m1*c1
<=> (m+m1)*dc > (c+c1)(m2-m1)

--- End code ---
(Actually I never use the assumption that dc > 0, so this formula also works when c2 < c1.)

Comparing some specific treasure bundles

Let's use this to compare Gold vs. 2xSilver, i.e. m1=3,c1=1 vs. m2=4,c2=2 and dc=c2-c1=1

--- Code: ---    (m+m1)*dc > (c+c1)(m2-m1)
<=> (m+3)*1 > (c+1)*(4-3)  [insert values of variables]
<=> m > c - 2

--- End code ---
So Gold is better (in terms of money density) when total money exceeds the number of cards minus two; in that case, your money density m/c is greater than (c-2)/c = 1-(2/c). This threshold is always less than 1, it approaches 1 as your deck grows larger, and it's 0.8 on turn one; your actual money density is 0.7, so if you can muster $6 and two buys on turn one, go for 2xSilver over Gold (if all you care about is money density right then and there; there are of course other considerations).

With more practical relevance: favor 2xSilver only when money density applies and you have low money density (i.e. a slog), and then probably only some of the time, depending on the particular kingdom.

(In engines, my choices are determined more by engine capacity math than by money density considerations; money density stops being a useful concept when you draw a constant fraction of your deck, e.g. 1, rather than a constant number of cards.)

Let's compare Gold to Cache: m1=3,c1=1 vs. m2=5,c2=3 and dc=3-1=2:

--- Code: ---    (m+3)*2 > (c+1)*(5-3)
<=> 2m + 6 > 2c + 2
<=> m > c - 2

--- End code ---
Oh look, it's the same condition. Geronimoo's simulation of a Duke/Duchy slog comes to the conclusion that you want Cache over Gold. It seems plausible that money density would be around 1 (which is around 1-(2/c)) if you green early and often (and you don't need much more in Duchy/Duke), so I consider this a confirmation of what the math predicts. (In slogs you draw a constant number of cards rather than a constant fraction of your deck, so the concept of money density is sensible in the first place.)

Just for completeness, let's compare 2xSilver to Cache, i.e. m1=4,c1=2 vs. m2=5,c2=3 and dc=3-2=1:

--- Code: ---    (m+m1)*dc > (c+c1)(m2-m1)
<=> (m+4)*1 > (c+2)(5-4)
<=> m + 4 > c + 2
<=> m > c - 2

--- End code ---
Hey, what do you know; it's the same condition. So whenever m > c - 2 (mediocre-or-better money density) we have Gold > 2xSilver > Cache, and whenever m < c - 2 (very low money density) we have Cache > 2xSilver > Gold.

Comparing treasures and cantrip money

Next, let's use the generic formula to compare silver and some flavor of cantrip copper. Intuitively, a silver in hand gives you $2 where a cantrip copper gives you $1 plus your money density (in expectation), so we should expect cantrip coppers to be better when money density exceeds 1. Let's do the math, and remember that we don't count cantrips as cards because they draw replacements when you play them; for cantrip copper, m1=1,c1=0 and for silver, m2=2,c2=1 giving dc=1-0. Cantrip copper is best when:

--- Code: ---    (m+m1)*dc > (c+c1)(m2-m1)
<=> (m+1)*1 > (c+0)(2-1)
<=> m > c - 1

--- End code ---
When m is an integer, m > c - 1 is the same as m >= c, in which case money density is at least one. So the money density analysis matches the payload-when-in-hand analysis perfectly.

Of course, there are considerations other than money density: if you're playing BM with terminal draw, drawing cantrips dead is worse than drawing live treasures. And no two cantrip coppers are the same; what they do for you depends on what else your deck is doing.

Let's also consider Grand Market (m1=2,c1=0), compared to Gold (m2=3,c2=1). Intuitively it should be the same, GM is better when 2+density > 3, but let's check when GM is best:

--- Code: ---    (m+m1)*dc > (c+c1)(m2-m1)
<=> (m+2)*1 > (c+0)(3-2)
<=> m > c - 2

--- End code ---
That's not the same result, though. Let's do a thought experiment: you deck is 20 copper, plus either a Gold or a Grand Market. On the turn where you draw your non-copper, your payload will be 1x2+5x1 or 1x3+4x1, in both cases $7; but because GM draws you a card, you will see the higher payload ever so slightly more often. So it makes sense that the cutoff shouldn't be m/c=1.

But then, why is the threshold different for Peddler/Silver vs. GM/Gold? Because one Gold can outweigh two estates (in terms of hitting m/c = 1) where a silver can only outweigh one. *Vigorous handwaving*

Just for fun, let's compare cantrip copper (m1=1,c1=0) to Gold (m2=3,c2=1 and dc=1-0=1):

--- Code: ---    (m+m1)*dc > (c+c1)(m2-m1)
<=> (m+1)*1 > (c+0)(3-1)
<=> m > 2c - 1

--- End code ---
So cantrip copper is best when money density is at least $2/card, way above what you need for Province, close to enough to what you need for a Colony. (Reasonable, since intuitively $1 plus a card is better than $3 when a card is better than $2.)

Specific money densities and the importance of trashing estates

So, that was some math to help you evaluate particular money bundles vs. each other, not assuming anything about the rest of the deck, except the applicability of money density in the first place. Now I want to consider some specific (somewhat contrived) decks.

The first will be the silver flood: it has c coppers, e estates and s silvers. Its total money m is c+2s, and the total number of cards # = c+e+s, so money density is (c+2s)/(c+e+s). If you want to hit a money density of $1.6 so you can buy a province, how many silvers do you need?

--- Code: ---    (c+2s) / (c+e+s) >= 1.6
<=> c + 2s >= 1.6c + 1.6e + 1.6s
<=> 0.4s >= 0.6c + 1.6e
<=> s >= (10/4*6/10)c + (10/4*16/10)e
<=> s >= 1.5c + 4e

--- End code ---
So for every two coppers you need three silvers (that's a province hand right there: SSSCC); for every blank you need four silvers (that's also a province hand: SSSSE). Said another way: for every estate you trash, that's four fewer silvers you need to buy. Also, trashing a copper moves you closer to $1.6/card more than adding a silver does.

Let's re-check that statement with the math from earlier: when is trashing a copper (m1=-1, c1=-1) better than adding a silver (m2=2, c2=1 with dc=1-(-1)=2):

--- Code: ---    (m+m1)*dc > (c+c1)(m2-m1)
<=> (m-1)*2 > (c-1)(2-(-1))
<=> 2m - 2 > 3c - 3
<=> 2m > 3c - 1
<=> m > 1.5c - 0.5

--- End code ---
So the above statement needs a caveat: trashing a copper is only better than adding a silver when you're already quite close to $1.6.

Let's compare a silver flood to a gold flood; same $1.6 target:

--- Code: ---    (c+3g) / (c+e+g) >= 1.6
<=> c+3g >= 1.6c + 1.6e + 1.6g
<=> 1.4g >= 0.6c + 1.6e
<=> g >= (10/14*6/10)c + (10/14*16/10)e
<=> g >= 3/7c + 8/7e

--- End code ---
So you need one gold (and a bit) per estate, and one gold per two-and-a-bit coppers. A province hand would be GGCCE, and we have 2 = 2*3/7 + 8/7, so the math survives a province-hand sanity check. Every estate you trash is one less gold you need to buy.

This suggests that if you're playing Big Money, trashing your estates is good; it means you can start greening that much sooner.  Of course, -3VP also means you'll have to green more, i.e. longer, but ramping up your money density sooner also means you'll hit $1.2 sooner, which is the Gold breakpoint; the upshot: trashing estates should help you more than the linear formula suggests. To know exactly how much, and whether it outweighs the -3VP, running simulations is probably useful.

The wiki entry on DoubleJack suggests that Jack is fast because it gains you silvers. But Ironworks can gain you a silver too; where Jack draws you a card, most often a copper the first few times, Ironworks "draws" you a virtual copper when you gain a silver. So why isn't DoubleIronworks a BM strategy to be reckoned with, only slightly less good than DoubleJack (ignoring attacks of course)? My money, and my math, is on the fact that trashing one estate brings you four silvers (or one gold) closer to the $1.6 threshold, and Ironworks doesn't trash estates.

This also suggests that on some wonky boards, Hermit can be a poor man's Jack in BM: it gains you Silver and trashes your estates; it fails to draw you cards, but maybe you can transition via Madman into a vanilla terminal draw BM build once Hermit has cleared out your estates, if there's some decent enough terminal draw on the board. Is the +$1 of Ironworks outweighed by trashing estates? Based on my math I would think so. Todo/future work: running simulations to compare various silver gainers and estate trashers (e.g. Hermit vs. Ironworks), to better understand the importance of each aspect of Jack.

TL;DR Buy many small treasures when treasure density is low, buy cantrip +$x over a $y treasure when money density exceeds y-x, and trashing estates is really frigging good. While this might not be news, I like having the math to back up more word-heavy arguments.

Limetime:

--- Quote from: jonaskoelker on May 23, 2017, 09:12:39 am ---
--- End quote ---
It is less about money dencity and more about being able to spike certain price points.
Also resiliency when greening is important.

jonaskoelker:

--- Quote from: Limetime on May 23, 2017, 10:06:29 am ---It is less about money density and more about being able to spike certain price points. Also resiliency when greening is important.

--- End quote ---
Is that an argument against any specific point, against all my points or against the use of money density in general? I'll happily concede that money density is at best a low-resolution pointer in maybe somewhere not far away from the right direction, rather than a tool you can use to 100% determine both your strategy and tactics. Is there any of my money density calculations you think lead more away from the right answer than towards it?

Of course, hitting $8 is more than ~14.3% better than hitting $7, that I agree with. However, getting to $8 correlates with increasing your money density, so I think the concept is not completely useless. Complication: given that you'll have treasures of varying money amounts in BM, selection is also useful (such as from Embassy); that is, on top of just the average you also have to consider the variance.

I think resilience while greening means sustaining your ability to green, which again correlates with having a high money density (and keeping it high, e.g. such as with Hoard).

Agree/disagree?

DG:

--- Quote from: jonaskoelker on May 23, 2017, 11:09:58 am ---Of course, hitting $8 is more than ~14.3% better than hitting $7, that I agree with. However, getting to $8 correlates with increasing your money density, so I think the concept is not completely useless.

--- End quote ---

Since you are comparing two situations where you believe the density difference to be narrow, the difference in spiking $8 hands may be more important. Anyone who has played with masterpiece a lot will tell you that it typically produces a lot of 7 coin hands. I'll offer you a simpler rule of thumb that doesn't need as much maths.

In any simple situation where it is bad to add a copper to a deck, adding one gold on its own to a deck is better than adding a copper and a gold, which is better than adding two silvers.

Limetime:

--- Quote from: jonaskoelker on May 23, 2017, 11:09:58 am ---
--- Quote from: Limetime on May 23, 2017, 10:06:29 am ---It is less about money density and more about being able to spike certain price points. Also resiliency when greening is important.

--- End quote ---
Is that an argument against any specific point, against all my points or against the use of money density in general? I'll happily concede that money density is at best a low-resolution pointer in maybe somewhere not far away from the right direction, rather than a tool you can use to 100% determine both your strategy and tactics. Is there any of my money density calculations you think lead more away from the right answer than towards it?

Of course, hitting $8 is more than ~14.3% better than hitting $7, that I agree with. However, getting to $8 correlates with increasing your money density, so I think the concept is not completely useless. Complication: given that you'll have treasures of varying money amounts in BM, selection is also useful (such as from Embassy); that is, on top of just the average you also have to consider the variance.

I think resilience while greening means sustaining your ability to green, which again correlates with having a high money density (and keeping it high, e.g. such as with Hoard).

Agree/disagree?

--- End quote ---
This really isn't an argument, I was just saying that money density is definitely not the best metric to gauge your deck's performance.
Hitting certain price points is best done by high value treasure.
Resiliency is best done by having a million treasures.
Your point about trashing estates is on point because every estate slows down growth (that estate will hurt you every single time you draw it) and is bad at making sufficient treasures collide to hit certain price points.
You can throw out everything I just said when you are playing an engine.

Navigation

[0] Message Index

[#] Next page

Go to full version