Dominion Strategy Forum

Dominion => Dominion General Discussion => Topic started by: AJD on December 26, 2011, 03:44:53 am

Title: Quadratic cards
Post by: AJD on December 26, 2011, 03:44:53 am
So, the typical Dominion card, if you play n copies of it, you get its benefit n times. Monument is a good example. Play one Monument, get $2 and 1 VP; play two, get $4 and 2 VP; and so on.

Some cards have diminishing returns from multiple copies. With Margrave, each one you play gives you +3 cards and +1 buy, but while the first one you play attacks your opponents, the additional copies actually on average help them. So the benefit of playing n Margraves is less than n times the benefit of playing one Margrave.

But a few cards have benefits that not only increase if you play multiple copies of them, but increase quadratically. A couple of these are obvious and fairly well-known:
These are quadratic cards because they give you both an extra buy and some other bonus that operates on a per-buy basis. Thus playing more of them both increases the number of times you get the bonus and the amount each instance of the bonus is worth.

A less obvious quadratic card is Bank: playing n Banks gives you n2/2 + (T+1/2)n coins. This one is less useful because T is usually substantially larger than n, whereas for Goons and Bridge B is usually 1. But it's quadratic for the same reason: it both puts a Treasure into play and gives you a per-Treasure bonus.

What other cards have quadratically increasing effects?
Title: Re: Quadratic cards
Post by: chwhite on December 26, 2011, 04:12:14 am
The effect of Fool's Gold is not exactly quadratic, but it is also better than n.  Playing n Fool's Golds gives you 4n - 3 coins.  The initial concept for FG was actually for an exponential bonus, but that was too tricky to explain with the rule that Treasures are played one at a time.

Another card whose benefits increase in a better-than-linear fashion when you play multiples is King's Court.  One KC lets you play an Action three times, KC a KC and you can play three Actions three times, KC a KC a KC and you can do it five times.  But, like Fool's Gold, this growth isn't quadratic, but rather linear with a better-than-n slope- a chain of KCs gives you 2n - 1 chances to triple an action.

I can't think of any other cards with quadratic effects.
Title: Re: Quadratic cards
Post by: dondon151 on December 26, 2011, 05:29:41 am
Crossroads comes to mind, but you kind of need a big starting hand and a high density of Victory cards to make it increase in value.

Certain variable victory cards also exhibit nonlinear increasing returns. Your first Silk Road (assuming 3 starting Estates) is worth 2 VP. Your fifth Silk Road is worth 4 VP on its own and adds another 8 VP by increasing the value of the first four Silk Roads. Obviously this doesn't quite work out cleanly because there's rounding involved, but Silk Road is almost exactly like Bank.
Title: Re: Quadratic cards
Post by: AJD on December 26, 2011, 06:34:51 am
Hmm, true. Gardens is quadratic for the same reason.

I guess Crossroads is sort of probabilistically exponential, depending on your green card density.... As far as I can tell, if your starting handsize (before playing any Crossroads) is H, and the percentage of victory cards in your deck is V, then your expected total +cards after playing n Crossroads is something like ((V+1)n–1)H.... I may have made a mistake in calculating that, though, but it seems pretty cool.
Title: Re: Quadratic cards
Post by: yaron on December 26, 2011, 08:34:08 am
Some cards are quadratic in your deck, rather than in play.
For example, an extra Laboratory in deck makes you draw cards more often, but also makes the cards you draw better.
Title: Re: Quadratic cards
Post by: werothegreat on December 26, 2011, 11:09:01 am
Your first Silk Road (assuming 3 starting Estates) is worth 2 VP. Your fifth Silk Road is worth 4 VP on its own and adds another 8 VP by increasing the value of the first four Silk Roads.

