Dominion Strategy Forum

Please login or register.

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

Author Topic: Scrying Pool Math  (Read 19689 times)

0 Members and 1 Guest are viewing this topic.

SCSN

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2227
  • Respect: +7140
    • View Profile
Re: Scrying Pool Math
« Reply #25 on: August 05, 2014, 12:41:49 pm »
0

Am I getting too frustrated that people enjoy snark in the middle of a conversation that I'm taking seriously? Probably. Am I wrong when I say people +1ing a hyperbolic statement means they think my discussion isn't useful and I should just blindly do what SCSN says?

I think you just mistook for snark my genuine though economically expressed thoughts on the matter. I understand the perspective that takes offense at my comment, but in the end I said in two words what Stef and Mic explained in multiple paragraphs.

I do think this whole approach is counter-productive mental masturbation, regardless of your efforts to convince yourself of the contrary. The very interesting book Hare Brain, Tortoise Mind: How Intelligence Increases When You Think Less has a chapter called "Premature Articulation: How Thinking Gets in the Way of Learning", which captures neatly what you're doing here. If you're a toddler that still has some trouble walking the solution is not to teach him physics, anatomy and physiology, but just to let him stumble and fall and stand up again. So my advice to you is to buy Scrying Pool whenever you see it except when there's a really strong rush strategy, stop deliberately thinking about whether you made the right call and just let your brain calibrate itself over time. I know this is not what you want to hear, but following it will be infinitely more helpful than writing 20 mathematical papers.


It if was mountebank - fine, but you only go SP on roughly half of all boards

That's just way off. If I had to ballpark it I go for SP ~92% of the time and judging by the times I've regretted it I estimate its optimal purchase frequency to be around 88%. I expect most people to be baffled by this, so here's another one: for Golem I think it's around 70%.
Logged

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
  • Respect: +3235
    • View Profile
Re: Scrying Pool Math
« Reply #26 on: August 05, 2014, 12:52:18 pm »
0

Quote
That's just way off. If I had to ballpark it I go for SP ~92% of the time and judging by the times I've regretted it I estimate its optimal purchase frequency to be around 88%. I expect most people to be baffled by this, so here's another one: for Golem I think it's around 70%.

I just don't think that's true. Like, I don't think you're playing it wrong, but I have a hard time believing that you buy it 92% of your games. are there stats for that? it's possible that I don't buy it enough I guess, but I don't buy it that much less than my average opponent.

Mic Qsenoch

  • 2015 DS Champion
  • *
  • Offline Offline
  • Posts: 1709
  • Respect: +4329
    • View Profile
Re: Scrying Pool Math
« Reply #27 on: August 05, 2014, 01:02:53 pm »
+2

I'm not against this kind of analysis, I have no problem with these posts. I just want to make it clear to anyone reading that it won't help anyone be better at Dominion. It's good practice for calculating probabilities, and fun to think about how deck composition and the various parts of SP affect the probabilities.

I try to convince you you're wrong because I want to see you get better, I'm just a nice guy like that.

Also, I'm not writing replies just for you, I'm writing so that other people also don't follow your approach because I think it sucks. I'm writing so people don't waste their time thinking about these things if they want to get better at the game. You are welcome to say your approach works once you reach the top of the board, until then you are just blowing smoke.

I participate in these forums to learn about tournaments, to read game reports/help threads (the absolute best possible resource for learning Dominion, aside from the game itself), to hear about streams/videos, and to tell people they're wrong when I think they're full of crap. It's fun times.
« Last Edit: August 05, 2014, 01:08:35 pm by Mic Qsenoch »
Logged

AdamH

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2833
  • Shuffle iT Username: Adam Horton
  • You make your own shuffle luck
  • Respect: +3879
    • View Profile
    • My Dominion Videos
Re: Scrying Pool Math
« Reply #28 on: August 05, 2014, 02:03:19 pm »
+1

Thanks for your concern. I never stated I was doing anything but calculating an expected draw for SP given deck composition; as one of many tools used to evaluate a kingdom in certain circumstances. If you want me to make that clear in the OP in big bold letters because you think I'm saying something that I never actually said, fine. I'll get to it.

