Dominion Strategy Forum

Please login or register.

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

Author Topic: A theorem about drawing and density  (Read 32066 times)

0 Members and 1 Guest are viewing this topic.

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
A theorem about drawing and density
« on: March 05, 2012, 05:02:16 am »
+7

(Inspired by the discussion in the Venture thread.)

Summary: Certain cards (such as Venture) perform a complex drawing procedure but do not return cards to your draw deck. This post shows that these cards do not change the expected density of any card (or type of card) in your draw deck unless you knew something about your deck order to begin with or you trigger a reshuffle.

Disclaimer: This is going to involve some math. This might be overkill. If you think so, I can only apologize for not being sufficiently convinced by intuition. If you're overly skeptical like me, read on!

Assumptions:
  • Everything within applies only when you do not trigger a reshuffle. Reshuffles make things more complicated. For technical reasons, I'll actually require that the drawing leaves at least 1 card remaining in your draw deck, but that's just because it doesn't make sense to talk about the density of an empty draw deck.
  • I assume that the drawing samples uniformly randomly from your draw deck. This is often equivalent to the shuffling that occurs in a real game, but it doesn't apply if you know what the top cards of your deck are, either because you sifted them or your opponent put something there. So if cards like Cartographer, Rabble, etc. are in play, then nothing in this post applies directly. If the drawing procedure reaches beyond the cards you know about (e.g. you're playing Farming Village after your opponent played Rabble, in which case you are guaranteed to discard all the cards Rabble put there and then you're in unknown territory), then the results may still be relevant.
  • I assume the card decides whether to continue drawing based only on the cards it has already drawn and does not put cards back on the deck. This is true for many cards, such as: Venture, Scrying Pool, Farming Village, Smithy, Swindler, etc. It is not true for a card like Courtyard.

Caveat: Density is a pretty crude measure of deck quality, and expected density even cruder. A more important number is the probability of getting $8 in hand, for instance. This is also much more difficult to get a handle on mathematically.

Math

Let D be the set of all cards in the draw deck. We require D to be non-empty.