No it's not.  Your first Silk Road is worth 1 VP, yielding 4VP in total with your Estates. If you don't buy any other Victory cards, your fifth Silk Road is also worth 1 VP.  With Silk Road in play, your Victory point total would be s(s+v)/4 - ((s+v)mod4)/4 + V, where s is your number of silk roads, v is your number of other victory cards, and V is your victory point total otherwise.  Silk Road is linear - just multivariable.  If you had all the wacky victory cards in play (gardens, duke, vineyard, fairgrounds, silk road), the sum equation would be:

V = s(s+dk+vy+f+g+dch+v)/4-((s+dk+vy+f+g+v)mod4)/4+g(s+dk+vy+f+g+dch+v+a-av+o)/10-((s+dk+vy+f+g+dch+v+a-av+ o)mod10)/10+dk*dch+vy*a/3-((vy*a)mod3)/3+2f*N/5-((2f*N)mod5)/5+C

where V is your total VP, s = silk roads, dk = dukes, vy = vineyards, f = fairgrounds, g = gardens, dch = duchies, v = other VP cards, a = action cards, av = action-victory cards, o = other cards, N = number of different cards in deck, C = conventional victory points, through chips or non-counting VP cards.
Title: Re: Quadratic cards
Post by: AJD on December 26, 2011, 11:21:37 am
With Silk Road in play, your Victory point total would be s(s+v)/4 - ((s+v)mod4)/4 + V, where s is your number of silk roads, v is your number of other victory cards, and V is your victory point total otherwise.  Silk Road is linear - just multivariable.

...No, that formula is quadratic. It has an s2 term in it.
Title: Re: Quadratic cards
Post by: guided on December 26, 2011, 11:26:47 am
Yeah, this is absolutely quadratic: "s(s+v)/4 - ((s+v)mod4)/4 + V"

If you start with those 3 Estates and just buy Silk Roads, the first 4 give you 4 VP total, the next 4 give you 12 VP total, and the next 4 give you 20 VP total.
Title: Re: Quadratic cards
Post by: rrenaud on December 26, 2011, 11:37:13 am
I wanted to write an article about this for dominionstrategy.  There are lots of cards that have quadratic interactions with other cards.  Talisman or hoard and +buys.

Then there are even multiple axeses of this multiplicative effect. You can have a buy duplicater with +buys with a buy cheapener and get a cubic effect. 
Title: Re: Quadratic cards
Post by: werothegreat on December 26, 2011, 11:50:24 am
With Silk Road in play, your Victory point total would be s(s+v)/4 - ((s+v)mod4)/4 + V, where s is your number of silk roads, v is your number of other victory cards, and V is your victory point total otherwise.  Silk Road is linear - just multivariable.

...No, that formula is quadratic. It has an s2 term in it.

Stupid distribution.  The formula's right, anyway.
Title: Re: Quadratic cards
Post by: werothegreat on December 26, 2011, 12:00:18 pm
This seems on-topic: how would you feel about the following setup?

Vineyard, Chapel, Cellar, Familiar, Silk Road, Gardens, Laboratory, Duke, Grand Market, Fairgrounds
Title: Re: Quadratic cards
Post by: AJD on December 26, 2011, 12:05:10 pm
I wanted to write an article about this for dominionstrategy.  There are lots of cards that have quadratic interactions with other cards.  Talisman or hoard and +buys.

Don't let me stop you! I was only thinking about cards with quadratic interactions with themselves, obviously.

Then there are even multiple axeses of this multiplicative effect. You can have a buy duplicater with +buys with a buy cheapener and get a cubic effect.

Oooooh.
Title: Re: Quadratic cards
Post by: AJD on December 26, 2011, 12:48:23 pm
The initial concept for FG was actually for an exponential bonus, but that was too tricky to explain with the rule that Treasures are played one at a time.

From the description in the Secret History, it looks like FG was intended to be exactly quadratic.
Title: Re: Quadratic cards
Post by: mischiefmaker on December 26, 2011, 12:58:52 pm
This seems on-topic: how would you feel about the following setup?