If you think the way I get better at Dominion sucks, fine. Don't get better at Dominion that way. I'm me, on the other hand, and since I'm not you I'll continue doing what has been working for me for years now. I mean you'd come across like less of a jerk if you said "that's not going to work for everyone" or "that doesn't work for me" instead of "it sucks" -- especially since I'm steadily getting better at Dominion by doing this and it's consistently working. Just because I'm not at the top of the leaderboard doesn't mean everything I say is wrong. Just because it's not exactly what you think (and you're at the top of the leaderboard) doesn't mean everything I say is wrong and it doesn't mean everything you say is right.

Thanks for the rest of the advice you gave me too. There's good stuff in there and I didn't ignore it. It's not good advice by virtue of the fact that you said it and you're at the top of the leaderboard, but rather because I can admit there are weaknesses in my game (like the one this topic is designed to help!) and some of the things you mentioned are among them. I'm working on it.

Now if it's OK with you all, I'm going to finish drawing my conclusions from this math when I get a chance, since nobody has pointed out any huge errors in my calculations. If you still think it's worthless, then go ahead and let this thread die once I'm done with it (it will only be a day or two, I'm sure you can handle it). Please try and be constructive.
Logged
Visit my blog for links to a whole bunch of Dominion content I've made.

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
  • Respect: +3235
    • View Profile
Re: Scrying Pool Math
« Reply #29 on: August 05, 2014, 02:55:00 pm »
0

If he's right and your way of doing things isn't effective for you, telling you so seems pretty productive. whether or not it's reasonable for him to claim such a thing is of course up for debate.

2.71828.....

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1290
  • Shuffle iT Username: irrationalE
  • Respect: +1322
    • View Profile
Re: Scrying Pool Math
« Reply #30 on: August 05, 2014, 03:06:12 pm »
+7

I just assume Adam is doing the math because it is fun, and this is what nerds do for fun.  Right?
Logged
Man. I had four strips of bacon yesterday. Was one automatically undercooked, one automatically overcooked? No, let's put a stop to that right here, all four strips were excellent.

2.71828.....

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1290
  • Shuffle iT Username: irrationalE
  • Respect: +1322
    • View Profile
Re: Scrying Pool Math
« Reply #31 on: August 05, 2014, 03:12:14 pm »
0

but on the "learning to play Dominion better" side of the house, I think this article (which I think it might be better under articles not General discussion?) is a great learning tool for some, while others will be fine without it.  People learn different ways.  I think Adam's Jack article where he really analyzed Jack was extremely beneficial to his play, and I think this will be similarly beneficial.  Now, not everyone learned from that [the jack] article, and not everyone will learn from this one.  Which is fine. However, if analyzing a card to the nth degree is what really helps solidify how to use that card, then this has accomplished its purpose.  And because he is a great guy share it for the rest of us who may learn something from it.
Logged
Man. I had four strips of bacon yesterday. Was one automatically undercooked, one automatically overcooked? No, let's put a stop to that right here, all four strips were excellent.

JW

  • Jester
  • *****
  • Offline Offline
  • Posts: 980
  • Shuffle iT Username: JW
  • Respect: +1793
    • View Profile
Re: Scrying Pool Math
« Reply #32 on: August 05, 2014, 03:24:00 pm »
+2

An interesting result (one that makes me question the correctness of my code, actually) is that Eb(X)*Pb(X) was always equal to one. This result seems like it shouldn't be but I can't think of a good reason why and the numbers I get all pass at least a simple sanity check. Did I do something wrong? Is there some reason why this should be the case?

Here's the output of the program:

Code: [Select]
2 1.1667 1.1750 1.1818
 3 1.4615 1.3371 1.2727
 4 1.6758 1.4890 1.3636
 5 1.8659 1.6327 1.4545
 6 2.0414 1.7699 1.5455
 7 2.2058 1.9016 1.6364
 8 2.3611 2.0288 1.7273
 9 2.5088 2.1522 1.8182
10 2.6500 2.2723 1.9091
11 2.7857 2.3896 2.0000
12 2.9167 2.5045 2.0909
13 3.0435 2.6174 2.1818
14 3.1667 2.7284 2.2727
15 3.2867 2.8378 2.3636
16 3.4038 2.9458 2.4545
17 3.5185 3.0525 2.5455
18 3.6310 3.1581 2.6364
19 3.7414 3.2627 2.7273
20 3.8500 3.3664 2.8182
21 3.9570 3.4692 2.9091
22 4.0625 3.5713 3.0000
23 4.1667 3.6727 3.0909
24 4.2696 3.7735 3.1818
25 4.3714 3.8738 3.2727
26 4.4722 3.9735 3.3636
27 4.5721 4.0727 3.4545
28 4.6711 4.1715 3.5455
29 4.7692 4.2699 3.6364
30 4.8667 4.3680 3.7273
31 4.9634 4.4656 3.8182
32 5.0595 4.5630 3.9091
33 5.1550 4.6600 4.0000
34 5.2500 4.7568 4.0909
35 5.3444 4.8533 4.1818
36 5.4384 4.9496 4.2727
37 5.5319 5.0456 4.3636
38 5.6250 5.1415 4.4545
39 5.7177 5.2371 4.5455
40 5.8100 5.3325 4.6364
41 5.9020 5.4278 4.7273
42 5.9936 5.5229 4.8182
43 6.0849 5.6178 4.9091
44 6.1759 5.7126 5.0000
45 6.2667 5.8073 5.0909
46 6.3571 5.9018 5.1818
47 6.4474 5.9962 5.2727
48 6.5374 6.0904 5.3636
49 6.6271 6.1846 5.4545
50 6.7167 6.2786 5.5455

Next up: pretty pictures and results

I get different results compared to your first column. We agree on the case with 2 actions (including Pool) at 1.1667. However, I get 1.3205 for the 3 actions case compared to your 1.4615 and all my subsequent numbers are lower too. 

3 actions isn't that hard to do by hand. To get 3 cards you need on top either (Action, Action) or (StopCard, Action, Action). Action, action has probability 2/13 * 1/12= 1/78. (Stop, Action, Action) has probability 11/13 * 2/12 * 1/11= 1/78 as well. So 3 cards has probability 1/39= 2.56%.

To get 1 card you need on top (Stop Card, Stop Card). That happens 11/13 * 10/12= 55/78 = 70.51%. The rest of the time we know you get 2 cards, 26.92%. Weight these and they average 1.3205.

I similarly get that the weighted total for the "non-action on top" case is 1 exactly, which suggests that we differ in the "action on top" case.

Quote from: JW
Here's my calculation, which includes the self-spy effect:
6 actions including Scrying Pool, 11 non-actions: 1.7292 average cards drawn
7 actions including Scrying Pool, 11 non-actions: 1.8529 average cards drawn
8 actions including Scrying Pool, 11 non-actions: 1.9722 average cards drawn
9 actions including Scrying Pool, 11 non-actions: 2.0877 average cards drawn
10 actions including Scrying Pool, 11 non-actions: 2.2 average cards drawn
11 actions including Scrying Pool, 11 non-actions: 2.3095 average cards drawn
12 actions including Scrying Pool, 11 non-actions: 2.4167 average cards drawn
13 actions including Scrying Pool, 11 non-actions: 2.5217 average cards drawn
14 actions including Scrying Pool, 11 non-actions: 2.625 average cards drawn
Logged

theright555J

  • Moneylender
  • ****
  • Offline Offline
  • Posts: 171
  • Dragged into engines kicking and screaming!
  • Respect: +171
    • View Profile
Re: Scrying Pool Math
« Reply #33 on: August 05, 2014, 06:03:48 pm »
+5

As I see it, this whole thread really boils down to something like this:

Adam: "I think I undervalue SP, possibly because I underestimate the drawing power in lack of trashing. Let me do some math to assess this...huh, looks like the draw is better than I thought"

Ivory Tower: "SP is just really good, just use it"

Adam: "But the math, as well as my thought process, helps me play better!"

Ivory Tower: "No it doesn't"


I have learned a great deal from Adam and WW's videos as well as from their thought processes. Adam has a lot of guts to put stuff like this out there when he's NOT #1 on the leaderboard. It's really quite discouraging to see top-tier players actually disparaging a thought process!!

As my daughter's viola teacher says, practice doesn't make perfect, practice makes easy. Unfortunately, if one is doing the skill wrong in the first place, then it's the bad habits that become easy! Therefore, any time an expert backhandedly dismisses an idea or concern from someone less experienced and just says "practice more" or "you just got unlucky" or " it will come in time" it brings my piss to a boil.
Logged
Wondering what my name refers to?
http://en.wikipedia.org/wiki/Cribbage_statistics

jsh357

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2577
  • Shuffle iT Username: jsh357
  • Respect: +4340
    • View Profile
    • JSH Gaming: Original games
Re: Scrying Pool Math
« Reply #34 on: August 05, 2014, 06:28:08 pm »
+4


I dunno.  I feel like the more you put next to each other, the worse it looks.  I have no idea what YOU people are debating; to me it's clear you don't want ten of these things.  Maybe if you draw a bunch of cool looking cards like Highway and Salvager it's a legitimate use of time.  The Witch kind of resembles a kid's drawing, but it's kind of cool how her hair rises magically while gazing into the pool.  Still, the less you look at Scrying Pool the better it holds up.

On the other hand, the Potion is quite fashionable, which adds a few style points that help to compensate. 



Wait a minute... ARE THOSE SCROLLS IN THE CABINET BACK THERE?
Logged
Join the Dominion community Discord channel! Chat in text and voice; enter dumb tournaments; spy on top players!

https://discord.gg/2rDpJ4N

JW

  • Jester
  • *****
  • Offline Offline
  • Posts: 980
  • Shuffle iT Username: JW
  • Respect: +1793
    • View Profile
Re: Scrying Pool Math
« Reply #35 on: August 05, 2014, 06:54:50 pm »
+1

For the Eb(X)*Pb(X) = 1 thing, I have a semi-explanation.

Suppose that your deck is infinite in size, so the odds of revealing a non action card is always the same.
...
There might be some trickiness with a deck that actually changes in action proportion, but I think there's a theorem where sifting doesn't affect probability of drawing key cards that I'll cite here. I don't know if it applies, and actually forgot how that theorem goes, but there you go, a semi-explanation.

There's a proof by induction here . 

Call F(X,C) the number of cards you draw on average with Scrying Pool in a deck that started with X actions (including Scrying Pool) and C stop-cards, given that you’ve put one stop card on the bottom of the deck (and the Pool was in your hand). Note that the chance that the top card is a non-action is C/(X+C-1).

If the current top card is an action you’re done, drawing only one card. While if the current top card is an action, you average 1 card + the amount you’d get when the problem repeats as if your deck started with X-1 actions instead of X actions.

So, F(X,C) satisfies the recursive relationship: F(X,C)= (C-1)/(X+C-2) + [1+ F(X-1,C)]*(X-1)/(X+C-2) =  1 + (X-1)* F(X-1,C) / (X+C-2)

Conjecture that F(X,C) = (X+C-1)/C.

Trivially, F(1,C) = 1, because if Scrying Pool is your only action it draws one card. So the formula works in that case.

Assume that F(k,C)= (k+C-1)/C. Then using the recursive relationship, it’s just a bit of algebra to show that F(k+1,C) = (k+C)/C.

Since this formula for F(X,C) works for X=1, and it works for X=k+1 if it works for X=k, it’s true for any positive integer X (for any C).
« Last Edit: August 05, 2014, 08:58:20 pm by JW »
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4074
  • Respect: +2624
    • View Profile
Re: Scrying Pool Math
« Reply #36 on: August 05, 2014, 07:01:18 pm »
0

Mathemetician - how many scrying pools do we need?
Engineer - keep adding scrying pools until they draw the deck.

Scrying pools generally follow the advice for basic engine building but often amplify the effects. There's not much point giving basic advice though. Scrying pools support extreme decks but they're impossible to categorize. There aren't really any rules of thumb for scrying pools since the kingdoms do really make a difference. The maths is really hard and isn't actually going to be a better asset than practicing engine building.
Logged

SCSN

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2227
  • Respect: +7140
    • View Profile
Re: Scrying Pool Math
« Reply #37 on: August 05, 2014, 07:54:12 pm »
0

Quote
That's just way off. If I had to ballpark it I go for SP ~92% of the time and judging by the times I've regretted it I estimate its optimal purchase frequency to be around 88%. I expect most people to be baffled by this, so here's another one: for Golem I think it's around 70%.

I just don't think that's true. Like, I don't think you're playing it wrong, but I have a hard time believing that you buy it 92% of your games. are there stats for that? it's possible that I don't buy it enough I guess, but I don't buy it that much less than my average opponent.

I asked AI if he can get these numbers easily and will let you know what he responds, but I went ahead and looked at my last 20 pro games with SP on board: I bought it in 19 of them.

I'm not at all surprised that you and your average opponent underbuy it a lot because almost everyone does, including players as good as AI himself and WW (based on my experience playing him I'm pretty sure he goes for it <50% of the time).

As my daughter's viola teacher says, practice doesn't make perfect, practice makes easy. Unfortunately, if one is doing the skill wrong in the first place, then it's the bad habits that become easy! Therefore, any time an expert backhandedly dismisses an idea or concern from someone less experienced and just says "practice more" or "you just got unlucky" or " it will come in time" it brings my piss to a boil.

You're confusing practice and repetition. Of course when you repeat the same damn thing over and over again you can't expect any different results, that would be insane. Practice, on the other hand, consists of varying what you're doing and sticking with what works. In the words of Niels Bohr: "An expert is a person who has found out by his own painful experience all the mistakes that one can make in a very narrow field."

That's why my advice to AdamH is not to simply play a shitload of Scrying Pool games, but to specifically go for them on every single board and to make them work no matter what, without allowing him to talk himself out of it. That way his brain will learn through sheer experience the very rare circumstances under which it should be skipped.

And it's quite ironic that you accuse the most vocal proponent of "when your feet are stuck in the mud, it's time to get your hands dirty" of occupying an ivory tower. Instead of trying to convince people of what I think, I'm always encouraging them to go out and see for themselves.
« Last Edit: August 05, 2014, 07:59:46 pm by SheCantSayNo »
Logged

JW

  • Jester
  • *****
  • Offline Offline
  • Posts: 980
  • Shuffle iT Username: JW
  • Respect: +1793
    • View Profile
Re: Scrying Pool Math
« Reply #38 on: August 05, 2014, 08:18:48 pm »
0

For the Eb(X)*Pb(X) = 1 thing, I have a semi-explanation.


There's a proof by induction here. 

There's a similar proof by induction of the result for the case where your top card is an action (or you can skip it based on the results of the other case, as Titandrake points out below).

With those two results, you can calculate the average cards drawn by Scrying Pool in a deck of X actions (including Pool) and C non-actions, assuming that you discard non-actions with the self-spy effect. Call this S(X,C).

S(X,C)=  (X^2 + 3*X*C + C^2 - 2*C -1)/ [ (X+C-1) * (C+1)]

That formula gets you, among others, the results I've posted earlier. Useful sanity checks: With X=1, this equals 1 (Pool is your only action). With X=3 and Y=1, this equals 2.667, for which I showed the direct derivation above. 

Note that this formula has assumed that Scrying Pool is the only card in your hand, and that you can potentially draw all of your other cards. That will slightly overstate the number of cards you draw on average in decks with fewer than 5 stop cards, but of course Scrying Pool is great in those circumstances so a formula telling you the exact number is not necessary.

« Last Edit: August 05, 2014, 09:03:11 pm by JW »
Logged

CG19

  • Baron
  • ****
  • Offline Offline
  • Posts: 55
  • Respect: +22
    • View Profile
Re: Scrying Pool Math
« Reply #39 on: August 05, 2014, 08:30:33 pm »
0

I'm going to weight this thread more towards the math side here. TL;DR: More math.

Without using code, you can get the E(X) (aka average draw) with some easy math. Following a very similar problem on this site:
http://math.stackexchange.com/questions/75968/expectation-of-number-of-trials-before-success-in-an-urn-problem-without-replace

We can simplify the summation down to 1+a/(p+1) where a = actions in deck and p = non-actions in deck (this is without the spy effect). Now, we can add the spying-effect by saying that p/t times (where t = a+p is the total cards in deck), the spy-effect finds a non-action card and a/t times it doesn't. So we get to p/t*(1+a/p) + a/t*(1+a/(p+1)). Using the same set of cards as before:

6 actions not including Scrying Pool, 11 non-actions: 1.53 average cards drawn (1.50 without spy effect)
7 actions not including Scrying Pool, 11 non-actions: 1.62 average cards drawn (1.58 without spy effect)
8 actions not including Scrying Pool, 11 non-actions: 1.70 average cards drawn (1.67 without spy effect)
9 actions not including Scrying Pool, 11 non-actions: 1.79 average cards drawn (1.75 without spy effect)
10 actions not including Scrying Pool, 11 non-actions: 1.87 average cards drawn (1.83 without spy effect)
11 actions not including Scrying Pool, 11 non-actions: 1.96 average cards drawn (1.92 without spy effect)
12 actions not including Scrying Pool, 11 non-actions: 2.04 average cards drawn (2.00 without spy effect)
13 actions not including Scrying Pool, 11 non-actions: 2.13 average cards drawn (2.08 without spy effect)
14 actions not including Scrying Pool, 11 non-actions: 2.21 average cards drawn (2.17 without spy effect)

What I don't take into account is current discard and deck size. If you only have 1 card in your deck that is a non-action and you discard it, the spy-effect does not help because it shuffles the non-action right back in. The equation gets more complicated with every caveat, but I think the first equation without the spy effect is simply enough to use when you need it :)
Logged

shark_bait

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1103
  • Shuffle iT Username: shark_bait
  • Luckyfin and Land of Hinter for iso aliases
  • Respect: +1868
    • View Profile
Re: Scrying Pool Math
« Reply #40 on: August 05, 2014, 08:34:18 pm »
+9

here's another one: for Golem I think it's around 70%.

Can we all just take a moment of silence for Council Room.
Logged
Hello.  Name's Bruce.  It's all right.  I understand.  Why trust a shark, right?

Is quite curious - Who is the mystical "Celestial Chameleon"?

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2210
  • Respect: +2856
    • View Profile
Re: Scrying Pool Math
« Reply #41 on: August 05, 2014, 08:47:29 pm »
+1

For the Eb(X)*Pb(X) = 1 thing, I have a semi-explanation.

Suppose that your deck is infinite in size, so the odds of revealing a non action card is always the same.
...
There might be some trickiness with a deck that actually changes in action proportion, but I think there's a theorem where sifting doesn't affect probability of drawing key cards that I'll cite here. I don't know if it applies, and actually forgot how that theorem goes, but there you go, a semi-explanation.

There's a proof by induction here. 

Call F(X,C) the number of cards you draw on average with Scrying Pool in a deck that started with X actions (including Scrying Pool) and C stop-cards, given that you’ve put one stop card on the bottom of the deck (and the Pool was in your hand). Note that the chance that the top card is a non-action is C/(X+C-1).

If the current top card is an action you’re done, drawing only one card. While if the current top card is an action, you average 1 card + the amount you’d get when the problem repeats as if your deck started with X-1 actions instead of X actions.

So, F(X,C) satisfies the recursive relationship: F(X,C)= (C-1)/(X+C-2) + [1+ F(X-1,C)]*(X-1)/(X+C-2) =  1 + (X-1)* F(X-1,C) / (X+C-2)

Conjecture that F(X,C) = (X+C-1)/C.

Trivially, F(1,C) = 1, because if Scrying Pool is your only action it draws one card. So the formula works in that case.

Assume that F(k,C)= (k+C-1)/C. Then using the recursive relationship, it’s just a bit of algebra to show that F(k+1,C) = (k+C)/C.

Since this formula for F(X,C) works for X=1, and it works for X=k+1 if it works for X=k, it’s true for any positive integer X (for any C).

Technically, I think this only holds when C >= 2. Your recursive definition for F(X, C) relies on assuming the non-action card you discarded will not be revealed again by this pool, and you need at least 2 stop cards total in your deck to guarantee this. But yes, that works.

Edit: For the case where you keep an action on top, I don't think the induction is that complicated, since I think you can skip induction entirely. If you label that case A(X,C), you can cheat it by saying

A(X,C) = 1 + F(X-1,C+1).

You are guaranteed to draw 1 card. Then, you have a deck of X-1 actions including Pool, and C stop cards, but you don't know that the last card of your deck is a stop card. So, add a virtual stop card to the bottom of your deck (which is why you get the C+1.)

I think this gives you the same result, but your S(X,C) aggregates both results and I don't have time to combine the two right now.
« Last Edit: August 05, 2014, 08:53:44 pm by Titandrake »
Logged
I have a blog! It's called Sorta Insightful. Check it out?

JW

  • Jester
  • *****
  • Offline Offline
  • Posts: 980
  • Shuffle iT Username: JW
  • Respect: +1793
    • View Profile
Re: Scrying Pool Math
« Reply #42 on: August 05, 2014, 08:49:23 pm »
0

I'm going to weight this thread more towards the math side here. TL;DR: More math.

Without using code, you can get the E(X) (aka average draw) with some easy math. Following a very similar problem on this site:
http://math.stackexchange.com/questions/75968/expectation-of-number-of-trials-before-success-in-an-urn-problem-without-replace

We can simplify the summation down to 1+a/(p+1) where a = actions in deck and p = non-actions in deck (this is without the spy effect). Now, we can add the spying-effect by saying that p/t times (where t = a+p is the total cards in deck), the spy-effect finds a non-action card and a/t times it doesn't. So we get to p/t*(1+a/p) + a/t*(1+a/(p+1)). Using the same set of cards as before:

6 actions not including Scrying Pool, 11 non-actions: 1.53 average cards drawn (1.50 without spy effect)

The bolded part a/t*(1+a/(p+1)) isn't correct because you have an action on top of your deck, which the formula isn't taking into account. See my post directly above yours.
« Last Edit: August 05, 2014, 08:51:41 pm by JW »
Logged

JW

  • Jester
  • *****
  • Offline Offline
  • Posts: 980
  • Shuffle iT Username: JW
  • Respect: +1793
    • View Profile
Re: Scrying Pool Math
« Reply #43 on: August 05, 2014, 09:02:28 pm »
0

There's a proof by induction here. 

Call F(X,C) the number of cards you draw on average with Scrying Pool in a deck that started with X actions (including Scrying Pool) and C stop-cards, given that you’ve put one stop card on the bottom of the deck (and the Pool was in your hand). Note that the chance that the top card is a non-action is C/(X+C-1).

If the current top card is an action you’re done, drawing only one card. While if the current top card is an action, you average 1 card + the amount you’d get when the problem repeats as if your deck started with X-1 actions instead of X actions.

So, F(X,C) satisfies the recursive relationship: F(X,C)= (C-1)/(X+C-2) + [1+ F(X-1,C)]*(X-1)/(X+C-2) =  1 + (X-1)* F(X-1,C) / (X+C-2)

Conjecture that F(X,C) = (X+C-1)/C.

Trivially, F(1,C) = 1, because if Scrying Pool is your only action it draws one card. So the formula works in that case.

Assume that F(k,C)= (k+C-1)/C. Then using the recursive relationship, it’s just a bit of algebra to show that F(k+1,C) = (k+C)/C.

Since this formula for F(X,C) works for X=1, and it works for X=k+1 if it works for X=k, it’s true for any positive integer X (for any C).

Technically, I think this only holds when C >= 2. Your recursive definition for F(X, C) relies on assuming the non-action card you discarded will not be revealed again by this pool, and you need at least 2 stop cards total in your deck to guarantee this. But yes, that works.

I think it still works for C=1. C=1 is a trivial case, since you put the one non-action on the bottom and draw your entire deck, F(X,1)= X. And indeed the formula works there, and this result holds since the chance the top card is a non-action is 1/X (the Scrying Pool is in your hand).
Logged

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2210
  • Respect: +2856
    • View Profile
Re: Scrying Pool Math
« Reply #44 on: August 05, 2014, 09:21:57 pm »
0

There's a proof by induction here. 

Call F(X,C) the number of cards you draw on average with Scrying Pool in a deck that started with X actions (including Scrying Pool) and C stop-cards, given that you’ve put one stop card on the bottom of the deck (and the Pool was in your hand). Note that the chance that the top card is a non-action is C/(X+C-1).

If the current top card is an action you’re done, drawing only one card. While if the current top card is an action, you average 1 card + the amount you’d get when the problem repeats as if your deck started with X-1 actions instead of X actions.

So, F(X,C) satisfies the recursive relationship: F(X,C)= (C-1)/(X+C-2) + [1+ F(X-1,C)]*(X-1)/(X+C-2) =  1 + (X-1)* F(X-1,C) / (X+C-2)

Conjecture that F(X,C) = (X+C-1)/C.

Trivially, F(1,C) = 1, because if Scrying Pool is your only action it draws one card. So the formula works in that case.

Assume that F(k,C)= (k+C-1)/C. Then using the recursive relationship, it’s just a bit of algebra to show that F(k+1,C) = (k+C)/C.

Since this formula for F(X,C) works for X=1, and it works for X=k+1 if it works for X=k, it’s true for any positive integer X (for any C).

Technically, I think this only holds when C >= 2. Your recursive definition for F(X, C) relies on assuming the non-action card you discarded will not be revealed again by this pool, and you need at least 2 stop cards total in your deck to guarantee this. But yes, that works.

I think it still works for C=1. C=1 is a trivial case, since you put the one non-action on the bottom and draw your entire deck, F(X,1)= X. And indeed the formula works there, and this result holds since the chance the top card is a non-action is 1/X (the Scrying Pool is in your hand).

Oh, right I was thinking that F(X,1) should be X+1, but you already have one card in hand.
Logged
I have a blog! It's called Sorta Insightful. Check it out?

CG19

  • Baron
  • ****
  • Offline Offline
  • Posts: 55
  • Respect: +22
    • View Profile
Re: Scrying Pool Math
« Reply #45 on: August 05, 2014, 11:00:28 pm »
+1

I'm going to weight this thread more towards the math side here. TL;DR: More math.

Without using code, you can get the E(X) (aka average draw) with some easy math. Following a very similar problem on this site:
http://math.stackexchange.com/questions/75968/expectation-of-number-of-trials-before-success-in-an-urn-problem-without-replace

We can simplify the summation down to 1+a/(p+1) where a = actions in deck and p = non-actions in deck (this is without the spy effect). Now, we can add the spying-effect by saying that p/t times (where t = a+p is the total cards in deck), the spy-effect finds a non-action card and a/t times it doesn't. So we get to p/t*(1+a/p) + a/t*(1+a/(p+1)). Using the same set of cards as before:

6 actions not including Scrying Pool, 11 non-actions: 1.53 average cards drawn (1.50 without spy effect)

The bolded part a/t*(1+a/(p+1)) isn't correct because you have an action on top of your deck, which the formula isn't taking into account. See my post directly above yours.

Correct! So I guess it should be a/t*(2+a/(p+1)). I'll recheck the expected values, but it should bump up the spy-effect pretty well. I thought the difference looked rather low.
Logged

AdamH

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2833
  • Shuffle iT Username: Adam Horton
  • You make your own shuffle luck
  • Respect: +3879
    • View Profile
    • My Dominion Videos
Re: Scrying Pool Math
« Reply #46 on: August 05, 2014, 11:04:21 pm »
0

JW and I exchanged a couple of PMs and we got my code to be what looks to be correct. It's certainly not calculated the same way you all are doing it now, so I'll be interested to see if you end up with the same numbers. I'm going to edit my previous posts to take out wrong things and put in right things with pretty pictures and add in a lovely disclaimer and maybe some conclusions.
Logged
Visit my blog for links to a whole bunch of Dominion content I've made.

silverspawn

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5326
  • Shuffle iT Username: sty.silver
  • Respect: +3235
    • View Profile
Re: Scrying Pool Math
« Reply #47 on: August 06, 2014, 02:59:28 am »
0

Quote
I'm not at all surprised that you and your average opponent underbuy it a lot because almost everyone does, including players as good as AI himself and WW (based on my experience playing him I'm pretty sure he goes for it <50% of the time)