A draw state (A,B) consists of a set A and a non-empty set B that partition D. Let S be the set of all draw states. i.e. S = {(A,B) : A U B = D, A /\ B = empty, B =/= empty}. (Note: I'll use /\ for set intersection.) We'll interpret A to mean the set of already-drawn cards and B to mean the set of remaining cards.

A draw policy is a function f : S -> {0,1}. The output 1 indicates to draw another card and 0 indicates to stop drawing. For example, for Venture,
  f(A,B) = 1 if A contains no treasure, 0 if A contains a treasure.

For a subset T of D, the remaining density function of T is
  d_T : S -> [0,1]
defined by
  d_T(A,B) = |B /\ T| / |B|.
For example, for Venture, you might be interested in letting T be the set of all treasure cards in your draw deck, and then d_T would indicate the proportion of cards in your draw deck that are treasures.

Theorem. Let f be a draw policy and let T be a subset of D. Suppose there is an integer N >= 1 such that
  f(A,B) = 0 whenever |B| <= N.
(In other words, we always stop drawing before emptying the draw deck.) Let (A_end, B_end) be the final draw state after drawing uniformly from D according to policy f. Then
  E[d_T(A_end, B_end)] = d_T(empty, D).
(In other words, the expected density isn't changed by drawing.)

Proof.

For all draw states (A,B), we prove
  E[d_T(A_end, B_end) | current state is (A,B)] = d_T(A,B)
by induction on b = |B|.

If r <= N, then f(A,B) = 0, so A_end = A and B_end = B, and the claim is trivial.
For r > N, if f(A,B) = 0, the claim is again trivial, so assume f(A,B) = 1.

Let c in B denote the drawn card. Then, using induction,
Code: [Select]
  E[d_T(A_end, B_end) | (A,B)]
    = sum_{c in B} E[d_T(A_end, B_end) | (A U {c}, B \ {c})] P[drawing c]
    = sum_{c in B} d_T(A U {c}, B \ {c}) / |B|
    = sum_{c in (B /\ T)} d_T(A U {c}, B \ {c}) / |B| + sum_{c in (B \ T)} d_T(A U {c}, B \ {c}) / |B|
    = [(|B /\ T| - 1) / (|B| - 1)] * [|B /\ T| / |B|]   +   [|B /\ T| / (|B| - 1)] * [(|B| - |B /\ T|) / |B|]
    = [|B /\ T| / (|B| - 1)] * [(|B /\ T| - 1) / |B|]   +   [|B /\ T| / (|B| - 1)] * [(|B| - |B /\ T|) / |B|]
    = [|B /\ T| / (|B| - 1)] * [(|B| - 1) / |B|]
    = |B /\ T| / |B|
    = d_T(A,B),
as we wanted. []
« Last Edit: March 05, 2012, 04:53:56 pm by blueblimp »
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: A theorem about drawing and density
« Reply #1 on: March 05, 2012, 04:29:41 pm »
+2

In the other thread, DG asked about an example with 3 estates and 2 coppers. This is a nice simple example that we can work out by hand, to increase confidence that the proof was correct. I'll write the order of the draw deck, then what's left remaining after the venture, then the treasure density of what's left.

EEECC -> C -> 1
EECEC -> EC -> 1/2
ECEEC -> EEC -> 1/3
CEEEC -> EEEC -> 1/4
EECCE -> CE -> 1/2
ECECE -> ECE -> 1/3
CEECE -> EECE -> 1/4
ECCEE -> CEE -> 1/3
CECEE -> ECEE -> 1/4
CCEEE -> CEEE -> 1/4

The average is
  (1 + 1/2 + 1/3 + 1/4 + 1/2 + 1/3 + 1/4 + 1/3 + 1/4 + 1/4)/10
  = (1 + 2 * 1/2 + 3 * 1/3 + 4 * 1/4)/10
  = (1 + 1 + 1 + 1)/10
  = 4/10
  = 2/5,
exactly what we started with.
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: A theorem about drawing and density
« Reply #2 on: March 05, 2012, 05:26:50 pm »
+4

Here's an intuitive viewpoint that might be helpful. Imagine drawing a single card from your deck and discarding/playing it. Intuitively, this (on average) does not change any densities of your draw deck, right? So definitely if you do this several times, it still won't change average densities. What I showed in the original post is just that, even if how many cards you eventually draw depends on the cards you draw, it still won't change average densities.
Logged

Kirian

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 7096
  • Shuffle iT Username: Kirian
  • An Unbalanced Equation
  • Respect: +9413
    • View Profile
Re: A theorem about drawing and density
« Reply #3 on: March 05, 2012, 11:24:19 pm »
0

Logged
Kirian's Law of f.DS jokes:  Any sufficiently unexplained joke is indistinguishable from serious conversation.

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4074
  • Respect: +2624
    • View Profile
Re: A theorem about drawing and density
« Reply #4 on: March 06, 2012, 08:05:09 am »
0

I think the term density is unhelpful now. The mean card value is not changed. The distribution has changed. In the 3 estate, 2 copper example the remaining draw deck always has 1 copper remaining, a mean of 2 estates remaining, a most common number of estates remaining of 4, and a mean remaining card value of 2/5. Depending upon the specific value you are looking for (such as a mode or mean or maximum) the new distribution may result in the same value as the old distribution or not.

It's probably worth confirming for your layout of the coppers and estates that the 10 permutations each have 12 orderings which together provide the 120 possible orderings of the five cards.
« Last Edit: March 06, 2012, 08:39:05 am by DG »
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4074
  • Respect: +2624
    • View Profile
Re: A theorem about drawing and density
« Reply #5 on: March 06, 2012, 08:49:20 am »
0

Quote
Here's an intuitive viewpoint that might be helpful. Imagine drawing a single card from your deck and discarding/playing it. Intuitively, this (on average) does not change any densities of your draw deck, right? So definitely if you do this several times, it still won't change average densities. What I showed in the original post is just that, even if how many cards you eventually draw depends on the cards you draw, it still won't change average densities.

This applies in certain situations for Dominion maths but it does not apply in others. It specifically does not apply when you make a drawing decision since then the current drawing event and any future drawing event are no longer independent. A cellar or market will not change the distribution of the draw deck but a venture or scrying pool will.
« Last Edit: March 06, 2012, 09:02:11 am by DG »
Logged

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: A theorem about drawing and density
« Reply #6 on: March 06, 2012, 10:13:49 am »
0

I think having fewer than 5 cards in the draw pile is confusing things.  Let's assume you have 10 cards in the draw pile: 3 Estates, 7 Coppers.

Before playing Venture, the average value of a card is $1 * 7 / 10 = $0.7

Venture will draw 0-3 Estates followed by 1 Copper.  The number of shuffles placing a given number of Estates on top of the deck is: (number of ways to pick the number of estates from a set of 3) * (number of ways to pick a single Copper from a set of 7) * (the number of ways to shuffle the remaining cards)

For the 4 possible Venture draws, we need to calculate the number of shuffles that produce the given draw:

  • C -  1 * 7 * 9!
  • EC - 3 * 7 * 8!
  • EEC - 6 * 7 * 7!
  • EEEC - 6 * 7 * 6!

Sanity check:  There are 10! different ways to shuffle a deck of 10 cards.
1 * 7 * 9! + 3 * 7 * 8! + 6 * 7 * 7! + 6 * 7 * 6! = 3628800 = 10!

So, we've accounted for all the different shuffles producing any given venture draw.

Drawing C leaves an average coin value of $(6/9) in the draw pile.  EC leaves $(6/8).  EEC leaves $(6/7).  EEEC leaves $(6/6).

Multiply those values by the number of shuffles they appear in to get the sum of all possible coin values:

(6/9) * 1 * 7 * 9! + (6/8) * 3 * 7 * 8! + (6/7) * 6 * 7 * 7! + (6/6) * 6 * 7 * 6! = 2540160

Divide by the total number of shuffles to get the average coin value:
2540160 / 10! = $0.7

Whoa, exactly where we started.  Venture didn't change the average coin value in our draw pile at all.

There are at least 6 cards remaining in the draw pile and you'll only draw 5 next turn.  We can go through and calculate it, but I'm confident that the expected value of the next hand hasn't changed by any metric.
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: A theorem about drawing and density
« Reply #7 on: March 06, 2012, 06:23:20 pm »
0

I think the term density is unhelpful now. The mean card value is not changed. The distribution has changed. In the 3 estate, 2 copper example the remaining draw deck always has 1 copper remaining, a mean of 2 estates remaining, a most common number of estates remaining of 4, and a mean remaining card value of 2/5. Depending upon the specific value you are looking for (such as a mode or mean or maximum) the new distribution may result in the same value as the old distribution or not.

It's probably worth confirming for your layout of the coppers and estates that the 10 permutations each have 12 orderings which together provide the 120 possible orderings of the five cards.

I agree with your observation that there are other values that can be more important than expected density. They are also harder to analyze. If someone can provide an analysis of some other value that suggests Venture is/isn't a next-turn sifter in general, then I'd be interested. It's beyond my abilities though.

Quote
Here's an intuitive viewpoint that might be helpful. Imagine drawing a single card from your deck and discarding/playing it. Intuitively, this (on average) does not change any densities of your draw deck, right? So definitely if you do this several times, it still won't change average densities. What I showed in the original post is just that, even if how many cards you eventually draw depends on the cards you draw, it still won't change average densities.

This applies in certain situations for Dominion maths but it does not apply in others. It specifically does not apply when you make a drawing decision since then the current drawing event and any future drawing event are no longer independent. A cellar or market will not change the distribution of the draw deck but a venture or scrying pool will.

This I don't agree with. First, independence is irrelevant for expected density because of linearity of expectation. If you're interested in something other than expectation, yes you'll need to worry about independence, so the analysis will be a lot harder. That's why I chose to calculate the expectation.

Second, a card like cellar/market DOES change the densities of the draw deck (but not expected densities). Consider a really simple example of 1 copper 1 estate in the draw deck. If you play a market, then you're either going to be left with a single copper or a single estate in the draw deck. Either way, the densities are different than you started with.

Is there fundamentally something different between market's effect on draw deck densities and venture's effect on draw deck densities? I don't know. All I've done is found one way in which they aren't different.

Oh, and, I'm not really sure what you mean by "distribution of the draw deck". I'm assuming you mean something like the distribution (over all possible cards you might draw) of the resulting densities in the draw deck.
« Last Edit: March 06, 2012, 06:26:55 pm by blueblimp »
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4074
  • Respect: +2624
    • View Profile
Re: A theorem about drawing and density
« Reply #8 on: March 06, 2012, 10:56:53 pm »
0

Quote
Consider a really simple example of 1 copper 1 estate in the draw deck. If you play a market, then you're either going to be left with a single copper or a single estate in the draw deck. Either way, the densities are different than you started with.

The distribution of the second card hasn't changed. The card that was second in your deck had a 50% chance of being a copper and that's still the case after you've drawn the first one. Only when you use the information from the first card does the distribution of the second card change. In the case of a venture however you always have the information that you will draw a number of non-treasure cards and one treasure card, providing there is a treasure card in your deck.

Quote
Is there fundamentally something different between market's effect on draw deck densities and venture's effect on draw deck densities?

You're still talking about density, but what is it? You seem to be calculating it as the mean (across all possible orderings of the deck) of the mean card value. I certainly think you're finding some interesting stuff out but unless you're more specific it is hard to evaluate.
Logged

Razzishi

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 216
  • Shuffle iT Username: Eye Urn
  • Respect: +121
    • View Profile
Re: A theorem about drawing and density
« Reply #9 on: March 06, 2012, 11:24:28 pm »
+1

The assumption a random deck directly implies that the expected value of the density function is constant with respect to place in deck.  There's no need to say anything more. 
Logged
Stop reading my signature.

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: A theorem about drawing and density
« Reply #10 on: March 07, 2012, 12:41:28 am »
0

The assumption a random deck directly implies that the expected value of the density function is constant with respect to place in deck.  There's no need to say anything more.

Would you mind expanding on this? This was my intuition, but I wasn't able to formalize it in the case where the number of drawn cards varies depending on what's drawn (which is the case for Venture). To illustrate the difficulty, observe that the conditional expectation E[d_T(A_end, B_end) | |B_end| = r] is not constant in r! For example, if r=|D|-1, that means Venture drew exactly 1 card, so it was a treasure, which means the density decreased.

So... yeah. Basically I think it is necessary to say more.
Logged

RiemannZetaJones

  • Thief
  • ****
  • Offline Offline
  • Posts: 90
  • Respect: +62
    • View Profile
Re: A theorem about drawing and density
« Reply #11 on: March 07, 2012, 12:59:00 am »
+1

One problem is determining the expected number of hands drawn in the next t turns where the total money is greater than or equal to P, where P is generally either 8 or 11. Venture can decrease this number, e.g. in a deck with 2 Gold, 1 Silver and 19 Victory cards. I don't know if it can increase it without relying on the reshuffle.

edit: this is clearly false, since extra treasures are needed to pad the deck to avoid triggering a reshuffle in some cases. See below.
« Last Edit: March 07, 2012, 03:04:43 am by RiemannZetaJones »
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: A theorem about drawing and density
« Reply #12 on: March 07, 2012, 01:01:22 am »
0

Quote
Consider a really simple example of 1 copper 1 estate in the draw deck. If you play a market, then you're either going to be left with a single copper or a single estate in the draw deck. Either way, the densities are different than you started with.

The distribution of the second card hasn't changed. The card that was second in your deck had a 50% chance of being a copper and that's still the case after you've drawn the first one. Only when you use the information from the first card does the distribution of the second card change. In the case of a venture however you always have the information that you will draw a number of non-treasure cards and one treasure card, providing there is a treasure card in your deck.

Quote
Is there fundamentally something different between market's effect on draw deck densities and venture's effect on draw deck densities?

You're still talking about density, but what is it? You seem to be calculating it as the mean (across all possible orderings of the deck) of the mean card value. I certainly think you're finding some interesting stuff out but unless you're more specific it is hard to evaluate.

By density, I mean a value of the function d_T I defined by
  d_T(A,B) = |B /\ T| / |B|,
where A is the set of cards you drew, B is the set of cards remaining, and T is the set of cards you're interested in the density of. So, for example, you might let T be the set of all treasure cards in your draw deck, and then d_T would give the remaining treasure density after you draw the cards A. I'm not concerned with the value of the treasures--although you can handle that if you like by looking separately at the copper density, the silver density, the gold density, and so on, none of which change in expectation.

So, density is only defined for one particular outcome of drawing. When I say "densities", then I'm just talking about the densities for several different choices of T. e.g. You might choose T_1 to be the set of coppers in your draw deck and T_2 to be the set of actions in your draw deck. So then you would be looking at two different densities: one for copper and one for actions.

Density doesn't depend on draw deck ordering, only on which cards are present in the draw deck. That's good because the model treats cards as being randomly selected when they are drawn, rather than shuffling the deck up-front. It'd be possible to re-work everything in terms of up-front shuffles, but that is awkward.

Density alone is not too useful, though, because it's only defined for one outcome, and before you play Venture, you don't know which outcome you're going to get. So, that's why it's useful to look at expected density (or average density, which means the same thing, since expected value is just an average). In full, the wording could be "the expected value, over all possible orderings of your draw deck, of the density of your draw deck after playing card X".
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: A theorem about drawing and density
« Reply #13 on: March 07, 2012, 01:47:07 am »
0

One problem is determining the expected number of hands drawn in the next t turns where the total money is greater than or equal to P, where P is generally either 8 or 11. Venture can decrease this number, e.g. in a deck with 2 Gold, 1 Silver and 19 Victory cards. I don't know if it can increase it without relying on the reshuffle.

Interesting conjecture! This inspired a strong non-sifting result about Venture. Fully generalizing it requires a lot of assumptions, but I can sketch the basic idea easily.

Imagine that your deck consists only of green cards and basic treasures (for simplicity). Also, assume that, regardless of whether you play Venture, you will not reshuffle when drawing your next hand. (For example, this assumption is valid if you have at least 6 treasures in your draw deck. It's not true in the example you gave!) Then the probability of drawing any particular next hand does not depend on whether you play Venture. (This implies that playing Venture does not alter your probability of drawing $8 next turn!)

Proof sketch.

The idea is to construct a bijection between draw deck orderings. For every draw deck ordering that would have you draw some particular hand next turn if you played Venture, it will be bijected with a draw deck ordering that would have you draw that same hand next turn if you hadn't played Venture. Since every draw deck ordering is equally probable, this shows Venture does not alter the probability of drawing any particular hand next turn.

First consider a draw deck ordering when we play Venture. From top to bottom, the ordering consists of a (possibly empty) string of green cards G_1,...,G_k, followed by a single treasure T, followed by the 5 cards H_1,...,H_5 that will make up your next hand, followed by some other cards C_1,...,C_m. Diagram:
  G_1, G_2, ..., G_k, T, H_1, H_2, ..., H_5, C_1, C_2, ..., C_m.
For clarity, Venture will reveal and discard G_1,...,G_k and reveal and play T, then you will draw H_1,...,H_5 as your next hand.

Biject this with the following draw deck ordering, for the situation where we don't play Venture:
  H_1, H_2, ..., H_5, C_1, C_2, ..., C_m, T, G_1, G_2, ..., G_m.
Here, we don't play Venture, and draw H_1,...,H_5 as our next hand (the same as if we had played Venture with the other draw deck ordering).

The inverse of this bijection is simple, but there is something to note. The inverse just consists of taking a single treasure followed by a (possibly empty) string of greens off the bottom of the deck, then putting the treasure on top and then the greens. The thing to note is that the treasure-followed-by-string-of-greens will not overlap our next hand, because otherwise, there is a draw deck ordering where playing Venture would cause us to reshuffle when drawing our next hand.
Logged

michaeljb

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1422
  • Shuffle iT Username: michaeljb
  • Respect: +2115
    • View Profile
Re: A theorem about drawing and density
« Reply #14 on: March 07, 2012, 02:00:28 am »
+1

Not really related to the discussion happening now, just responding directly to the OP, but the main point is pretty similar to a guest article yaron wrote for the main site a while ago, you might be interested in checking it out (it was just the first thing I thought of once I read the summary):

http://dominionstrategy.com/2010/12/04/guest-article-the-fallacy-of-cycling/
Logged
🚂 Give 18xx games a chance 🚂

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: A theorem about drawing and density
« Reply #15 on: March 07, 2012, 02:52:35 am »
+1

Not really related to the discussion happening now, just responding directly to the OP, but the main point is pretty similar to a guest article yaron wrote for the main site a while ago, you might be interested in checking it out (it was just the first thing I thought of once I read the summary):

http://dominionstrategy.com/2010/12/04/guest-article-the-fallacy-of-cycling/

Fantastic, thanks very much. It's interesting to me that the article is somewhat spot-on (although it assumes an infinite deck and some of the things it says aren't true of finite decks), but then several people disagree in the comments.

Guy Srinivasan's post uses simulation to consider the effect of reshuffles, and finds that a card such as Loan or Venture can actually have a slight anti-sifting effect when reshuffles are taken into account. Very interesting. I'll need to spend some time on it to see why this is.

Tim attempts to show that even with no reshuffles, playing loan reduces the average proportion of gold in the draw deck--which is false. He gives an intuitive argument for this, but the intuition is wrong here. I think this illustrates why it's useful to be rigorous.

rrenaud agrees with Tim's argument, and gives an example with a 2-card draw deck (Estate + Gold) to support it. Unfortunately, since gold density is not well-defined for the case where loan draws and discards both cards in the draw deck, this is not a counterexample to Yaron's article. Even though it's not support for Tim's incorrect claim, rrenaud's example is useful in showing that when you might exhaust your draw deck, then the situation is complicated (which is why I assumed in my original post that at least 1 card would be left remaining in the draw deck).

Yaron aims to refute these counterarguments by assuming an infinite deck. While this might be a useful way of thinking in some games, it isn't necessary to assume an infinite deck, as I showed in my original post.

Guy Srinivasan gives a really cute intuitive argument in the infinite deck case, which I'll quote here:
Quote
The way I’ve always internalized the “draw until you see a Gold” is “have a boy”. If everyone has kids until they have their first boy, will there be more girls or boys born? Answer: it’s still 50%, of course, because no matter what at each stage of the game you’ve got a coinflip at each.

Ingix and DG derive a formula for the expected number of cards Loan will reveal: (N+1)/(T+1), where N is the total number of cards in the draw deck and T is the total number of treasures in the draw deck. DG gives an elegant proof:
Quote
The simplest explanation is probably to look at ‘slots’ between two treasure cards. In each slot there can be any number of the other cards from the deck, including none. All the other cards are included in these slots. How many slots are there? Well there is one slot before each treasure card and one slot after the last treasure card. This divides the other cards between T+1 slots, giving the N+1/T+1 result with a little algebra.
« Last Edit: March 07, 2012, 05:52:53 am by blueblimp »
Logged

bozzball

  • Bishop
  • ****
  • Offline Offline
  • Posts: 102
  • Respect: +68
    • View Profile
Re: A theorem about drawing and density
« Reply #16 on: March 07, 2012, 03:15:48 am »
+2

The easiest way I know to verify this in your mind is to consider the last card in the deck. After you have played your venture, the conditional probability (given what you have seen) that the last card is an estate is the density of estates in whatever cards are left. Thus, before you play your venture, the probability that the last card will be an estate is the expected value of the density afterwards.

This discussion is equivalent to the following classic brainteaser:
You have a 52 card (ordinary playing cards) deck. You are going to deal out cards from the deck 1-by-1. You have to say the word "Red" before you deal one of the cards. If that card is Red then you win a dollar, otherwise you lose a dollar. How can you maximize your probability of winning?
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: A theorem about drawing and density
« Reply #17 on: March 07, 2012, 03:22:43 am »
0

By the way, the Venture case is equivalent to:

Suppose you have an urn with W white balls and B black balls, where W,B >= 2. Perform the following procedure:
  • Draw a ball uniformly at random from the urn and discard it.
  • If the ball was white, go to step 1. If the ball was black, stop.
The expected final proportion of white balls in the urn is exactly W/(W+B), which was the initial proportion of white balls. (This is equivalent to playing Venture under the assumptions in the original post, so the same proofs work.)

Python code to simulate this if you want additional confidence:
Code: [Select]
import random

W = 20
B = 10

TRIALS = 10000
w_prop_sum = 0
for i in range(TRIALS):
  w = W
  b = B

  while 1:
    if random.uniform(0,1) < w/float(w+b):
      # Draw a white ball with probability w/(w+b) and discard it.
      w -= 1
    else:
      # Draw a black ball otherwise and discard it, then stop.
      b -= 1
      break

  w_prop = w / float(w+b)
  w_prop_sum += w_prop

initial_w_prop = W / float(W+B)
avg_final_w_prop = w_prop_sum / float(TRIALS)

print 'Ran %d trials.' % TRIALS
print 'Initial contents of the urn: %d white balls and %d black balls.' % (W,B)
print 'Initial proportion of white balls: %.4lf' % initial_w_prop
print 'Average final proportion of white balls: %.4lf' % avg_final_w_prop
« Last Edit: March 07, 2012, 03:26:55 am by blueblimp »
Logged

RiemannZetaJones

  • Thief
  • ****
  • Offline Offline
  • Posts: 90
  • Respect: +62
    • View Profile
Re: A theorem about drawing and density
« Reply #18 on: March 07, 2012, 03:31:19 am »
0


This inspired a strong non-sifting result about Venture. Fully generalizing it requires a lot of assumptions, but I can sketch the basic idea easily.

Imagine that your deck consists only of green cards and basic treasures (for simplicity). Also, assume that, regardless of whether you play Venture, you will not reshuffle when drawing your next hand. (For example, this assumption is valid if you have at least 6 treasures in your draw deck. It's not true in the example you gave!) Then the probability of drawing any particular next hand does not depend on whether you play Venture. (This implies that playing Venture does not alter your probability of drawing $8 next turn!)

Proof sketch.

The idea is to construct a bijection between draw deck orderings.

This is fantastic.
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: A theorem about drawing and density
« Reply #19 on: March 07, 2012, 04:05:52 am »
0


This inspired a strong non-sifting result about Venture. Fully generalizing it requires a lot of assumptions, but I can sketch the basic idea easily.

Imagine that your deck consists only of green cards and basic treasures (for simplicity). Also, assume that, regardless of whether you play Venture, you will not reshuffle when drawing your next hand. (For example, this assumption is valid if you have at least 6 treasures in your draw deck. It's not true in the example you gave!) Then the probability of drawing any particular next hand does not depend on whether you play Venture. (This implies that playing Venture does not alter your probability of drawing $8 next turn!)

Proof sketch.

The idea is to construct a bijection between draw deck orderings.

This is fantastic.

(This post made my day, by the way, thanks.)

This can be converted into an intuitive argument that's much easier to generalize. Just imagine that, instead of Venture taking cards from the top of the draw deck, it takes cards from the bottom; if we assume that we don't know the order of cards in the draw deck, this doesn't make any difference.

With this viewpoint, it's completely obvious that playing Venture doesn't change the probability of anything that happens up until the next reshuffle, barring special cases like Inn and Counting House that care about the contents of your discard pile.

(It's interesting to reconcile this viewpoint with your example of 2 golds, 1 silver and 19 victory cards. In that example, the reason Venture decreases your probability of getting $8 in the next t turns is only because it brings the reshuffle much closer. You reshuffle at the point when, in the alternative universe, you would have drawn the bottom-most treasure in your deck.)
« Last Edit: March 07, 2012, 04:11:23 am by blueblimp »
Logged

Davio

  • 2012 Dutch Champion
  • *
  • Offline Offline
  • Posts: 4787
  • Respect: +3413
    • View Profile
Re: A theorem about drawing and density
« Reply #20 on: March 07, 2012, 06:21:08 am »
0

I've skipped past most of the arguments that are way over my head (hey, my last math class was on the university 10 years ago!).

What I want to know and was unable to distill for sure is whether the skip ability of Venture is actually helpful or moot.
It's been shown that the money density doesn't change, so playing Ventures doesn't help future hands? Is this correct?

So the only "extra" we get from Venture is the ability to trigger multiple Ventures?


I have a similar question for Farming Village. Is the ability to skip moot or does it actually help the player when there's no interaction between players? Farming Villages find either action or treasure cards, so they're done searching even sooner. The main question is: Is Farming Village only better than a normal Village when e.g. Ghost Ship is in play or are there more benefits to this potential skipping?
Logged

BSG: Cagprezimal Adama
Mage Knight: Arythea

MasterAir

  • Alchemist
  • ***
  • Offline Offline
  • Posts: 39
  • Respect: +8
    • View Profile
Re: A theorem about drawing and density
« Reply #21 on: March 07, 2012, 07:03:11 am »
0

I think I'm convinced that it doesn't affect your next hand, I'm less convinced that it doesn't affect the hand(s) after that.  If you remove green cards from your draw deck and put them in your discard then you *do* increase the money density in your draw deck.  Of that I have absolutely no doubt.  You remove cards with $0 value and thus the average card value in your draw deck increases.  I'd guess that decks with ventures in typically have better longevity than pure money decks.
Logged

Deadlock39

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1722
  • Respect: +1758
    • View Profile
Re: A theorem about drawing and density
« Reply #22 on: March 07, 2012, 08:48:21 am »
+1

I've skipped past most of the arguments that are way over my head (hey, my last math class was on the university 10 years ago!).

What I want to know and was unable to distill for sure is whether the skip ability of Venture is actually helpful or moot.
It's been shown that the money density doesn't change, so playing Ventures doesn't help future hands? Is this correct?

So the only "extra" we get from Venture is the ability to trigger multiple Ventures?


I have a similar question for Farming Village. Is the ability to skip moot or does it actually help the player when there's no interaction between players? Farming Villages find either action or treasure cards, so they're done searching even sooner. The main question is: Is Farming Village only better than a normal Village when e.g. Ghost Ship is in play or are there more benefits to this potential skipping?

The key with Farming Village (which I think someone touched on in the Venture thread) is that it improves your current hand.  As covered by this discussion, Farming Village does not improve the expected value of your deck in future turns.  What it does do is guarantee it will not draw a victory card (or Curse) this turn.

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4074
  • Respect: +2624
    • View Profile
Re: A theorem about drawing and density
« Reply #23 on: March 07, 2012, 09:03:14 am »
0

Quote
What I want to know and was unable to distill for sure is whether the skip ability of Venture is actually helpful or moot.It's been shown that the money density doesn't change, so playing Ventures doesn't help future hands? Is this correct?


When you calculate an average (mean) card value for a full deck then you're considering something like T/C, T= treasure and C= number of cards. When you add a farming village to the deck, T remains unchanged but you might see C decrease as green cards are discarded. Therefore T/C increases.


Edit - specified full deck rather than draw deck.
« Last Edit: March 07, 2012, 10:00:56 am by DG »
Logged

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: A theorem about drawing and density
« Reply #24 on: March 07, 2012, 09:39:10 am »
+1

Quote
What I want to know and was unable to distill for sure is whether the skip ability of Venture is actually helpful or moot.It's been shown that the money density doesn't change, so playing Ventures doesn't help future hands? Is this correct?


When you calculate an average (mean) card value for a draw deck then you're considering something like T/C, T= treasure and C= number of cards. When you play a farming village T remains unchanged but you might see C decrease when green cards are discarded. Therefore T/C increases.


T decreases by 1 (assuming Farming Village draws a treasure, not an action).  It's (T - 1) / (C - discarded_cards - 1).  If your draw pile is 5 Estates and a Copper, and the Copper was on top of the deck, you go from 1 / 6 to 0 / 5, so the second term can decrease.

For any given play, the money density will probably change slightly.  On average, though, the money density will remain equal to T / C.
Logged

Davio

  • 2012 Dutch Champion
  • *
  • Offline Offline
  • Posts: 4787
  • Respect: +3413
    • View Profile
Re: A theorem about drawing and density
« Reply #25 on: March 07, 2012, 10:08:51 am »
0

If I simulate plain Village vs Farming Village (start both off with 7 Copper, 3 Estate and 9 of its respective card), Farming Village beats regular Village 86% to 9%.

So there is a significant effect going on here and the simulator doesn't even care about managing reshuffles. I doubt whether it's just because the FV shuffles slightly more often.
Logged

BSG: Cagprezimal Adama
Mage Knight: Arythea

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: A theorem about drawing and density
« Reply #26 on: March 07, 2012, 10:13:44 am »
+1

If I simulate plain Village vs Farming Village (start both off with 7 Copper, 3 Estate and 9 of its respective card), Farming Village beats regular Village 86% to 9%.

So there is a significant effect going on here and the simulator doesn't even care about managing reshuffles. I doubt whether it's just because the FV shuffles slightly more often.

No doubt.  Farming Village helps your current hand.  While Village often draws green, Farming Village will always draw something you can use.  The question is whether it helps your next hand (apart from the effects of non-filtering deck cycling).  The answer is it doesn't.
Logged

Ozle

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3625
  • Sorry, this text is personal.
  • Respect: +3360
    • View Profile
Re: A theorem about drawing and density
« Reply #27 on: March 07, 2012, 10:24:41 am »
0

If I simulate plain Village vs Farming Village (start both off with 7 Copper, 3 Estate and 9 of its respective card), Farming Village beats regular Village 86% to 9%.

So there is a significant effect going on here and the simulator doesn't even care about managing reshuffles. I doubt whether it's just because the FV shuffles slightly more often.

No doubt.  Farming Village helps your current hand.  While Village often draws green, Farming Village will always draw something you can use.  The question is whether it helps your next hand (apart from the effects of non-filtering deck cycling).  The answer is it doesn't.

Surely the answer is: It can do, but on average it doesnt.
Logged
Try the Ozle Google Map Challenge!
http://forum.dominionstrategy.com/index.php?topic=7466.0

Sullying players Enjoyment of Innovation since 2013 Apparently!

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: A theorem about drawing and density
« Reply #28 on: March 07, 2012, 10:36:34 am »
0

Of course, in the same way Smithy can help your next hand if it coincidentally draws 3 Estates.
Logged

Deadlock39

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1722
  • Respect: +1758
    • View Profile
Re: A theorem about drawing and density
« Reply #29 on: March 07, 2012, 01:00:14 pm »
0

Well in a really contrived manner... it helps out your future hands by drawing a better card this hand which allows you to purchase better cards which are then in your future hands.  This still has nothing to do with the expected value of your next hand (unless you reshuffled and drew that better card you just bought).

Ozle

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3625
  • Sorry, this text is personal.
  • Respect: +3360
    • View Profile
Re: A theorem about drawing and density
« Reply #30 on: March 07, 2012, 01:08:45 pm »
0

Well in a really contrived manner... it helps out your future hands by drawing a better card this hand which allows you to purchase better cards which are then in your future hands.  This still has nothing to do with the expected value of your next hand (unless you reshuffled and drew that better card you just bought).

I think your saying the same thing as me, but for some reason stating it in a different way,

If in the example given, it draws 3 estates and your deck is 20 coppers, 3 estates and 1 smithy. Then the act of playing it has changed your next hand. (You have 4 Coppers and Smithy: Your next expected hand value is about 4.2ish. You play the smith and get three estates. Your next expected hand value is now 5)


On average it doesnt effect your next hand, but sometimes it will, sometimes it wont. Thats why its average.


I am now calling this Schroedingers Draw, because you dont know whether it has changed your next hands expected value until you play it and see what you draw. But you want to know whether it will be good or bad before you play it.

Logged
Try the Ozle Google Map Challenge!
http://forum.dominionstrategy.com/index.php?topic=7466.0

Sullying players Enjoyment of Innovation since 2013 Apparently!

RiemannZetaJones

  • Thief
  • ****
  • Offline Offline
  • Posts: 90
  • Respect: +62
    • View Profile
Re: A theorem about drawing and density
« Reply #31 on: March 07, 2012, 01:38:10 pm »
+1

I don't think anyone has proved anything about what might happen at, or after, the reshuffle. Venture and Farming Village are both good at deck-cycling, which presumably has a net positive effect, since you want to cycle your deck more than you want to avoid cycling it. While blueblimp's result on non-improvement of the next hand(s) is fantastic, it only applies away from the reshuffle.
Logged

Chriamon

  • Herbalist
  • **
  • Offline Offline
  • Posts: 7
  • Respect: +8
    • View Profile
Re: A theorem about drawing and density
« Reply #32 on: March 07, 2012, 01:47:29 pm »
0

On the concept of the "Schroedingers Draw" as Ozle said, perhaps it is possible to use this in the future, as opposed to trying to calculate the benefit of it before you play it. What I mean by this, is say you have perfect memory, and you know exactly every card in your deck, and every card in your discard pile at all times. Is it possible to gain a benefit to cards being in your discard over cards being in your deck. With cards like chancellor, it can be. So the question I would pose, is that in the example that smithy "can help your next hand but on average doesn't," does the smithy actually on average help your next hands when you have cards like chancellor? Intuitively I would say that more sift is helping chancellors, because you have more information about what cards are in your discard, however I would be hard pressed to come up with any math to prove it. (I think it would really be awesome if chancellor had potential applications beyond chancellor/stash).
Logged

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: A theorem about drawing and density
« Reply #33 on: March 07, 2012, 02:12:20 pm »
0

I don't think anyone has proved anything about what might happen at, or after, the reshuffle. Venture and Farming Village are both good at deck-cycling, which presumably has a net positive effect, since you want to cycle your deck more than you want to avoid cycling it. While blueblimp's result on non-improvement of the next hand(s) is fantastic, it only applies away from the reshuffle.

If you discount the impact of drawing the Venture you played, Venture doesn't do anything to the quality of the hands you get at or after the reshuffle.  If there are 3 cards left in your draw pile at the end of your turn, you're drawing 3 random cards from your deck, then two random cards from your discard pile.  Your discard pile will be a random sampling of your deck, plus whatever you bought since the last reshuffle, plus the Venture we're talking about.  We can't really say anything meaningful about buys, so really the only difference Venture makes to the quality of hands after reshuffle is the fact that it can be drawn, which you could say about any card.

Venture does let you get to the reshuffle faster.  Most of the time, that's a good thing.  Near the end, it's probably a bad thing.
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: A theorem about drawing and density
« Reply #34 on: March 07, 2012, 04:19:40 pm »
+1

I've skipped past most of the arguments that are way over my head (hey, my last math class was on the university 10 years ago!).

What I want to know and was unable to distill for sure is whether the skip ability of Venture is actually helpful or moot.
It's been shown that the money density doesn't change, so playing Ventures doesn't help future hands? Is this correct?

So the only "extra" we get from Venture is the ability to trigger multiple Ventures?


I have a similar question for Farming Village. Is the ability to skip moot or does it actually help the player when there's no interaction between players? Farming Villages find either action or treasure cards, so they're done searching even sooner. The main question is: Is Farming Village only better than a normal Village when e.g. Ghost Ship is in play or are there more benefits to this potential skipping?

I'd summarize results as follows:
  • Cards like Venture and Farming Village do not improve (or even change really) your future hands before a reshuffle, unless you know something about the top of your deck (e.g. you got Rabble'd). To visualize this, imagine Venture drawing cards from the bottom of your deck instead of the top. (This intuition doesn't address density, but it's a good start.)
  • Nobody knows exactly how these cards interact with reshuffles. But the effect should be minor unless you're reshuffling often.

So, play recommendations:
  • If you need a sifter for your next turn, Venture/FV won't do the job. Get a Cartographer instead.
  • Although Venture/FV sift your current turn (and that's why FV is better than Village), this is a weak effect compared to sifters like Warehouse & Embassy. For example, if Farming Village draws a Silver and you don't use the extra action, you might as well have just bought a Silver in the first place.
  • The cycling effect from these cards is overall a good thing, even if they aren't sifting much, in the same way that Smithy's cycling effect is good.
Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4386
    • View Profile
    • WanderingWinder YouTube Page
Re: A theorem about drawing and density
« Reply #35 on: March 07, 2012, 09:40:32 pm »
+1

I've skipped past most of the arguments that are way over my head (hey, my last math class was on the university 10 years ago!).

What I want to know and was unable to distill for sure is whether the skip ability of Venture is actually helpful or moot.
It's been shown that the money density doesn't change, so playing Ventures doesn't help future hands? Is this correct?

So the only "extra" we get from Venture is the ability to trigger multiple Ventures?


I have a similar question for Farming Village. Is the ability to skip moot or does it actually help the player when there's no interaction between players? Farming Villages find either action or treasure cards, so they're done searching even sooner. The main question is: Is Farming Village only better than a normal Village when e.g. Ghost Ship is in play or are there more benefits to this potential skipping?

I'd summarize results as follows:
  • Cards like Venture and Farming Village do not improve (or even change really) your future hands before a reshuffle, unless you know something about the top of your deck (e.g. you got Rabble'd). To visualize this, imagine Venture drawing cards from the bottom of your deck instead of the top. (This intuition doesn't address density, but it's a good start.)
  • Nobody knows exactly how these cards interact with reshuffles. But the effect should be minor unless you're reshuffling often.

So, play recommendations:
  • If you need a sifter for your next turn, Venture/FV won't do the job. Get a Cartographer instead.
  • Although Venture/FV sift your current turn (and that's why FV is better than Village), this is a weak effect compared to sifters like Warehouse & Embassy. For example, if Farming Village draws a Silver and you don't use the extra action, you might as well have just bought a Silver in the first place.
  • The cycling effect from these cards is overall a good thing, even if they aren't sifting much, in the same way that Smithy's cycling effect is good.

Except I have to disagree that the reshuffle effect is negligible so much. You are going to reshuffle more often, and, more importantly and moreover, these cards will miss reshuffles significantly more often. Which weakens them. How much more often... well, I don't think it's negligible, but it's really hard to pinpoint.

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: A theorem about drawing and density
« Reply #36 on: March 07, 2012, 10:15:27 pm »
0

I've skipped past most of the arguments that are way over my head (hey, my last math class was on the university 10 years ago!).

What I want to know and was unable to distill for sure is whether the skip ability of Venture is actually helpful or moot.
It's been shown that the money density doesn't change, so playing Ventures doesn't help future hands? Is this correct?

So the only "extra" we get from Venture is the ability to trigger multiple Ventures?


I have a similar question for Farming Village. Is the ability to skip moot or does it actually help the player when there's no interaction between players? Farming Villages find either action or treasure cards, so they're done searching even sooner. The main question is: Is Farming Village only better than a normal Village when e.g. Ghost Ship is in play or are there more benefits to this potential skipping?

I'd summarize results as follows:
  • Cards like Venture and Farming Village do not improve (or even change really) your future hands before a reshuffle, unless you know something about the top of your deck (e.g. you got Rabble'd). To visualize this, imagine Venture drawing cards from the bottom of your deck instead of the top. (This intuition doesn't address density, but it's a good start.)
  • Nobody knows exactly how these cards interact with reshuffles. But the effect should be minor unless you're reshuffling often.

So, play recommendations:
  • If you need a sifter for your next turn, Venture/FV won't do the job. Get a Cartographer instead.
  • Although Venture/FV sift your current turn (and that's why FV is better than Village), this is a weak effect compared to sifters like Warehouse & Embassy. For example, if Farming Village draws a Silver and you don't use the extra action, you might as well have just bought a Silver in the first place.
  • The cycling effect from these cards is overall a good thing, even if they aren't sifting much, in the same way that Smithy's cycling effect is good.

Except I have to disagree that the reshuffle effect is negligible so much. You are going to reshuffle more often, and, more importantly and moreover, these cards will miss reshuffles significantly more often. Which weakens them. How much more often... well, I don't think it's negligible, but it's really hard to pinpoint.

Good point. I should have just stuck to saying that nobody knows exactly what's going on with reshuffles, in general.
Logged

timchen

  • Minion
  • *****
  • Offline Offline
  • Posts: 704
  • Shuffle iT Username: allfail
  • Respect: +235
    • View Profile
Re: A theorem about drawing and density
« Reply #37 on: March 08, 2012, 09:48:18 pm »
+1

I finally get to read the proof.

So it is just saying drawing a random card does not change the probabilistic distribution of the remaining deck. This part seems intuitive. However, the less intuitive part is that this fact does not depend on your drawing policy (in which you only get to look at the cards after you draw them, of course.)

For me, probably the problem comes from the fact that this works for all policies, which is anti-intuitive. How can I not come up with some sort of drawing criteria to alter the remaining deck? For example, suppose I have a large enough deck of half copper and half estate. Now I demand I draw until I draw more coppers than estates. How does that not change the remaining distribution of a large enough but finite deck?

I think this is sort of an order-of-limits problem, which always hinders my intuition :(
Logged

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: A theorem about drawing and density
« Reply #38 on: March 08, 2012, 10:41:49 pm »
+2

It only works for policies that are guaranteed to stop drawing before the draw pile is empty.
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: A theorem about drawing and density
« Reply #39 on: March 08, 2012, 10:58:20 pm »
0

I agree that it would be really nice to have a proof that is more intuitive, but in general I don't know how to do it except by induction.
Logged

RiemannZetaJones

  • Thief
  • ****
  • Offline Offline
  • Posts: 90
  • Respect: +62
    • View Profile
Re: A theorem about drawing and density
« Reply #40 on: March 09, 2012, 01:51:53 am »
0

I don't think anyone has proved anything about what might happen at, or after, the reshuffle. Venture and Farming Village are both good at deck-cycling, which presumably has a net positive effect, since you want to cycle your deck more than you want to avoid cycling it. While blueblimp's result on non-improvement of the next hand(s) is fantastic, it only applies away from the reshuffle.

If you discount the impact of drawing the Venture you played, Venture doesn't do anything to the quality of the hands you get at or after the reshuffle.  If there are 3 cards left in your draw pile at the end of your turn, you're drawing 3 random cards from your deck, then two random cards from your discard pile.  Your discard pile will be a random sampling of your deck, plus whatever you bought since the last reshuffle, plus the Venture we're talking about.  We can't really say anything meaningful about buys, so really the only difference Venture makes to the quality of hands after reshuffle is the fact that it can be drawn, which you could say about any card.

Venture does let you get to the reshuffle faster.  Most of the time, that's a good thing.  Near the end, it's probably a bad thing.

Venture also changes the residue-class modulo 5 of the number of cards in your draw pile, and consequently changes the number of cards in your draw pile that will miss the reshuffle. I doubt this is ever going to be worth taking into account, but it should affect the quality of hands drawn after the reshuffle.
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: A theorem about drawing and density
« Reply #41 on: March 09, 2012, 04:20:01 pm »
0

I don't think anyone has proved anything about what might happen at, or after, the reshuffle. Venture and Farming Village are both good at deck-cycling, which presumably has a net positive effect, since you want to cycle your deck more than you want to avoid cycling it. While blueblimp's result on non-improvement of the next hand(s) is fantastic, it only applies away from the reshuffle.

If you discount the impact of drawing the Venture you played, Venture doesn't do anything to the quality of the hands you get at or after the reshuffle.  If there are 3 cards left in your draw pile at the end of your turn, you're drawing 3 random cards from your deck, then two random cards from your discard pile.  Your discard pile will be a random sampling of your deck, plus whatever you bought since the last reshuffle, plus the Venture we're talking about.  We can't really say anything meaningful about buys, so really the only difference Venture makes to the quality of hands after reshuffle is the fact that it can be drawn, which you could say about any card.

Venture does let you get to the reshuffle faster.  Most of the time, that's a good thing.  Near the end, it's probably a bad thing.

Venture also changes the residue-class modulo 5 of the number of cards in your draw pile, and consequently changes the number of cards in your draw pile that will miss the reshuffle. I doubt this is ever going to be worth taking into account, but it should affect the quality of hands drawn after the reshuffle.

Maybe it's significant with a Venture/nothing opening. Usually with a 5/- opener, only 1 card will miss the second reshuffle. If Venture is played on T3 and draws 2 cards (not the most likely case), then 4 cards will miss the reshuffle, and they will all be coppers/estates, so that should be good. On the other hand, if Venture is drawn on T4, especially if you know the one card in the draw deck is an estate, it's less clear to me whether the effect is beneficial.

It seems really difficult to use this effect to advantage in general, since you generally don't know how many cards venture will draw.
Logged

Razzishi

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 216
  • Shuffle iT Username: Eye Urn
  • Respect: +121
    • View Profile
Re: A theorem about drawing and density
« Reply #42 on: March 09, 2012, 10:25:05 pm »
0

The assumption a random deck directly implies that the expected value of the density function is constant with respect to place in deck.  There's no need to say anything more.

Would you mind expanding on this? This was my intuition, but I wasn't able to formalize it in the case where the number of drawn cards varies depending on what's drawn (which is the case for Venture). To illustrate the difficulty, observe that the conditional expectation E[d_T(A_end, B_end) | |B_end| = r] is not constant in r! For example, if r=|D|-1, that means Venture drew exactly 1 card, so it was a treasure, which means the density decreased.

So... yeah. Basically I think it is necessary to say more.

The way I see it, the distribution of the deck doesn't change based on making the decision to play Venture, so it doesn't matter what Venture does if it all it does is pick a spot in the deck to start the next hand.  There's still something nagging me like "but how it resolves changes the distribution" and while I think "but it doesn't matter", I definitely am having difficulty formalizing in simple terms why it doesn't matter, and that's what you were doing.  It still seems way too complicated for such an obvious (to me) intuition, but after having spent more time thinking about the problem definitely see why you might do something like this.  I still haven't followed through the logic precisely (because I thought it was pointless) and might try to derive something like this myself independently and see how complicated it actually has to be.
Logged
Stop reading my signature.

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4074
  • Respect: +2624
    • View Profile
Re: A theorem about drawing and density
« Reply #43 on: March 09, 2012, 11:48:10 pm »
0

Quote
The way I see it, the distribution of the deck doesn't change based on making the decision to play Venture, so it doesn't matter what Venture does if it all it does is pick a spot in the deck to start the next hand.

It changes the distribution. If we go back to the 3 estates, 2 coppers example then after you play the venture the expected number of coppers in the deck is now 1, the expected number of estates in the deck is now 2, the expected number of cards in the deck is 3, and the expected card value is unchanged at 2/5.
Logged

RiemannZetaJones

  • Thief
  • ****
  • Offline Offline
  • Posts: 90
  • Respect: +62
    • View Profile
Re: A theorem about drawing and density
« Reply #44 on: March 10, 2012, 12:17:33 am »
0

I don't think anyone has proved anything about what might happen at, or after, the reshuffle. Venture and Farming Village are both good at deck-cycling, which presumably has a net positive effect, since you want to cycle your deck more than you want to avoid cycling it. While blueblimp's result on non-improvement of the next hand(s) is fantastic, it only applies away from the reshuffle.

If you discount the impact of drawing the Venture you played, Venture doesn't do anything to the quality of the hands you get at or after the reshuffle.  If there are 3 cards left in your draw pile at the end of your turn, you're drawing 3 random cards from your deck, then two random cards from your discard pile.  Your discard pile will be a random sampling of your deck, plus whatever you bought since the last reshuffle, plus the Venture we're talking about.  We can't really say anything meaningful about buys, so really the only difference Venture makes to the quality of hands after reshuffle is the fact that it can be drawn, which you could say about any card.

Venture does let you get to the reshuffle faster.  Most of the time, that's a good thing.  Near the end, it's probably a bad thing.

Venture also changes the residue-class modulo 5 of the number of cards in your draw pile, and consequently changes the number of cards in your draw pile that will miss the reshuffle. I doubt this is ever going to be worth taking into account, but it should affect the quality of hands drawn after the reshuffle.

Maybe it's significant with a Venture/nothing opening. Usually with a 5/- opener, only 1 card will miss the second reshuffle. If Venture is played on T3 and draws 2 cards (not the most likely case), then 4 cards will miss the reshuffle, and they will all be coppers/estates, so that should be good. On the other hand, if Venture is drawn on T4, especially if you know the one card in the draw deck is an estate, it's less clear to me whether the effect is beneficial.

It seems really difficult to use this effect to advantage in general, since you generally don't know how many cards venture will draw.

My point was simply to rule out the theorem that the only benefit to your future hands from playing the venture is that it speeds the reshuffle. But I'd be willing to bet that in practice, this is the only benefit you should consider except in really small decks.
Logged

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: A theorem about drawing and density
« Reply #45 on: March 10, 2012, 12:45:47 am »
+1

Quote
The way I see it, the distribution of the deck doesn't change based on making the decision to play Venture, so it doesn't matter what Venture does if it all it does is pick a spot in the deck to start the next hand.

It changes the distribution. If we go back to the 3 estates, 2 coppers example then after you play the venture the expected number of coppers in the deck is now 1, the expected number of estates in the deck is now 2, the expected number of cards in the deck is 3, and the expected card value is unchanged at 2/5.

It doesn't really matter, because one way or the other, you'll draw a 5 card hand next turn.  I'm fairly convinced that the only benefits to the next hand that Venture provides are the normal benefits of reshuffling.  Those can be good (or bad), but they have nothing to do with Venture filtering anything, only cycling.

I just threw together some quick and dirty code to verify that Venture doesn't modify the next hand when it doesn't trigger a reshuffle.  It constructs a draw pile with 2 Golds, 3 Silvers, 5 Coppers, and 5 dead cards (arbitrary numbers that are roughly realistic in a moderately greening deck).  It shuffles the deck, gets the value of the next 5 card hand, simulates a Venture draw, and gets the value of the next 5 card hand again.  It does this a million times and calculates the mean and variance for the Venture / non-Venture hands.

Code: [Select]
trials = 1000000
values_after = []
values_before = []
(1..trials).each do
  cards = [3] * 2 + [2] * 3 + [1] * 5 + [0] * 5
  cards.shuffle!
  values_before << cards.take(5).reduce(:+)
  drawn = []
  drawn << cards.shift while drawn.last.nil? || drawn.last.zero?
  values_after << cards.take(5).reduce(:+)
end

mean_before = values_before.reduce(:+).to_f / trials
mean_after = values_after.reduce(:+).to_f / trials

variance_before = values_before.reduce(0) {|s, v| s + (mean_before - v)**2}.to_f / trials
variance_after = values_after.reduce(0) {|s, v| s + (mean_before - v)**2}.to_f / trials

puts "Average hand value without Venture: #{mean_before}"
puts "Variance without Venture: #{variance_before}"
puts "Average hand value with Venture: #{mean_after}"
puts "Variance with Venture: #{variance_after}"

Output:
Code: [Select]
Average hand value without Venture: 5.664152
Variance without Venture: 3.748250120906077
Average hand value with Venture: 5.665684
Variance with Venture: 3.7451291591780285
Logged

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: A theorem about drawing and density
« Reply #46 on: March 10, 2012, 12:58:57 am »
0

My point was simply to rule out the theorem that the only benefit to your future hands from playing the venture is that it speeds the reshuffle. But I'd be willing to bet that in practice, this is the only benefit you should consider except in really small decks.

Fair enough.  I didn't intentionally claim otherwise.  The main idea is that Venture doesn't provide the benefits of a deck filtering card (e.g. Scout), which was a claim made in the original thread.  It, of course, does provide the cycling benefits of a deck drawing card.
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: A theorem about drawing and density
« Reply #47 on: March 10, 2012, 02:32:49 am »
0

The easiest way I know to verify this in your mind is to consider the last card in the deck. After you have played your venture, the conditional probability (given what you have seen) that the last card is an estate is the density of estates in whatever cards are left. Thus, before you play your venture, the probability that the last card will be an estate is the expected value of the density afterwards.

I forgot about this post (since I didn't fully understand it the first time). That's a really nice short proof that the expected density doesn't change. In algebra, it'd go something like
Code: [Select]
Original treasure density
  = Pr[the last card of the deck is a treasure]
  = sum_{strict subset A of our draw deck} Pr[last card is a treasure | drew A and stopped] Pr[drew A and stopped]
  = sum_{strict subset A of our draw deck} (the treasure density given we drew A and stopped) Pr[drew A and stopped]
  = E[treasure density after drawing].

The key really being that the conditional probability really does give the density, which is only true because we can't look at cards without drawing them.
« Last Edit: March 10, 2012, 02:38:48 am by blueblimp »
Logged

RiemannZetaJones

  • Thief
  • ****
  • Offline Offline
  • Posts: 90
  • Respect: +62
    • View Profile
Re: A theorem about drawing and density
« Reply #48 on: March 10, 2012, 02:28:44 pm »
0

My point was simply to rule out the theorem that the only benefit to your future hands from playing the venture is that it speeds the reshuffle. But I'd be willing to bet that in practice, this is the only benefit you should consider except in really small decks.

Fair enough.  I didn't intentionally claim otherwise.  The main idea is that Venture doesn't provide the benefits of a deck filtering card (e.g. Scout), which was a claim made in the original thread.  It, of course, does provide the cycling benefits of a deck drawing card.

No, you didn't claim otherwise at all. I just wondered, once I saw your involution argument, about just quite how strong such a line of thought might be.
Logged

MasterAir

  • Alchemist
  • ***
  • Offline Offline
  • Posts: 39
  • Respect: +8
    • View Profile
Re: A theorem about drawing and density
« Reply #49 on: March 12, 2012, 05:50:25 am »
0

I think that looking at a single hand is causing people problems here.  If there are 2 decks with only victory and treasure cards that are the same size, and 1 deck contains ventures.  The deck with the ventures would see more treasure per hand (on average) because each time a venture is played it removes some number (sometimes 0, but probably not always) of victory cards that would be dead cards from subsequent hands.

There is no way that this has no effect on the quality of cards drawn.  If I can discard a victory card without putting it in hand, that is almost always a boon.

If you used a spy and only discarded a card if it were a victory card it would improve the average quality of your hand in the same way.  Maybe not if you look at the single next hand, but on average.  I think the theorem is too specific in it's priors to be useful in Dominion games, and it is therefore misleading.

It probably isn't a whitewash, but I'd guess that a big money bot that buys venture over silver on $5 wins heavily over an optimised basic big money bot.  One of the (I'd say main, but the cycling might be more important) differences is that the venture bot sees fewer victory cards in hand than the big money bot.  On average, this means it's effective money density is higher.
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4074
  • Respect: +2624
    • View Profile
Re: A theorem about drawing and density
« Reply #50 on: March 12, 2012, 10:46:02 am »
0

Believe it or not, I have actually fashioned a proof using Binomial coefficients http://en.wikipedia.org/wiki/Binomial_coefficient that the mean card value in the draw deck is unchanged after played a venture (for a deck of treasures and victory cards, at least 2 treasures). This is university level mathematics so I'm pretty pleased that I've remembered something about it after 20 years!

Essentially - Formulate the probability of discarding n victory cards when playing the venture and the mean card value in that case
                  - Use the weighted sum of these values to create a formula for the expected card value across all cases
                  - Cancel out the terms using Pascal's triangle to break down the more complex ones: (nk) = (n-1k-1) + (n-1k)
Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4386
    • View Profile
    • WanderingWinder YouTube Page
Re: A theorem about drawing and density
« Reply #51 on: March 12, 2012, 11:01:45 am »
0

Well, sort of. It's unchanged from before you play the ventures to after you play the ventures, on average, assuming you don't have other ventures or banks or special treasures in your draw deck, assuming you don't reshuffle. Okay, all of these are are actually significant assumptions (that make it unclear as to whether playing the ventures when you don't need the money is good or not), but it's still something.

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: A theorem about drawing and density
« Reply #52 on: March 12, 2012, 12:09:03 pm »
0

Well, sort of. It's unchanged from before you play the ventures to after you play the ventures, on average, assuming you don't have other ventures or banks or special treasures in your draw deck, assuming you don't reshuffle. Okay, all of these are are actually significant assumptions (that make it unclear as to whether playing the ventures when you don't need the money is good or not), but it's still something.

The main point is that you shouldn't automatically play Venture in an attempt to improve future hands.  Assuming you have no use for additional treasure (so, no HoP or Loan) or the $1 from Venture, the effect of Venture is deck cycling.  The decision of whether or not to play Venture in that case is similar to the decision of whether or not to play Smithy when it can't draw anything to help your current hand.
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: A theorem about drawing and density
« Reply #53 on: March 12, 2012, 12:13:38 pm »
+2

I still haven't really understood the term "unchanged". "Unchanged" with respect to what? To not playing the Venture?

It seems that can not really be, because the Venture does not stop at a random card, but at a Treasure. So if you have an empty discard, a Venture in hand and a draw-deck of 99 Estates and a Gold, the probability that you will draw a Gold next turn without playing the Venture is 5%. When you play the Venture, the probability of drawing the Gold is a lot smaller, because if you don't reshuffle during drawing your next hand, it's exactly 0%. And even if you reshuffle, which has a probability of 5% (namely if your ventured Gold is on positions 96-100) it's smaller than 5% (namely if your Gold in the next reshuffle is on positions 1-5 [it's smaller because depending on which position the ventured Gold was, you have fewer spots).
So the probability of drawing the Gold next turn, given you play the Venture this turn is smaller than 0.05*0.05 = 0.25%

And that's not because I just have on treasure, you could do the same thing with 98 Estates, 2 Golds and the probability that you draw 2 Golds next turn:
Without Venture probability of drawing 2 Golds next turn is 5/100*4/99.
With Venture to draw 2 Golds, I need to trigger a reshuffle, that is both Golds have to be behind position 95, which has prob 5/100*4/99. Then after the Venture, I'm guaranteed to have the second Gold in hand, but I also need to redraw the first Gold again, which again has probability smaller than 5/100, which gives probability 5/100*5/100*4/99 to this event.

So the "thing" that didn't change (given you don't reshuffle) is the distribution of your cards minus a random Treasure.

And to rate if you want to play an unneeded Venture, these are the two important things: a) Which non-treasure cards are left in my draw, and do I want to play them? b) Which treasure cards are left in my draw deck, and do I want to play them?

Ok, that sounds like it's only thing, and maybe it is. Of course Treasures and non-Treasure act differently, because the less Treasures in my deck, the more other cards I skip (on average).

Edit: Or, what (an unneeded and uninformed) Venture does is to move you a random number of positions forward in your deck, at the cost of a random Treasure. Otherwise it does not change the distribution.
« Last Edit: March 12, 2012, 12:17:20 pm by DStu »
Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4386
    • View Profile
    • WanderingWinder YouTube Page
Re: A theorem about drawing and density
« Reply #54 on: March 12, 2012, 12:25:47 pm »
0

I still haven't really understood the term "unchanged". "Unchanged" with respect to what? To not playing the Venture?
Yes, but it's the *average* money per card left in the deck. You also need to have at least two treasures, so that's going to knock the single gold example out. So, we go to your second example and say that, before you played this venture, your average money per card was $6/100 cards = $0.06. After playing the venture, it's going to be the same, $0.06, on weighted average, ignoring reshuffle. Now, of course, dominion is discrete, not continuous, so this $0.06 number is preposterous - you either have 0 in your hand, or $3, or $6. And I'd much rather have $8 10% of the time than $.8 100% of the time. So the whole finding the average value actually breaks down; you need to find what the distribution (not the average) is on a per-hand basis, like you say, for actually playing the game. The average is only a rule of thumb, a quick, easy-to-calculate approximation, which works decently well when your variance is low. But with high variance, toss it out the window.

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: A theorem about drawing and density
« Reply #55 on: March 12, 2012, 12:55:52 pm »
+1

The code I posted earlier in the thread looked at variance as well.  It showed that, over a million trials, Venture does not impact the average coin value of your next hand or the variance of your next hand for the draw pile I tested.  Is there some other metric we should look at apart from mean and variance?

I just re-ran the simulation with a deck containing 6 coppers and 1000 dead cards.  It's the same story.  No change to average coin value, and no change to variance after playing Venture.

We have to be a little careful considering decks with fewer than 6 treasures, since there are cases where the next hand could cause a reshuffle.  It's not really worth considering what happens after the reshuffle, because at that point you're looking at the benefits of cycling not of filtering.

Venture will nearly always change the next hand that you draw in one way or another.  It does so unpredictably, though, (when played blindly) and on average it won't change the quality of the next hand.
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: A theorem about drawing and density
« Reply #56 on: March 12, 2012, 12:58:17 pm »
0

Ok thanks, I can believe that, because the average money of the deck without everything up to an average treasure should be the same as the average money of the deck, given you have at least two treasures in the deck.

:e @ecq: It looked at the variance, and while it may not change, it is nevertheless important. Because as WW said, if it is low, average coin value is a good measure, if it is high, it is not.

:e2 @ecq again: I'm just guessing at the moment, but it might be that with n+1 treasures of the same type in a deck, a played Venture does not change the distribution of n-tupels of the deck. At least it's true for n=0 (trivially), n=1 is I think also true. I mean with just Coppers and Estates we are talking about Bernoulli variables, they are fully characterized by their mean. If we add Silvers that might change...
From there on I'm just on my intuition, and I don't want to prove, but it might be true. In that case, if you had 6 Coppers, the distribution of a hand would not change on average...
« Last Edit: March 12, 2012, 01:10:32 pm by DStu »
Logged

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: A theorem about drawing and density
« Reply #57 on: March 12, 2012, 01:03:59 pm »
0

:e @ecq: It looked at the variance, and while it may not change, it is nevertheless important. Because as WW said, if it is low, average coin value is a good measure, if it is high, it is not.

What's a better measure?  Number of $8 hands?  Could you give me a sample draw pile containing at least 6 treasure cards and a metric?
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: A theorem about drawing and density
« Reply #58 on: March 12, 2012, 01:11:27 pm »
0

What's a better measure?  Number of $8 hands?  Could you give me a sample draw pile containing at least 6 treasure cards and a metric?

Quote from: me edited after your post
:e2 @ecq again: I'm just guessing at the moment, but it might be that with n+1 treasures of the same type in a deck, a played Venture does not change the distribution of n-tupels of the deck. At least it's true for n=0 (trivially), n=1 is I think also true. I mean with just Coppers and Estates we are talking about Bernoulli variables, they are fully characterized by their mean. If we add Silvers that might change...
From there on I'm just on my intuition, and I don't want to prove, but it might be true. In that case, if you had 6 Coppers, the distribution of a hand would not change on average...

If my guess is right then no.
Logged

O

  • Jester
  • *****
  • Offline Offline
  • Posts: 836
  • Respect: +605
    • View Profile
Re: A theorem about drawing and density
« Reply #59 on: March 12, 2012, 01:16:57 pm »
+1

This is all a bit too theoretical to be practical. What's being ignored is that if you have the option of not playing venture and retaining the same buy (so, in the majority of cases, 8$ pre-venture, so a 10+ hand), your current hand value is probably a significant enough outlier to make the average value of you hand+discard greater than the average value of your draw pile. Frequently (but not always) this is more important than the effect of the remaining green that you will add to your deck this shuffle, making it advantageous to play.

It's the same as with BM+8$+un-played smithy. If Bm+8$ +Smithy isn't significantly above your mean hand value in a province game, you probably already played incorrectly. So you play the smithy for the decrease in expected turns until you see it and the 8$ in coins again (assuming no reshuffle is triggered), and this is a more prevalent factor than the greening effect.

This obviously isn't picked up in the venture + 6 copper + 1000 dead cards simulation.
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4074
  • Respect: +2624
    • View Profile
Re: A theorem about drawing and density
« Reply #60 on: March 12, 2012, 01:26:57 pm »
0

Quote
What's being ignored is that if you have the option of not playing venture and retaining the same buy (so, in the majority of cases, 8$ pre-venture, so a 10+ hand), your current hand value is probably a significant enough outlier to make the average value of you hand+discard greater than the average value of your draw pile. Frequently (but not always) this is more important than the effect of the remaining green that you will add to your deck this shuffle, making it advantageous to play.

The result suggests that you can make card management decisions without worrying about the effect on your mean card value.
Logged

O

  • Jester
  • *****
  • Offline Offline
  • Posts: 836
  • Respect: +605
    • View Profile
Re: A theorem about drawing and density
« Reply #61 on: March 12, 2012, 01:35:50 pm »
0

Quote
What's being ignored is that if you have the option of not playing venture and retaining the same buy (so, in the majority of cases, 8$ pre-venture, so a 10+ hand), your current hand value is probably a significant enough outlier to make the average value of you hand+discard greater than the average value of your draw pile. Frequently (but not always) this is more important than the effect of the remaining green that you will add to your deck this shuffle, making it advantageous to play.

The result suggests that you can make card management decisions without worrying about the effect on your mean card value.

This is where I'm a bit confused. By "mean card value" do you mean "mean card value of the rest of this particular shuffle"? That makes the most sense to me but once again seems still situational since the card value is discrete, as WanderingWinder pointed out. Unless you mean it has no effect even when considering discreteness, which is more interesting.
Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4386
    • View Profile
    • WanderingWinder YouTube Page
Re: A theorem about drawing and density
« Reply #62 on: March 12, 2012, 01:45:56 pm »
0

:e @ecq: It looked at the variance, and while it may not change, it is nevertheless important. Because as WW said, if it is low, average coin value is a good measure, if it is high, it is not.
What's a better measure?  Number of $8 hands?  Could you give me a sample draw pile containing at least 6 treasure cards and a metric?

Draw deck:
5 copper
3 silver
2 gold
6 dead cards
(I don't know what point I'm trying to prove here, just trying to make the numbers look possible)

Give me, if you can, the distribution of money production in the next hand, i.e. what proportion of the time do you have $0,$1,$2,$3...... up through the highest amount (I guess $12). Also, how many trials you ran it for.
Edit: If you want to be really awesome, calculate the next 2 hands (I guess you need to add like a copper to do that...)

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: A theorem about drawing and density
« Reply #63 on: March 12, 2012, 02:18:25 pm »
+2

I *do* want to be really awesome!

5 million trials.  Draw deck was what you posted, except with 6 coppers to guarantee no reshuffles.

Here's the histogram twice.  The first contains the total number of hands at each coin value.  The second contains the percentage of hands at each value.

Code: [Select]
             Coin value |      0 |      1 |      2 |      3 |      4 |      5 |      6 |      7 |      8 |      9 |     10 |     11 |     12 |     13
  Next hand, no Venture |   4861 |  72618 | 278339 | 558143 | 860531 | 974781 | 912324 | 683080 | 392355 | 186457 |  61022 |  14700 |    789 |      0
Second hand, no Venture |   4862 |  72079 | 278714 | 558022 | 860659 | 973645 | 914068 | 683957 | 392132 | 185692 |  60838 |  14512 |    820 |      0
     Next hand, Venture |   4833 |  72559 | 279492 | 556025 | 860684 | 975051 | 912807 | 683532 | 393007 | 185622 |  60953 |  14640 |    795 |      0
   Second Hand, Venture |   4682 |  72674 | 278416 | 558581 | 860605 | 974627 | 912308 | 683844 | 392206 | 185923 |  60838 |  14557 |    739 |      0

             Coin value |      0 |      1 |      2 |      3 |      4 |      5 |      6 |      7 |      8 |      9 |     10 |     11 |     12 |     13
  Next hand, no Venture |  0.10% |  1.45% |  5.57% | 11.16% | 17.21% | 19.50% | 18.25% | 13.66% |  7.85% |  3.73% |  1.22% |  0.29% |  0.02% |  0.00%
Second hand, no Venture |  0.10% |  1.44% |  5.57% | 11.16% | 17.21% | 19.47% | 18.28% | 13.68% |  7.84% |  3.71% |  1.22% |  0.29% |  0.02% |  0.00%
     Next hand, Venture |  0.10% |  1.45% |  5.59% | 11.12% | 17.21% | 19.50% | 18.26% | 13.67% |  7.86% |  3.71% |  1.22% |  0.29% |  0.02% |  0.00%
   Second Hand, Venture |  0.09% |  1.45% |  5.57% | 11.17% | 17.21% | 19.49% | 18.25% | 13.68% |  7.84% |  3.72% |  1.22% |  0.29% |  0.01% |  0.00%

Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4386
    • View Profile
    • WanderingWinder YouTube Page
Re: A theorem about drawing and density
« Reply #64 on: March 12, 2012, 02:53:00 pm »
0

Okay, now a couple sets designed to try to have it make a big difference (if it's as easy as you say/it looks; if it takes more than 10 minutes to set up, don't bother):
3 copper, 3 silver, 3 gold, 3 platina, 10 dead cards.
10 copper, 2 platina, 0 dead cards.
Then do each of these with all the numbers getting multiplied by say 100, (i.e. 300 copper, 300 silver...), so that we can see if that makes any difference. The more I think about it, the more I think it doesn't, and the only issues it has are cycling issues, and most of all the reshuffle.

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: A theorem about drawing and density
« Reply #65 on: March 12, 2012, 03:08:23 pm »
0

My bet is also that it doesn't, but not really for the cycling issues. But to exclude cycling issues, you take >10 treasures, and with >10 treasures the distribution of 10 cards is preserved. So probably not only the distribution of treasure on each hand is the same, but probably also the joint distribution of hand1:hand2.

If you take less than 5 treasures, and condition on not reshuffling (by just throwing away everything that triggers a reshuffle), you should see a difference in the hands.

Edit: I rethought this and maybe you can also count it as reshuffling-issue...
« Last Edit: March 12, 2012, 03:39:45 pm by DStu »
Logged

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: A theorem about drawing and density
« Reply #66 on: March 12, 2012, 03:32:43 pm »
0

Here's the decks you asked for.  This time it's 500,000 trials because the big decks were taking a while, so it's slightly less accurate, though still good enough to get the idea.

Code: [Select]
Deck: 3x Platinum, 3x Gold, 3x Silver, 3x Copper, 10x dead

  Total hands by coin value:

               Coin value |      0 |      1 |      2 |      3 |      4 |      5 |      6 |      7 |      8 |      9 |     10 |     11 |     12 |     13 |     14 |     15 |     16 |     17 |     18 |     19 |     20 |     21 |     22
    Next hand, no Venture |   4910 |  11976 |  18861 |  33175 |  35123 |  48489 |  53351 |  49353 |  58999 |  42756 |  43098 |  32980 |  21911 |  20212 |   9686 |   7867 |   3947 |   1557 |   1219 |    302 |    174 |     54 |      0
  Second hand, no Venture |   4685 |  11874 |  18897 |  33359 |  35226 |  48361 |  53826 |  49372 |  58633 |  43043 |  43187 |  33054 |  21746 |  19800 |   9550 |   7742 |   4162 |   1714 |   1247 |    308 |    162 |     52 |      0
       Next hand, Venture |   4757 |  12013 |  18746 |  33118 |  35163 |  48185 |  53475 |  49626 |  58436 |  42796 |  43446 |  33492 |  21825 |  20020 |   9707 |   7755 |   4021 |   1599 |   1288 |    291 |    177 |     64 |      0
     Second Hand, Venture |   4874 |  12164 |  18826 |  33891 |  35000 |  48310 |  53463 |  49301 |  58660 |  42887 |  43169 |  33022 |  21613 |  20201 |   9635 |   7576 |   3989 |   1661 |   1234 |    296 |    170 |     58 |      0

  Percentage of hands by coin value:

               Coin value |      0 |      1 |      2 |      3 |      4 |      5 |      6 |      7 |      8 |      9 |     10 |     11 |     12 |     13 |     14 |     15 |     16 |     17 |     18 |     19 |     20 |     21 |     22
    Next hand, no Venture |  0.98% |  2.40% |  3.77% |  6.63% |  7.02% |  9.70% | 10.67% |  9.87% | 11.80% |  8.55% |  8.62% |  6.60% |  4.38% |  4.04% |  1.94% |  1.57% |  0.79% |  0.31% |  0.24% |  0.06% |  0.03% |  0.01% |  0.00%
  Second hand, no Venture |  0.94% |  2.37% |  3.78% |  6.67% |  7.05% |  9.67% | 10.77% |  9.87% | 11.73% |  8.61% |  8.64% |  6.61% |  4.35% |  3.96% |  1.91% |  1.55% |  0.83% |  0.34% |  0.25% |  0.06% |  0.03% |  0.01% |  0.00%
       Next hand, Venture |  0.95% |  2.40% |  3.75% |  6.62% |  7.03% |  9.64% | 10.70% |  9.93% | 11.69% |  8.56% |  8.69% |  6.70% |  4.37% |  4.00% |  1.94% |  1.55% |  0.80% |  0.32% |  0.26% |  0.06% |  0.04% |  0.01% |  0.00%
     Second Hand, Venture |  0.97% |  2.43% |  3.77% |  6.78% |  7.00% |  9.66% | 10.69% |  9.86% | 11.73% |  8.58% |  8.63% |  6.60% |  4.32% |  4.04% |  1.93% |  1.52% |  0.80% |  0.33% |  0.25% |  0.06% |  0.03% |  0.01% |  0.00%


Deck: 300x Platinum, 300x Gold, 300x Silver, 300x Copper, 1000x dead

  Total hands by coin value:

               Coin value |      0 |      1 |      2 |      3 |      4 |      5 |      6 |      7 |      8 |      9 |     10 |     11 |     12 |     13 |     14 |     15 |     16 |     17 |     18 |     19 |     20 |     21 |     22 |     23 |     24 |     25 |     26
    Next hand, no Venture |   9547 |  14433 |  23064 |  34667 |  34385 |  49469 |  48603 |  47921 |  50568 |  38480 |  39471 |  31090 |  22561 |  20317 |  11385 |   9813 |   5845 |   3284 |   2716 |    909 |    852 |    373 |    115 |    108 |      0 |     24 |      0
  Second hand, no Venture |   9502 |  14636 |  23216 |  34279 |  34366 |  49279 |  48874 |  47579 |  50784 |  38572 |  39768 |  30530 |  22699 |  20116 |  11323 |  10024 |   5992 |   3312 |   2689 |   1018 |    856 |    334 |    127 |    103 |      0 |     22 |      0
       Next hand, Venture |   9558 |  14412 |  23231 |  34478 |  34525 |  49298 |  48560 |  47603 |  50959 |  38541 |  39699 |  30776 |  22642 |  20174 |  11285 |   9901 |   5988 |   3316 |   2694 |    912 |    824 |    380 |    111 |    112 |      0 |     21 |      0
     Second Hand, Venture |   9623 |  14626 |  23087 |  34725 |  34343 |  49423 |  48484 |  47678 |  50740 |  38078 |  39770 |  30644 |  22816 |  20093 |  11506 |   9971 |   5968 |   3292 |   2742 |    936 |    873 |    325 |    106 |    120 |      0 |     31 |      0

  Percentage of hands by coin value:

               Coin value |      0 |      1 |      2 |      3 |      4 |      5 |      6 |      7 |      8 |      9 |     10 |     11 |     12 |     13 |     14 |     15 |     16 |     17 |     18 |     19 |     20 |     21 |     22 |     23 |     24 |     25 |     26
    Next hand, no Venture |  1.91% |  2.89% |  4.61% |  6.93% |  6.88% |  9.89% |  9.72% |  9.58% | 10.11% |  7.70% |  7.89% |  6.22% |  4.51% |  4.06% |  2.28% |  1.96% |  1.17% |  0.66% |  0.54% |  0.18% |  0.17% |  0.07% |  0.02% |  0.02% |  0.00% |  0.00% |  0.00%
  Second hand, no Venture |  1.90% |  2.93% |  4.64% |  6.86% |  6.87% |  9.86% |  9.77% |  9.52% | 10.16% |  7.71% |  7.95% |  6.11% |  4.54% |  4.02% |  2.26% |  2.00% |  1.20% |  0.66% |  0.54% |  0.20% |  0.17% |  0.07% |  0.03% |  0.02% |  0.00% |  0.00% |  0.00%
       Next hand, Venture |  1.91% |  2.88% |  4.65% |  6.90% |  6.91% |  9.86% |  9.71% |  9.52% | 10.19% |  7.71% |  7.94% |  6.16% |  4.53% |  4.03% |  2.26% |  1.98% |  1.20% |  0.66% |  0.54% |  0.18% |  0.16% |  0.08% |  0.02% |  0.02% |  0.00% |  0.00% |  0.00%
     Second Hand, Venture |  1.92% |  2.93% |  4.62% |  6.95% |  6.87% |  9.88% |  9.70% |  9.54% | 10.15% |  7.62% |  7.95% |  6.13% |  4.56% |  4.02% |  2.30% |  1.99% |  1.19% |  0.66% |  0.55% |  0.19% |  0.17% |  0.07% |  0.02% |  0.02% |  0.00% |  0.01% |  0.00%


Deck: 2x Platinum, 10x Copper

  Total hands by coin value:

               Coin value |      0 |      1 |      2 |      3 |      4 |      5 |      6 |      7 |      8 |      9 |     10 |     11 |     12 |     13 |     14
    Next hand, no Venture |      0 |      0 |      0 |      0 |      0 | 158923 |      0 |      0 |      0 | 265084 |      0 |      0 |      0 |  75993 |      0
  Second hand, no Venture |      0 |      0 |      0 |      0 |      0 | 159042 |      0 |      0 |      0 | 265094 |      0 |      0 |      0 |  75864 |      0
       Next hand, Venture |      0 |      0 |      0 |      0 |      0 | 158997 |      0 |      0 |      0 | 265351 |      0 |      0 |      0 |  75652 |      0
     Second Hand, Venture |      0 |      0 |      0 |      0 |      0 | 158954 |      0 |      0 |      0 | 265035 |      0 |      0 |      0 |  76011 |      0

  Percentage of hands by coin value:

               Coin value |      0 |      1 |      2 |      3 |      4 |      5 |      6 |      7 |      8 |      9 |     10 |     11 |     12 |     13 |     14
    Next hand, no Venture |  0.00% |  0.00% |  0.00% |  0.00% |  0.00% | 31.78% |  0.00% |  0.00% |  0.00% | 53.02% |  0.00% |  0.00% |  0.00% | 15.20% |  0.00%
  Second hand, no Venture |  0.00% |  0.00% |  0.00% |  0.00% |  0.00% | 31.81% |  0.00% |  0.00% |  0.00% | 53.02% |  0.00% |  0.00% |  0.00% | 15.17% |  0.00%
       Next hand, Venture |  0.00% |  0.00% |  0.00% |  0.00% |  0.00% | 31.80% |  0.00% |  0.00% |  0.00% | 53.07% |  0.00% |  0.00% |  0.00% | 15.13% |  0.00%
     Second Hand, Venture |  0.00% |  0.00% |  0.00% |  0.00% |  0.00% | 31.79% |  0.00% |  0.00% |  0.00% | 53.01% |  0.00% |  0.00% |  0.00% | 15.20% |  0.00%


Deck: 200x Platinum, 1000x Copper

  Total hands by coin value:

               Coin value |      0 |      1 |      2 |      3 |      4 |      5 |      6 |      7 |      8 |      9 |     10 |     11 |     12 |     13 |     14 |     15 |     16 |     17 |     18 |     19 |     20 |     21 |     22 |     23 |     24 |     25 |     26
    Next hand, no Venture |      0 |      0 |      0 |      0 |      0 | 200453 |      0 |      0 |      0 | 201531 |      0 |      0 |      0 |  80374 |      0 |      0 |      0 |  16024 |      0 |      0 |      0 |   1555 |      0 |      0 |      0 |     63 |      0
  Second hand, no Venture |      0 |      0 |      0 |      0 |      0 | 200667 |      0 |      0 |      0 | 201323 |      0 |      0 |      0 |  80491 |      0 |      0 |      0 |  15867 |      0 |      0 |      0 |   1593 |      0 |      0 |      0 |     59 |      0
       Next hand, Venture |      0 |      0 |      0 |      0 |      0 | 200165 |      0 |      0 |      0 | 201823 |      0 |      0 |      0 |  80386 |      0 |      0 |      0 |  15991 |      0 |      0 |      0 |   1570 |      0 |      0 |      0 |     65 |      0
     Second Hand, Venture |      0 |      0 |      0 |      0 |      0 | 200995 |      0 |      0 |      0 | 201436 |      0 |      0 |      0 |  80013 |      0 |      0 |      0 |  15977 |      0 |      0 |      0 |   1507 |      0 |      0 |      0 |     72 |      0

  Percentage of hands by coin value:

               Coin value |      0 |      1 |      2 |      3 |      4 |      5 |      6 |      7 |      8 |      9 |     10 |     11 |     12 |     13 |     14 |     15 |     16 |     17 |     18 |     19 |     20 |     21 |     22 |     23 |     24 |     25 |     26
    Next hand, no Venture |  0.00% |  0.00% |  0.00% |  0.00% |  0.00% | 40.09% |  0.00% |  0.00% |  0.00% | 40.31% |  0.00% |  0.00% |  0.00% | 16.07% |  0.00% |  0.00% |  0.00% |  3.20% |  0.00% |  0.00% |  0.00% |  0.31% |  0.00% |  0.00% |  0.00% |  0.01% |  0.00%
  Second hand, no Venture |  0.00% |  0.00% |  0.00% |  0.00% |  0.00% | 40.13% |  0.00% |  0.00% |  0.00% | 40.26% |  0.00% |  0.00% |  0.00% | 16.10% |  0.00% |  0.00% |  0.00% |  3.17% |  0.00% |  0.00% |  0.00% |  0.32% |  0.00% |  0.00% |  0.00% |  0.01% |  0.00%
       Next hand, Venture |  0.00% |  0.00% |  0.00% |  0.00% |  0.00% | 40.03% |  0.00% |  0.00% |  0.00% | 40.36% |  0.00% |  0.00% |  0.00% | 16.08% |  0.00% |  0.00% |  0.00% |  3.20% |  0.00% |  0.00% |  0.00% |  0.31% |  0.00% |  0.00% |  0.00% |  0.01% |  0.00%
     Second Hand, Venture |  0.00% |  0.00% |  0.00% |  0.00% |  0.00% | 40.20% |  0.00% |  0.00% |  0.00% | 40.29% |  0.00% |  0.00% |  0.00% | 16.00% |  0.00% |  0.00% |  0.00% |  3.20% |  0.00% |  0.00% |  0.00% |  0.30% |  0.00% |  0.00% |  0.00% |  0.01% |  0.00%
Logged

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: A theorem about drawing and density
« Reply #67 on: March 12, 2012, 05:35:02 pm »
0

I still haven't really understood the term "unchanged". "Unchanged" with respect to what? To not playing the Venture?

It seems that can not really be, because the Venture does not stop at a random card, but at a Treasure. So if you have an empty discard, a Venture in hand and a draw-deck of 99 Estates and a Gold, the probability that you will draw a Gold next turn without playing the Venture is 5%. When you play the Venture, the probability of drawing the Gold is a lot smaller, because if you don't reshuffle during drawing your next hand, it's exactly 0%. And even if you reshuffle, which has a probability of 5% (namely if your ventured Gold is on positions 96-100) it's smaller than 5% (namely if your Gold in the next reshuffle is on positions 1-5 [it's smaller because depending on which position the ventured Gold was, you have fewer spots).
So the probability of drawing the Gold next turn, given you play the Venture this turn is smaller than 0.05*0.05 = 0.25%

And that's not because I just have on treasure, you could do the same thing with 98 Estates, 2 Golds and the probability that you draw 2 Golds next turn:
Without Venture probability of drawing 2 Golds next turn is 5/100*4/99.
With Venture to draw 2 Golds, I need to trigger a reshuffle, that is both Golds have to be behind position 95, which has prob 5/100*4/99. Then after the Venture, I'm guaranteed to have the second Gold in hand, but I also need to redraw the first Gold again, which again has probability smaller than 5/100, which gives probability 5/100*5/100*4/99 to this event.

So the "thing" that didn't change (given you don't reshuffle) is the distribution of your cards minus a random Treasure.

And to rate if you want to play an unneeded Venture, these are the two important things: a) Which non-treasure cards are left in my draw, and do I want to play them? b) Which treasure cards are left in my draw deck, and do I want to play them?

Ok, that sounds like it's only thing, and maybe it is. Of course Treasures and non-Treasure act differently, because the less Treasures in my deck, the more other cards I skip (on average).

Edit: Or, what (an unneeded and uninformed) Venture does is to move you a random number of positions forward in your deck, at the cost of a random Treasure. Otherwise it does not change the distribution.

I ran some tests, and it turns out that Venture is actually quite bad for hands on the shuffle boundary in a greening deck.  I'll try to put together a write-up of the results later (no time now), but basically what DStu says here is correct.  Venture hurts your chances of seeing two treasures in the same hand.

I'm sure this will all be further complicated by the fact that bad hands on the shuffle boundary are a good thing in Dominion.
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: A theorem about drawing and density
« Reply #68 on: March 12, 2012, 06:15:51 pm »
+1

Lots of good discussion here. I'd just add that the (non-)effect of Venture on the next hand in ecq's simulation is explained by imagining that Venture draws from the bottom of the deck rather than the top. If you don't know your deck order, this is equivalent to how it actually works. With this viewpoint, it's clear that if you have at least 6 treasures in your draw deck, then Venture doesn't change your next hand. In fact, if you have 11 treasures in your draw deck, it doesn't change your next two hands, and so on. (By "doesn't change" here, I mean that the probability of drawing any particular hand is the same.)

That viewpoint (imagining Venture draws from the bottom of the deck) doesn't prove the density result, and it doesn't follow from the density result either. It's a different fact that also suggests that Venture does not help much with sifting.

For this reason, I think that the only consideration is the effect of reshuffles. (But this can be big!)

One other thing: since the cases where you don't want to play Venture are going to be pretty rare, I think the implications here are mostly strategic. For example, in the thread on Venture, there was originally a suggestion that Venture goes well with green-heavy decks due to a claimed sifting effect. If there actually is no sifting effect (as seems to be the case), then there's no reason to expect Venture to be good in a green-heavy deck.
« Last Edit: March 12, 2012, 06:24:55 pm by blueblimp »
Logged

O

  • Jester
  • *****
  • Offline Offline
  • Posts: 836
  • Respect: +605
    • View Profile
Re: A theorem about drawing and density
« Reply #69 on: March 12, 2012, 07:04:50 pm »
0

Lots of good discussion here. I'd just add that the (non-)effect of Venture on the next hand in ecq's simulation is explained by imagining that Venture draws from the bottom of the deck rather than the top. If you don't know your deck order, this is equivalent to how it actually works. With this viewpoint, it's clear that if you have at least 6 treasures in your draw deck, then Venture doesn't change your next hand. In fact, if you have 11 treasures in your draw deck, it doesn't change your next two hands, and so on. (By "doesn't change" here, I mean that the probability of drawing any particular hand is the same.)

That viewpoint (imagining Venture draws from the bottom of the deck) doesn't prove the density result, and it doesn't follow from the density result either. It's a different fact that also suggests that Venture does not help much with sifting.

For this reason, I think that the only consideration is the effect of reshuffles. (But this can be big!)

One other thing: since the cases where you don't want to play Venture are going to be pretty rare, I think the implications here are mostly strategic. For example, in the thread on Venture, there was originally a suggestion that Venture goes well with green-heavy decks due to a claimed sifting effect. If there actually is no sifting effect (as seems to be the case), then there's no reason to expect Venture to be good in a green-heavy deck.

Assuming, of course, that non-venture treasures remain in large. 8 Ventures in a green heavy deck with no other treasures is a helluva lot better than 8 silvers (and often 8 gold). The point to be made here is not that a combo-venture-deck does particularly well in a green-heavy deck: it's that it really doesn't do any worse than in a non-green deck, which is hard to say about most cards.
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4074
  • Respect: +2624
    • View Profile
Re: A theorem about drawing and density
« Reply #70 on: March 12, 2012, 08:46:38 pm »
0

Quote
For example, in the thread on Venture, there was originally a suggestion that Venture goes well with green-heavy decks due to a claimed sifting effect. If there actually is no sifting effect (as seems to be the case), then there's no reason to expect Venture to be good in a green-heavy deck.

I think there is already confusion here and I suggest avoiding this line of reasoning as it will be a distraction. A cellar does not change the distribution of the (remainder of) the draw deck when you play it but it is clearly better in a green-heavy deck. You are not fully assessing the value of the venture in the current hand due to the cards in play and cards discarded.
« Last Edit: March 12, 2012, 08:50:46 pm by DG »
Logged

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: A theorem about drawing and density
« Reply #71 on: March 12, 2012, 10:22:01 pm »
+1

Ok, as promised...

I started simulating what happens at the reshuffle.  Since we're interested in testing the filtering effect of Venture, I only shuffled in cards that were in the original draw pile.  I didn't shuffle in Venture itself, whatever was in the Venture hand, or any buys or previous hands.  All of that stuff would be there in reality, but it seems irrelevant when looking for a filtering effect.

Let T be the number of treasures, and D be the number of non-treasure draws (dead cards).  The expected number of cards that Venture draws is (T + D + 1) / (T + 1).

I construct a deck with 3 treasures and 8 dead cards.  We expect Venture will draw 3 cards in this case.  Because of this, we'll compare it to a Smithy when running the numbers.

That math has been eating at me for a while.  Let's say all the treasures are Copper.  We expect that Venture's draw has a value of $1/3 per card, but the deck's average card value is $3/11.

On to the experiments:

First, we take a deck containing a Platinum, a Gold, a Copper, and 8 dead cards.  We look at the next two hands in if we draw them normally, if we play a Smithy this turn, and if we play a Venture this turn.

Code: [Select]
Deck: 1x Platinum, 1x Gold, 1x Copper, 8x dead

Percentage of hands by coin value (500000 trials):

          Coin value |      0 |      1 |      2 |      3 |      4 |      5 |      6 |      7 |      8 |      9 |     10
   Next hand, normal | 12.17% | 15.09% |  0.00% | 15.14% | 12.16% | 15.06% | 12.23% |  0.00% | 12.11% |  6.03% |  0.00%
 Second hand, normal | 12.14% | 15.11% |  0.00% | 15.23% | 12.09% | 15.11% | 12.14% |  0.00% | 12.11% |  6.07% |  0.00%
  Next hand, Venture | 12.07% | 15.25% |  0.00% | 15.09% | 13.79% | 15.12% | 13.76% |  0.00% | 13.74% |  1.18% |  0.00%
Second hand, Venture | 16.91% | 16.95% |  0.00% | 17.12% |  9.59% | 17.05% |  9.68% |  0.00% |  9.64% |  3.07% |  0.00%
   Next hand, Smithy | 12.16% | 15.17% |  0.00% | 15.21% | 12.07% | 15.13% | 12.15% |  0.00% | 12.09% |  6.02% |  0.00%
 Second hand, Smithy | 12.00% | 15.11% |  0.00% | 15.17% | 12.13% | 15.19% | 12.22% |  0.00% | 12.11% |  6.07% |  0.00%

The normal hands and Smithy hands all have comparable coin values.  The next Venture hands are significantly worse.  I strongly suspect that it's only the reshuffle hand that's worse on average.  Note that the hand after Venture is almost as good, and that hand is also the least likely to trigger a reshuffle.

In a normal game, though, having a crappy hand at the reshuffle is a good thing.  Let's try a different experiment.  This time, we'll construct two decks.  The first deck contains 6 Coppers, 14 dead cards, and 1 Silver.  The second is the same, but it contains a Venture instead of the Silver.  Note that the Venture will always be worth as much as the Silver.  We'll run through those decks a bunch of times and check the distribution of hand values drawn.

Code: [Select]
Deck 1: 14x dead, 6x Copper, 1x Silver
Deck 2: 14x dead, 6x Copper, 1x Venture

Percentage of hands by coin value (5000000 turns):

Coin value |      0 |      1 |      2 |      3 |      4 |      5 |      6 |      7
    Deck 1 |  9.84% | 29.51% | 31.74% | 19.68% |  7.75% |  1.41% |  0.07% |  0.00%
    Deck 2 |  9.87% | 29.35% | 31.49% | 19.82% |  7.93% |  1.46% |  0.08% |  0.00%

Those numbers are interesting.  With that many trials, I think the percentages indicate a legitimate difference that can be chalked up to Venture's filtering; however, it's imperceptibly small.  Venture gets ever so slightly better hands.

Let's try it again, this time with a 20-card deck so that nothing misses the shuffle in the Silver deck:
Code: [Select]
Deck 1: 6x Copper, 13x dead, 1x Silver
Deck 2: 6x Copper, 13x dead, 1x Venture

Percentage of hands by coin value (5000000 turns):

Coin value |      0 |      1 |      2 |      3 |      4 |      5 |      6 |      7
    Deck 1 |  8.28% | 27.69% | 32.29% | 21.13% |  8.79% |  1.72% |  0.10% |  0.00%
    Deck 2 |  8.37% | 27.55% | 31.91% | 21.16% |  9.10% |  1.81% |  0.10% |  0.00%

Similar results.  Venture gets ever-so-slightly better hands.

Finally, let's look at a more realistic deck, where Venture has an average value of $3 and replaces a Gold.

Code: [Select]
Deck: 3x Copper, 5x dead, 4x Gold, 3x Silver
Deck: 5x dead, 3x Copper, 3x Gold, 3x Silver, 1x Venture

Percentage of hands by coin value (5000000 turns):

Coin value |      0 |      1 |      2 |      3 |      4 |      5 |      6 |      7 |      8 |      9 |     10 |     11 |     12 |     13 |     14 |     15
    Deck 1 |  0.03% |  0.50% |  1.51% |  4.01% |  8.00% | 11.46% | 16.47% | 16.57% | 15.49% | 12.41% |  7.19% |  4.20% |  1.57% |  0.50% |  0.10% |  0.00%
    Deck 2 |  0.04% |  0.51% |  1.56% |  4.13% |  7.88% | 11.69% | 15.86% | 16.59% | 15.38% | 12.06% |  7.78% |  4.10% |  1.80% |  0.52% |  0.11% |  0.00%

That one is more complex.  Venture is beneficial depending on your target treasure value.

Before anyone says it, I've run these trials multiple times with a few different parameters, and the results are consistent with one another to the point that I'm convinced we're not looking at statistical noise.

Conclusion:

Because of the expected value formula, we expect Venture to draw cards that are worth more than the average value from the draw pile.  Simulations show this to be the case.  Venture is sending better-than-average cards to the discard, filtering in the wrong direction.  You don't notice the effect until you reach the end of the draw pile, though.  At the reshuffle, you tend to draw a slightly worse hand.

There's another side of this.  Venture, being a card that draws, is more likely to miss the reshuffle.  It's also a better than average treasure by definition. 

In Dominion, it's a good thing to have bad hands miss the reshuffle.  It's a bad thing to have better than average treasures miss the reshuffle.  These effects nearly cancel each other out if you always play Venture.  There is an slight difference in hand values that you'd never notice in practice.

I'd be really interested in someone explaining the math of what happens near the reshuffle point.  It's been way too long since I've done any statistics work.
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4074
  • Respect: +2624
    • View Profile
Re: A theorem about drawing and density
« Reply #72 on: March 12, 2012, 11:36:01 pm »
0

Quote
I'd be really interested in someone explaining the math of what happens near the reshuffle point.  It's been way too long since I've done any statistics work.

If there are no treasures left in the draw deck after a venture is played then our current measure of quality, mean card value, is no longer relevant. There will either be no cards in the draw deck so there is no mean, or there are a number of victory cards in the draw deck with mean value of zero and we'd far rather count these cards instead. Perhaps your simulation could count the number of victory cards in the hand carried over the reshuffle and see whether this is a venture advantage. Another useful total to simulate might be the hand values based on the number of treasures remaining in the deck when a venture is played . 

Shuffle maths is very complicated since you have to consider the number of cards drawn before and after the reshuffle, the distribution of the draw pile and the distribution of the discard pile, any adjustments for extra card drawing, size and expansion of decks, etc. There's also a consideration that cards missing one shuffle are ready in the discard pile for the next shuffle along with any cards gained with that hand. If you're wanting to derive the quality and quantity of gained cards between each shuffle and feed those into the new draw deck then this adds further complications and dependencies. I've yet to see anyone put any meaningful maths together regarding shuffles except for chancellors.

Quote
Finally, let's look at a more realistic deck, where Venture has an average value of $3 and replaces a Gold.

You're looking at the hand value of a venture and this is not necessarily the same as a deck value of a venture. You need to compare without shuffles the value of the venture deck with the value of the control deck to confirm the venture is equivalent to the card it is replacing.
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: A theorem about drawing and density
« Reply #73 on: March 13, 2012, 02:09:09 am »
0

So just look at this first:
Quote
Code: [Select]
Next hand, Venture | 12.07% | 15.25% |  0.00% | 15.09% | 13.79% | 15.12% | 13.76% |  0.00% | 13.74% |  1.18% |  0.00%
Second hand, Venture | 16.91% | 16.95% |  0.00% | 17.12% |  9.59% | 17.05% |  9.68% |  0.00% |  9.64% |  3.07% |  0.00%
It seems that in this example, playing Venture slightly increases the chance of having 2 treasure in the next hand ($8, $6, $4), and a little bit more decreases it in the next to next hand. It decreases the chance of having 3 treasures in both hands.
And it increases the chance of having 0 or 1 treasure in the second hand.

Why is that the case? I think 3 treasures is easy, to get 3 treasures in the next hand you actually need to trigger the reshuffle with Venture, and directly redraw the discarded Treasure. To get 3 treasures in the second hand... you may have no treasures in your next hand. That means you have to Venture has to be played in such a way that the second hand triggers a reshuffle, there are no treasures in the next 5 cards, and you directly redraw the discarded Treasure.
I think the part behind the and in both parts is what drops the probability.  Seems in line with what i calculated at the beginning of this page.

For having 2 treasures in hand ... In the next hand that's just the lost percentages of having three treasures in hand, that gets distributed to the 2 treasure hands.
Logged

MasterAir

  • Alchemist
  • ***
  • Offline Offline
  • Posts: 39
  • Respect: +8
    • View Profile
Re: A theorem about drawing and density
« Reply #74 on: March 13, 2012, 05:02:44 am »
0

Slightly off topic, but another good thing about venture in a greening deck is if Venture is played with only dead cards in the draw pile those dead cards miss this shuffle and next shuffle.  (If I'm reading Venture correctly).  Unfortunately, the same is true of action cards, so if they are important to you, you may wish to avoid playing venture.

As an aside, you've convinced me about the mean value of the draw deck, I think the point WanderingWinder makes about the difference between mean value and distribution is very important here.
Logged

Davio

  • 2012 Dutch Champion
  • *
  • Offline Offline
  • Posts: 4787
  • Respect: +3413
    • View Profile
Re: A theorem about drawing and density
« Reply #75 on: March 13, 2012, 09:58:46 am »
0

Anyone else getting a feeling this is being overanalyzed?

Venture > Silver.
And Venture > Gold at some point.
But probably never Venture > Platinum.
Logged

BSG: Cagprezimal Adama
Mage Knight: Arythea

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4386
    • View Profile
    • WanderingWinder YouTube Page
Re: A theorem about drawing and density
« Reply #76 on: March 13, 2012, 10:46:15 am »
0

Yes. And like, you almost always want to play venture because you need the cash anyway.

Though venture CAN be better than platinum (albeit extremely rarely, and not in a deck you're likely to get in a real game)

Davio

  • 2012 Dutch Champion
  • *
  • Offline Offline
  • Posts: 4787
  • Respect: +3413
    • View Profile
Re: A theorem about drawing and density
« Reply #77 on: March 13, 2012, 11:04:40 am »
0

Hence, the probably, meaning 'realistically'.

You could always make a deck with 10 Ventures. One Venture in hand guarantees a Province. With Plat your chain could break.
Logged

BSG: Cagprezimal Adama
Mage Knight: Arythea

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: A theorem about drawing and density
« Reply #78 on: March 13, 2012, 11:09:27 am »
+1

It was a long thread, but I think it's important to understand what cards really do.  For me, it doesn't impact when I'd play Venture.  I'd play it nearly 100% of the time.  It may impact when I'd choose to gain Venture, though.  It'd have a much bigger influence on when I'd choose to play or gain Farming Village.
Logged

DG

  • Governor
  • *****
  • Offline Offline
  • Posts: 4074
  • Respect: +2624
    • View Profile
Re: A theorem about drawing and density
« Reply #79 on: March 13, 2012, 02:48:28 pm »
0

Just to put an another old argument to rest, my proof also holds true for loans. The mean value of the remaining cards in the draw deck is the same after playing a loan as before playing the loan (for a deck of victory cards and basic treasures, at least 2 treasures).
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: A theorem about drawing and density
« Reply #80 on: March 13, 2012, 06:35:35 pm »
0

It was a long thread, but I think it's important to understand what cards really do.  For me, it doesn't impact when I'd play Venture.  I'd play it nearly 100% of the time.  It may impact when I'd choose to gain Venture, though.  It'd have a much bigger influence on when I'd choose to play or gain Farming Village.

This is where I'm coming from too. Also I like math. Hey, I'm a mathematics student, so that's my excuse. =P
Logged

NinjaBus

  • Steward
  • ***
  • Offline Offline
  • Posts: 26
  • Respect: +19
    • View Profile
Re: A theorem about drawing and density
« Reply #81 on: March 25, 2012, 11:10:49 pm »
0

This doesn't seem right. Either I'm misunderstanding what you're arguing or you're claiming that a deck full of farming villages is equal to an identical deck of regular villages. That can't be true.

Take a basic deck of 10 coppers, 5 estates. Now add 5 farming villages. If these were regular villages, your deck would not improve. (In theory, by manipulating shuffles you can actually beat the odds slightly.) You will draw your deck, worth 10$, every three turns. However, farming villages muck that idea up. Since you have a chance at skipping over estates, you will actually be drawing through your deck faster than that. Potentially, you could improve your deck to the point of drawing 10$ in two turns, not 3. That's a significant increase.

Every time you skip over a dead card in your deck you are playing your treasures at a faster rate than you normally would. You're not magically making your future draws better, but your deck is obviously better for it. If you switch out farming villages for ventures the results are identical.
Logged

mnavratil

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 216
  • Respect: +83
    • View Profile
Re: A theorem about drawing and density
« Reply #82 on: March 26, 2012, 09:21:07 am »
+1

This doesn't seem right. Either I'm misunderstanding what you're arguing or you're claiming that a deck full of farming villages is equal to an identical deck of regular villages. That can't be true.

I believe the argument isn't that ventures are equivalent to silver; just that Ventures help your current hand, but do nothing for your future hand(s).
The same applies to farming village. It's better than Village because it helps the current hand. The above proof just shows that it does nothing (on average) for your next hand.
Logged

Deadlock39

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1722
  • Respect: +1758
    • View Profile
Re: A theorem about drawing and density
« Reply #83 on: March 26, 2012, 09:23:13 am »
+1

Ninja'd a bit, but here is my attempt at explanation:

The Farming Villages absolutely improve your deck compared to an identical deck with regular Villages.  The point made in this thread is that playing them does not improve the expected value of your next hand.  What they do is draw you better cards on average this turn.  The average value of your draw deck is unaffected from turn to turn, but the average value of a hand from the Farming Village deck is definitely higher than the average value of a hand from the regular Village deck.

Davio

  • 2012 Dutch Champion
  • *
  • Offline Offline
  • Posts: 4787
  • Respect: +3413
    • View Profile
Re: A theorem about drawing and density
« Reply #84 on: March 26, 2012, 10:56:44 am »
0

Still I think the conclusions are faulty or too simplistic and the main reason is: shuffling.

A deck with 10 Farming Villages will shuffle more often than a deck with 10 Villages.
As we all know, shuffling more often is a good thing. While I don't have hard proof I think the added value of more shuffles in the early and middle game outweighs the negative effects of shuffling in the greening stage.

This makes the whole "the average value of your future hands will not change" a bit moot. It's impractical. You're not buying nothing every turn. You buy stuff and increase your deck power. The easier you see the new stuff, the better.

To summarize I don't agree with the conclusions that have been posted because I firmly believe that the average value of both the current and future hands goes up with Farming Villages or Ventures, just because you shuffle more often. It may not be by much, but it certainly isn't 0.
Logged

BSG: Cagprezimal Adama
Mage Knight: Arythea

ecq

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 224
  • Respect: +162
    • View Profile
Re: A theorem about drawing and density
« Reply #85 on: March 26, 2012, 12:47:08 pm »
+1

Clearly Venture improves future hands if cycling improves future hands.  The question was whether Venture has any filtering effect or if it's purely a cycling effect.

I showed on the previous page that when you take into account shuffling, it does have a miniscule filtering effect, however that effect is not always good for your deck depending on what other treasures you have and what your target hand value is.

To sum up the conclusions:
  - Playing Venture adds $1 plus whatever it draws to your current hand, which is good.
  - Playing Venture draws some cards, increasing the rate at which you cycle, which is usually good.
  - Playing Venture has complicated filtering effects which you can safely ignore.  The only tangible impact it has on your draw pile is making it smaller.
Logged

RiemannZetaJones

  • Thief
  • ****
  • Offline Offline
  • Posts: 90
  • Respect: +62
    • View Profile
Re: A theorem about drawing and density
« Reply #86 on: March 26, 2012, 02:04:14 pm »
+1

This thread has brought to my attention, at least, and to others I suspect, the observation that if you play a card that draws into hand until some trigger is reached (Farming Village, Venture, Margrave etc) and does not return cards to the deck, and if you know that you are not going to deplete your deck to <5 cards by playing it, then it does not change the probability of drawing any of the possible next hands in your draw deck.
Logged

carstimon

  • Golem
  • ****
  • Offline Offline
  • Posts: 194
  • Respect: +115
    • View Profile
Re: A theorem about drawing and density
« Reply #87 on: August 05, 2012, 09:47:22 pm »
+3

This discussion came up again recently in the best $5 card list.  Because of this I wrote a small simulator which plays super basic big money (Prefer to buy province, then gold, then silver).  I also replaced Gold with "Venture3", a treasure which, when played, does exactly what venture does but ignores the treasure; it's always worth $3.  It costs $6.  I also made there be 32 provinces, so that any "cycling ability" of the Venture3 will be exaggerated.

I simulated 5000 games with buying gold, and buying venture3.  Playing with gold took 80.7062 turns on average, playing with Venture3 took 80.847.

Python code attached.  Sorry for the dead thread revival, but I wanted to post this and this seemed like the best place.
« Last Edit: August 05, 2012, 09:48:27 pm by carstimon »
Logged

ftl

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2056
  • Shuffle iT Username: ftl
  • Respect: +1345
    • View Profile
Re: A theorem about drawing and density
« Reply #88 on: August 05, 2012, 10:16:25 pm »
0

Oh, ok. Well, that settles it for me then, venture chains are only special when they chain a lot, not from individual ventures cycling a little, I was wrong before. 
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: A theorem about drawing and density
« Reply #89 on: August 05, 2012, 11:11:38 pm »
0

This discussion came up again recently in the best $5 card list.  Because of this I wrote a small simulator which plays super basic big money (Prefer to buy province, then gold, then silver).  I also replaced Gold with "Venture3", a treasure which, when played, does exactly what venture does but ignores the treasure; it's always worth $3.  It costs $6.  I also made there be 32 provinces, so that any "cycling ability" of the Venture3 will be exaggerated.

I simulated 5000 games with buying gold, and buying venture3.  Playing with gold took 80.7062 turns on average, playing with Venture3 took 80.847.

Python code attached.  Sorry for the dead thread revival, but I wanted to post this and this seemed like the best place.
Nice experiment! I haven't looked at the code yet. My intuition is that 5000 games might not be enough for the difference to be statistically significant.
« Last Edit: August 05, 2012, 11:13:39 pm by blueblimp »
Logged

WanderingWinder

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 5275
  • ...doesn't really matter to me
  • Respect: +4386
    • View Profile
    • WanderingWinder YouTube Page
Re: A theorem about drawing and density
« Reply #90 on: August 05, 2012, 11:37:14 pm »
0

You should probably build up extra rather than going so province happy so early, if you're trying to drain 32

carstimon

  • Golem
  • ****
  • Offline Offline
  • Posts: 194
  • Respect: +115
    • View Profile
Re: A theorem about drawing and density
« Reply #91 on: August 06, 2012, 12:06:04 am »
0

Nice experiment! I haven't looked at the code yet. My intuition is that 5000 games might not be enough for the difference to be statistically significant.
Thanks.  I did it some more and got
venture3: 80.803
gold: 80.5682
venture3: 80.9496
gold: 80.7292
So using the made up "do it many times three times" statistical test it's definitely somewhere in that range.

You should probably build up extra rather than going so province happy so early, if you're trying to drain 32
Probably but I just needed something simple to compare.
Logged
Pages: 1 2 3 4 [All]
 

Page created in 0.141 seconds with 20 queries.