Vineyard, Chapel, Cellar, Familiar, Silk Road, Gardens, Laboratory, Duke, Grand Market, Fairgrounds
Chapel into Grand Market, going for Provinces, but keeping an eye on opponent's strategy. If my opponent doesn't do the same thing, I think I might need to snipe a few Duchies along the way but that's the only alternative VP strategy I'm worried about, since there's only one source of +buy, and if he doesn't mirror I'm likely to end up on the happy side of a 7-3 or 8-2 split, with a nice trim deck that's going to be capable of multiple multi-Province buys.

If he does mirror it will probably come down to tactical end-game buys and/or first-player advantage.
Title: Re: Quadratic cards
Post by: dondon151 on December 26, 2011, 02:09:14 pm
No it's not.  Your first Silk Road is worth 1 VP, yielding 4VP in total with your Estates.

My mistake; fsr I thought Silk Road was worth 2 VP for every 4 Victory cards in your deck (probably should have stopped for a moment and considered how this didn't make any sense).
Title: Re: Quadratic cards
Post by: werothegreat on December 26, 2011, 04:09:13 pm
This seems on-topic: how would you feel about the following setup?

Vineyard, Chapel, Cellar, Familiar, Silk Road, Gardens, Laboratory, Duke, Grand Market, Fairgrounds
Chapel into Grand Market, going for Provinces, but keeping an eye on opponent's strategy. If my opponent doesn't do the same thing, I think I might need to snipe a few Duchies along the way but that's the only alternative VP strategy I'm worried about, since there's only one source of +buy, and if he doesn't mirror I'm likely to end up on the happy side of a 7-3 or 8-2 split, with a nice trim deck that's going to be capable of multiple multi-Province buys.

If he does mirror it will probably come down to tactical end-game buys and/or first-player advantage.

If your opponent managed to pick up even just one or two Familiars, you might be dead in the water.
Title: Re: Quadratic cards
Post by: cherdano on December 26, 2011, 11:13:48 pm
There are really many cards with non-linear effects.
One minion in your deck is just a non-terminal silver, but three minions in your hand are two non-terminal silvers plus a new card draw. (I.e., the card draw becomes more valuable after having played non-replacing cards.)
One torturer means your opponent discards two worthless cards, but two torturers means he has to discard good cards too or get a curse.
If you have +buys, then every highway is worth as many dollars as buys you can use, but the more highways you play, the more of your buys you are going to be able to use.
If your opponent has a buying power of $6, then playing one saboteur a turn will slow him down by a third. To be a bit simplistic, this means we have 50% more time to buy our 4 provinces. But if we play 2 saboteurs at turn, we slow him down by two thirds, which means we have three times as long to buy our 4 provinces.
Title: Re: Quadratic cards
Post by: werothegreat on December 27, 2011, 12:33:58 am
To continue on cherdano: One Swindler is a minor annoyance.  Two Swindlers are disgustingly frustrating, particularly if paired with something like Spy or Oracle.  I don't have actual math for this one.  But beyond the most simplistic of cards, like Market or Woodcutter, most of them, and most combinations of them, have non-linear effects.  One Laboratory is nice.  Two Laboratories are twice as nice.  But three or more can mean you're drawing your entire deck every turn, which is more than twice as nice.  The same effect can be achieved with a combination of Villages and +3 Card cards, especially if backed up by Schemes to ensure that your starting hand isn't left to luck.  Again, I couldn't really quantify this, but spamming a great card or building a great combo is qualitatively exponentially better than just one of the card.
Title: Re: Quadratic cards
Post by: biopower on December 27, 2011, 01:33:53 am
To continue on cherdano: One Swindler is a minor annoyance.  Two Swindlers are disgustingly frustrating, particularly if paired with something like Spy or Oracle.  I don't have actual math for this one.  But beyond the most simplistic of cards, like Market or Woodcutter, most of them, and most combinations of them, have non-linear effects.  One Laboratory is nice.  Two Laboratories are twice as nice.  But three or more can mean you're drawing your entire deck every turn, which is more than twice as nice.  The same effect can be achieved with a combination of Villages and +3 Card cards, especially if backed up by Schemes to ensure that your starting hand isn't left to luck.  Again, I couldn't really quantify this, but spamming a great card or building a great combo is qualitatively exponentially better than just one of the card.

I don't think Swindlers are actually quadratic: they are annoying, but you can't quite quantify "twice as frustrating". Laboratories certainly aren't quadratic (each extra Lab played after the first only increases your handsize by 1). They're probably much worse because after drawing your deck, extra labs give you no benefit.

I'm pretty sure we're talking about cards which qualitatively give quadratic effects. It's precisely because you can't quantify "twice as nice" that saying "qualitatively exponentially better" seems oxymoronic. It also might simply be untrue, as Gold is a great card; BM is probably not exponentially better, even qualitatively.
Title: Re: Quadratic cards
Post by: rrenaud on December 27, 2011, 01:51:00 am
Labs by themselves aren't quadratic.  But if they provide the plus cards that enables you to stack a bunch of Banks, Bridges, or Goons, are they quadratic by credit?
Title: Re: Quadratic cards
Post by: biopower on December 27, 2011, 04:30:17 am
Labs by themselves aren't quadratic.  But if they provide the plus cards that enables you to stack a bunch of Banks, Bridges, or Goons, are they quadratic by credit?

As much as I hate the slippery slope argument, it also means that practically every engine card is quadratic by credit. If everything gets the quadratic-by-credit designation, the designation becomes meaningless.
Title: Re: Quadratic cards
Post by: WrathOfGlod on December 27, 2011, 06:31:56 am
To continue on cherdano: One Swindler is a minor annoyance.  Two Swindlers are disgustingly frustrating, particularly if paired with something like Spy or Oracle.  I don't have actual math for this one.  But beyond the most simplistic of cards, like Market or Woodcutter, most of them, and most combinations of them, have non-linear effects.  One Laboratory is nice.  Two Laboratories are twice as nice.  But three or more can mean you're drawing your entire deck every turn, which is more than twice as nice.  The same effect can be achieved with a combination of Villages and +3 Card cards, especially if backed up by Schemes to ensure that your starting hand isn't left to luck.  Again, I couldn't really quantify this, but spamming a great card or building a great combo is qualitatively exponentially better than just one of the card.
Swindler is actually sub-linear as the more swindlers you have the more likely you are to hit an already swindled card.
Torturer is not quadratic because its utility is bounded by the value of a +3 card witch ($6-$7)
Title: Re: Quadratic cards
Post by: jimjam on December 27, 2011, 07:04:19 am
Venture is quadratic since the average treasure value increases linearly with the number of ventures in the deck.
Thus also for the money cantrips Tournament, Market, Peddler, Grand Market, etc.
Treasure Map is quadratic since you want two of them in hand.
Also,I'm thinking that lab may be quadratic in the sense that the lab draws more cards, but labs are good, so you're drawing from a better deck, assuming you don't draw your whole deck.

Minions is pretty crazy. The expected number of hands you'll draw (i.e. times you'll use the secondary effect) is around 1/x where x=(n/m+n)^4 (m=number of minions, n=number of dead cards), and the value of each hand is linear to m. Eventually as your deck becomes basically all minions the effect is merely linear, but it looks like before that the effect is quintic.
Title: Re: Quadratic cards
Post by: DG on December 27, 2011, 08:11:15 am
You can create quadratic formula by selectively choosing the value you want to look at. For instance if you have a lot of cellars in your n card hand and play them in series you can discard n-1, n-2, n-3, n-4, ..., 2, 1 cards. So the most cards you can discard with your cellars is the sum of those terms, n(n-1)/2. This isn't a very helpful quadratic relationship.
Title: Re: Quadratic cards
Post by: Kuildeous on December 27, 2011, 10:23:34 am
Venture is quadratic since the average treasure value increases linearly with the number of ventures in the deck.