oh, well that's good to know.

markusin

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3846
  • Shuffle iT Username: markusin
  • I also switched from Starcraft
  • Respect: +2437
    • View Profile
Re: Scrying Pool Math
« Reply #48 on: August 06, 2014, 07:39:53 am »
0


It if was mountebank - fine, but you only go SP on roughly half of all boards

That's just way off. If I had to ballpark it I go for SP ~92% of the time and judging by the times I've regretted it I estimate its optimal purchase frequency to be around 88%. I expect most people to be baffled by this, so here's another one: for Golem I think it's around 70%.
I think 88% might be a good estimate in the end. Scrying Pool is just so good so often. I used to lose to it all the time, but then I started using it myself and started winning a lot when my opponent would ignore it. When I do win by ignoring it, say to go for a rush or something, the game still ends up being pretty close.

Golem? Meh, I feel it breaks even a lot of the time, as in your decks performs about as well as it would have without the Golem. Whatever, we have another thread for Golem (also started by Adam).
« Last Edit: August 06, 2014, 07:41:35 am by markusin »
Logged

Witherweaver

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6476
  • Shuffle iT Username: Witherweaver
  • Respect: +7868
    • View Profile
Re: Scrying Pool Math
« Reply #49 on: August 06, 2014, 09:21:17 am »
0

Scrying Pool Math:

Scrying Pool = <3

QED.
Logged
Pages: 1 [2] 3  All
 

Page created in 0.381 seconds with 21 queries.