DISCLAIMER: I'm well aware that this discussion is largely theoretical in nature. I won't attempt to inject any application of the findings here into actual Dominion strategy -- that's for the reader to you. The purpose of this is simply to calculate an expected draw for your Scrying Pools given a certain deck composition.Sometimes there's Scrying Pool on a board and there's no trashing. Sometimes it's the only non-terminal source or the best source of draw, enough that if you're going to try and increase your hand size, that's what you're going for. Is it worth it? Say it with me...
Depends on the kingdom.
But how do you tell? I, for one, am no
stranger to
getting crushed by people who go for Scrying Pool when I've decided it wasn't worth it.
I talked about this in that third link ("crushed") above, but sometimes it's helpful for me to try and calculate one's expected draw with Scrying Pool based on action density, and when I visualize that number in the context of the specific deck I'd try to build, sometimes I can see Scrying Pool's value more clearly. Unfortunately for me this usually happens after the game is over so I'm working on that.
So there are a couple of numbers that I want to talk about computing and maybe I'm close to getting this right. First off, I want to only look at the case where there's no trashing. Let's be generous, though, and say that the only non-Action card you have to buy is a single Potion and everything else is an Action card and not worry about greening, so you have 11 non-Action cards in your deck. I want to know how many Action cards (X) you have to have in your deck to make Scrying Pool's expected draw be E cards.
A simple calculation to make would look like:
Expected Draw = 1+(X/11)
and this is what I've been using to get close to this number, but I'm thinking maybe this isn't accurate enough (it doesn't even attempt to take the Spy-effect into account, among some other little things). I want to find either something that's closer and still easy to compute or just find some benchmarks for "E=2 when X=this and E=3 when X=that, etc."
Depending on your deck, you may also want to consider the case that discarding a non-Action card is just as good as drawing it because of the cycling or the nature or your payload (Let's say you're playing Highway/Market Square/Scrying Pool with no other support whatsoever; it doesn't matter if you're drawing your Coppers or not, you just want to find and play as many of your action cards as possible so Scrying Pool gets a boost here).
Here are some of my attempts at refining this calculation:
1. Replace "X" with "X-1" because you can't draw the Scrying Pool you play.
2. Split the formula into two separate cases:
E = P(top card was an action)*(Expected draw in that case) + P(top card wasn't an action and you discarded it)*(Expected draw in that case[+1])
-- and you can insert a "+1" where I pointed that out if you're counting the cycling advantage from the card you discarded.
Let me try and come up with expressions for these things
P(top card was an action) = (X-1)/(X+10)
P(top card was not an action) = 11/(X+10)
Expected Draw given we saw an action = 2 + (X-2)/11
Expected Draw given we saw a non-action) = 1 + (X-1)/10
The only thing I can think of that this doesn't take into account is the fact that your deck composition changes with each Action card you draw, making it slightly less likely each time that you hit another Action. I can't think of a concise formula for this and I'm terrible with summations so I don't have that formula right away (so far my attempts at coming up with this have just looked wrong to me so I just need to think about this a little more).
This stuff is messy but at least I could plug it into Excel or something and get some numbers and charts that could potentially be useful. I also know there are quite a lot of math people around here that would at least find this intelectually stimulating if nothing else. Help is appreciated, particularly in telling me where I'm wrong.
EDIT 1Without the spy effect taken into account, but with deck changing taken into account, I believe I'm pretty close with the following formula.
Let E = expected draw from playing your Scrying Pool (sans Spy effect)
X = the number of Action cards in your deck
E(X) = 1 + (X-1)/(X+10) + [(X-1)/(X+10)]*[(X-2)/(X+9)] + [(X-1)/(X+10)]*[(X-2)/(X+9)]*[(X-3)/(X+8)] + ... + [(X-1)/(X+10)]*[(X-2)/(X+9)]*...*[(X-n)/(X+11-n)] + ... + 0 when n eventually reaches X
E(X) = 1 + sum(i=1 up to X-1 (inclusive),
prod(j=0 up to i-1 (inclusive),
(X-1-j)/(X+10-j)
)
)
So if that's correct, then we have
Let Ea(X) = Expected draw given you saw an Action card
Eb(X) = Expected draw given you discarded a non-Action card
Ea(X) = 2 + sum(i=1 up to X-2 (inclusive),
prod(j=0 up to i-1 (inclusive),
(X-1-j)/(X+10-j)
)
)
Eb(X) = 1 + sum(i=1 up to X-1 (inclusive),
prod(j=0 up to i-1 (inclusive),
(X-1-j)/(X+9-j)
)
)
So if we take from above
Let Pa(X) = probability that the top card was an action
Pb(X) = probability that the top card was not an action
Pa(X) = (X-1)/(X+10)
Pb(X) = 11/(X+10)
Then we get
E(X) = Ea(X)*Pa(X) + Eb(X)*Pb(X)
I think this is correct, yeah? I'll plug this into Excel when I get a chance and try to make some pretty pictures.
EDIT 2Using
this handy website I'm able to run simple Python code from all kinds of computers; I've written a little bit of Python to compute these formulas. Here's the code, for those interested.
#!/usr/local/bin/python2.7
def Ea(X, NA):
sum = 2.0
for i in range(1, X-1):
prod = 1.0
for j in range(i):
prod *= (float(X)-2.0-float(j))/(float(X)+NA-2.0-float(j))
sum += prod
return sum
def Eb(X, NA):
sum = 1.0
for i in range(1, X):
prod = 1.0
for j in range(i):
prod *= (float(X)-1.0-float(j))/(float(X)+NA-2.0-float(j))
sum += prod
return sum
def Pa(X, NA):
return (float(X)-1.0)/(float(X)+float(NA)-1.0)
def Pb(X, NA):
return (float(NA))/(float(X)+float(NA)-1.0)
def EaSimple(X, NA):
return 2.0 + (float(X)-2.0)/(float(NA))
def EbSimple(X, NA):
return 1.0 + (float(X)-1.0)/(float(NA-1))
def Esilly(X, NA):
return 1.0 + (float(X))/(float(NA))
for X in range(2, 31):
#for NA in range(6, 21):
for NA in range(11, 12):
EofX = Ea(X, NA)*Pa(X, NA) + Eb(X, NA)*Pb(X, NA)
EsimpleofX = EaSimple(X, NA)*Pa(X, NA) + EbSimple(X, NA)*Pb(X, NA)
print "%2d" % X,
print "%2d" % NA,
print "%2.4f" % Esilly(X, NA),
print "%2.4f" % EsimpleofX,
print "%2.4f" % EofX
I imported the printed results into Excel and messed around with them until it seemed like it was as visually appealing as I could easily get it. The following are the results from this:
The interesting result here is the difference between the blue and green lines.
So my back-of-the-envelope calculation of E(X) = 1 + (X/11) gives a pessimistic viewpoint of the draw you can expect; the actual expected draw is usually about a half a card more than this calculation gives, or you can get away with having 3-4 less Action cards in your deck than this calculation would imply in order to get the expected draw you're after.
This next picture attempts to show the effect of a different number of non-action cards in your deck on expected draw.
I really don't think any less than 11 non-actions is all *that* relevant to actual Dominion, since if you're trashing your cards and drawing with Scrying Pool the name of the game is minimizing that number and you actually have some power to do so. I wanted to make a 3-D graph with two independent variables but all the Excel options for that look terrible, so I decided to just color-code it. Do with this data what you want, but it seems to me that you probably need to add one extra Action card per non-Action card to your deck in order to make sure your Scrying Pools are expected to draw the same amount. Keep in mind that now you have two extra cards to draw.