Maybe I'm misunderstanding, but I don't see how that's quadratic. The average treasure value is represented by (T+v)/n where T is the total value of non-Venture cards and n is the deck size. As you say, this is a linear relationship and not quadratic.

The effect of the card is also linear. Assuming a single Venture results in revealing all your Ventures in succession, the value of your hand would be T + v + t, where T is the total value of non-Venture cards in your play area and t is the value of the treasure drawn as a result of your last Venture. That is not quadratic either.

Although, I suppose that one could argue that a linear equation could be quadratic, as ax^2 + bx + c could see a value of a=0, but I believe that an equation must have a!=0 to quality as quadratic.
Title: Re: Quadratic cards
Post by: yaron on December 27, 2011, 10:26:06 am
Laboratories certainly aren't quadratic (each extra Lab played after the first only increases your handsize by 1).

It depends on whether your independent variable is "cards of this type played this turn", or "cards of this type in your deck".

If you're looking at cards played, then Labs are linear - each one is +1 card.

But if you're looking at cards in deck, then each Lab gives you +1 size when you draw, but it also makes your other Labs better by being there to be drawn by them.

Another way to look at it: while "value from Labs" is linear in "Labs played per turn", "Labs played per turn" is quadratic in "Labs in deck".  If you have 6 Labs to my 3, you'll play more than 2 Labs for each Lab I play.

This is true for all engine cards - the more you have in your deck, the more each one is worth.
Title: Re: Quadratic cards
Post by: yaron on December 27, 2011, 10:40:49 am
v - average value of venture
k - number of ventures in deck
n - number of non-ventures in deck
T - total value of non-ventures in deck

v = 1 + (T+kv) / (n + k)

(in words: a venture is worth 1 coin + the average value of all treasures in deck)

This reduces to:

v = 1 + T/n + k/n

So the value of each particular venture (v) grows (in a linear fashion) with the number of ventures in deck (k).

The total value of all ventures grows quadratically.



Venture is quadratic since the average treasure value increases linearly with the number of ventures in the deck.

Maybe I'm misunderstanding, but I don't see how that's quadratic. The average treasure value is represented by (T+v)/n where T is the total value of non-Venture cards and n is the deck size. As you say, this is a linear relationship and not quadratic.

The effect of the card is also linear. Assuming a single Venture results in revealing all your Ventures in succession, the value of your hand would be T + v + t, where T is the total value of non-Venture cards in your play area and t is the value of the treasure drawn as a result of your last Venture. That is not quadratic either.

Although, I suppose that one could argue that a linear equation could be quadratic, as ax^2 + bx + c could see a value of a=0, but I believe that an equation must have a!=0 to quality as quadratic.
Title: Re: Quadratic cards
Post by: DG on December 27, 2011, 02:13:48 pm
The calculation of each venture's value is dependent upon the other ventures so you can't just multiply them up. In other words, the ventures brought into play from the deck do not have the same value as the ventures played from hand.
Title: Re: Quadratic cards
Post by: jimjam on December 27, 2011, 06:35:11 pm
@K: Yeah, a!=0 for a quadratic equation

@DG: Yes, they are dependent, but the leading term is still x^2, per the reasoning that the venture value increases linearly with ventures and the chance of a certain card in hand being a venture is linear. Moreover in the limit, the value difference between v(k,n) and v(k-1,n) is negligible.
Title: Re: Quadratic cards
Post by: DG on December 27, 2011, 08:34:01 pm
Not convinced. If we consider the simplest deck model this would probably be where the treasures are arranged in a series in the deck, and a treasure is considered played "from hand" if the preceding treasure is not a venture (i.e. we flatten out the 5 cards hands). In this case the chance of a venture being played "from hand" would be n/n+k-1. So the number of ventures in the deck that are played from hand may not increase linearly when you add more ventures.

If you want to go further I think you need to define what the "total value of non-ventures" and "total value of ventures" actually mean since they're inconsistent at the moment.
Title: Re: Quadratic cards
Post by: jimjam on December 28, 2011, 01:08:50 am
*
This is my reasoning: If k is the number of ventures and n is the number of coppers (lets keep it simple with just two types of treasure), then in the case where k<<n (if the deck is mostly ventures then the treasure per turn is bounded by the size of the deck, which is linearly related to ventures. If this is what you're talking about, then I agree. If you're in the case where you're playing almost your whole deck, then only Bank or Venture/HoP/Mandarin will yield quadratic treasure).
Then the chance of any given card in hand being a venture is k/(n+k), which is approximately k/n.
Now in the large case, we can sample with replacement. Therefore when a venture is played the ventures hit before copper is geometric, so we expect the value of a venture played from your hand to be 1+ 1/(n/(n+k-1)), which comes out to be 1+(k-1+n)/n
so the value of your hand = expected $ of ventures *expected value of a venture=5*chance of a card being a venture*expected value of a venture. The  highest term is k^2 and it is clearly not canceled out anywhere. Therefore it is quadratic.

Now you might ask, well, if I have a venture as one card in my hand, then doesn't that mean less chance of another card being a venture? Yes, but it balances out because if your first card is a venture, you can just not look at your other cards in hand, and play it. Then the venture has a certain expected value, which was calculated. If you have any other ventures in hand, you can forget about the first one, because the first card (be it copper or venture) isn't likely to take out more ventures or coppers from the deck than the pre-existing ratio, and it will thus have the same expectation.


*Ok, I understand what you mean now. The main point is basically that (k being coppers and n being ventures in your formula) n/n+k-1 is approximately n/k since we're taking k to be significantly larger than n. It's up to debate whether we can have an arbitrarily large constant k that is always larger but doesn't grow with n, but what you said before about the value dependence of ventures is not a reason against it being quadratic.

Spoilered for obsolescence

Edit: Ok, I think you're right. The calculation I'm using for this is that given a large deck of v ventures and c coppers, the total treasure of the deck is v+c and it takes c/5 turns to cycle through it, so ventures indeed increase the treasure per turn linearly.
Title: Re: Quadratic cards
Post by: Geronimoo on December 28, 2011, 06:11:03 pm
If you want to know how much a Venture will be worth in a certain deck you could always use my simulator and more specifically the new feature where you define the start state (edit/create, then choose the "Start state" tab next to the description)

For instance: you want to know how much $ a Venture would give on average if you have 7 Copper, 4 Venture, 3 Silver and 2 Banks in my deck: just put the Venture in the Starting Hand and the  "7 Copper, 4 Venture, 3 Silver and 2 Bank" in the Starting draw deck. Save and simulate and according to the average $/turn graph it will be worth about $2.8 ...

No complex formulas needed (or if you found a formula, you could check its validity with the simulator)
Title: Re: Quadratic cards
Post by: jimjam on December 28, 2011, 08:20:55 pm
Well what we're looking at here is the limiting relationship, not the exact values of the ventures. I was considering writing a quick python code to calculate the values but I decided it would be better to just figure out the solution algebraically. I was wrong at first since I used a ridiculous approximation, since all variables except n should be fixed/bounded while n goes to infinity. And the number of ventures is hand is trivially bounded by 5, so I'm now of the opinion ventures are linear, which I think nobody now disagrees. The final formula for ventures and coppers I came up with, 5(v+c)/c seems to be correct and not require much approximation at all.

As for minion, it is roughly quartic, not quintic as I had said earlier, for the same reason (the value of a hand is bounded by $8), though Minion Sudden Death (reshuffling in the middle of the turn) is an issue. This might be worth running in a simulator.