Dominion Strategy Forum

Please login or register.

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

Author Topic: Dominion phase diagrams  (Read 1130 times)

0 Members and 1 Guest are viewing this topic.

trivialknot

  • Witch
  • *****
  • Offline Offline
  • Posts: 464
  • Respect: +675
    • View Profile
Dominion phase diagrams
« on: November 27, 2017, 12:07:44 pm »
+32

In another thread, some people were discussing a theoretical way to define an engine by imagining an infinitely large deck.  Equivalently, we could imagine a deck where we draw cards with replacement--meaning that every time we draw a card, we shuffle a copy of that card into our deck.

I am a condensed matter physicist.  This problem interested me because the transition between big money and an engine is similar to physical phase transitions, such as that between water and ice.

I'd be interested in writing an article that is accessible to a broad audience, but this is not that article.  First I need to figure out what's going on.  And I know there's a lot of math expertise around f.ds, so maybe you can help.

The Laboratory engine

Suppose we have a deck with just Coppers and Laboratories.  Let's say the fraction of labs is D (for "draw") and the fraction of coppers is 1-D.  It's fairly easy to figure out the expected value of a turn.

Let x be the average value of a card.  The average value of a turn is simply 5*x.
x = 1-D + D*2*x
x = 1+D/(1-2D)

I drew this with a mouse so it's not to scale.

As you can see, the average value of a turn diverges as D approaches 1/2.  That's the phase transition.  When D is greater than 1/2, your deck has a nonzero probability of drawing forever.  Let's use "reliability" to refer to the probability that you draw forever.  I don't have an explicit expression for the reliability, but I know that the larger D is, the larger the reliability is.

When D is at the critical value of 1/2, this is a special case.  The reliability is zero, but the average value of a turn still diverges as you increase the size of your deck.  mad4math proved that the average value of a turn is grows as sqrt(N), where N is the size of your deck.

When D is somewhat below 1/2, we might say that this is "practically an engine".  In practice we only need to draw finite decks, and we even get to draw 5 cards for free at the start of turn.  So yeah, depending on the size of your deck, the phase transition actually occurs earlier than these calculations suggest.

The Village/Smithy engine

Next we consider a more complicated case, a Village/Smithy engine.  Let's say that the fraction of villages is A (for "action") and the fraction of smithies is D (for "draw"), and the fraction of coppers is 1-A-D.  I don't know the best way to calculate the average value of a hand, but here I give it my best shot.

Let x be the average value of a card, not including dead draw.
x = 1-A-D + Ax + min(A,D)*3*x
x = (1-A-D)/(1-A-3*min(A,D))

The engine phase transition occurs when the denominator is zero.

I am not sure how to add the value of dead draw, but it should be p*3*(1-A-D), where p is the probability of having at least one extra smithy in hand, with only one action remaining and no villages.  I believe this is most important when D > A and (1-A-D) is large.  Anyway, here's the phase diagram:

It's triangle-shaped because we have the inequality A+D < 1.  I didn't have the space to draw it, but there should still be a "practically an engine" region.

I was also thinking there might be a more elegant choice of variables.  Let V be the number of villages per copper, and S be the number of smithies per copper.  In this case, x = 1/(1+S-3min(S,V)).  I'm not sure if this is more or less intuitive, but here's the phase diagram:


Hmm... I wonder if you could get rid of the "practically an engine" region if you just define V and S to be the number of villages/smithies per copper past the first five coppers.

Questions
-I know the calculations aren't perfect, so can you think of any better way?
-How can I estimate the value of terminal draw?
-Is there any way to estimate reliability?
-If I wanted to make this broadly accessible, which parts are particularly confusing or need explanation?
-Any other thoughts?
Logged

ThetaSigma12

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1431
  • Shuffle iT Username: ThetaSigma12
  • Respect: +1359
    • View Profile
Re: Dominion phase diagrams
« Reply #1 on: November 27, 2017, 02:45:08 pm »
+2

Ooh, shiny graphs!

*Upvotes*
« Last Edit: November 27, 2017, 03:03:31 pm by ThetaSigma12 »
Logged
If you have a fan card you want to be created, just post about it here! I'd love to take a look at it.

Kirian

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6968
  • Shuffle iT Username: Kirian
  • An Unbalanced Equation
  • Respect: +9095
    • View Profile
Re: Dominion phase diagrams
« Reply #2 on: November 27, 2017, 03:43:58 pm »
+2

When I looked at this at first, I thought "Phase Diagrams?  They can't be thinking of actual phase diagrams, it's obviously either a joke or something about turn phases from someone who doesn't know what a phase diagram is" and yet, lo and behold, here we are with phase transitions.

I think the idea is pretty neat... but I'm not sure how to make it more accessible or whether the math can be made more robust.
Logged
Kirian's Law of f.DS jokes:  Any sufficiently unexplained joke is indistinguishable from serious conversation.

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3242
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
  • Respect: +2428
    • View Profile
Re: Dominion phase diagrams
« Reply #3 on: November 27, 2017, 03:59:12 pm »
+2

First off, I think this is a fantastic idea and can help get actual good definitions that we can agree on.

However, I think that it shouldn't need to be made more accessible.  We don't have to teach deck types and strategies using phase diagrams.  We have other, better ways to describe concepts.  This is just a way that those of us who know the general ideas can get an actual consistent definition in place to describe extremely complex ideas.

Here's an analogy: when calculus was first invented, limits and analysis didn't exist.  Calculus is easily teachable (and easier in my opinion) using vague ideas of tiny quantities that magically disappear sometimes, which is how calculus was first done anyway.  Then you start getting into the weird things that most people that apply calculus (scientists and engineers) don't care about.  Eventually, you start getting the rigorous definitions of calculus using limits and analysis.  It's complicated because it's what was needed to find an actual definition of the ideas.  These phase diagrams are to strategy as analysis is to calculus.
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

pacovf

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3197
  • Multiediting poster
  • Respect: +3508
    • View Profile
Re: Dominion phase diagrams
« Reply #4 on: November 27, 2017, 04:59:29 pm »
0

I believe the maths behind the "reliability" of the deck are the same as the ones behind the "gambler's ruin" problem. Notably, you will always end up with only coppers/payload in your hand at some point, unless the deck is made up of only labs or what have you. Of course, the amount of payload you will end up with before you are done drawing can be ridiculously large.
Logged
pacovf has a neopets account.  It has 999 hours logged.  All his neopets are named "Jessica".  I guess that must be his ex.

trivialknot

  • Witch
  • *****
  • Offline Offline
  • Posts: 464
  • Respect: +675
    • View Profile
Re: Dominion phase diagrams
« Reply #5 on: November 27, 2017, 05:58:45 pm »
+1

However, I think that it shouldn't need to be made more accessible.  We don't have to teach deck types and strategies using phase diagrams.  We have other, better ways to describe concepts.  This is just a way that those of us who know the general ideas can get an actual consistent definition in place to describe extremely complex ideas.
Yeah, I mean.  The point of making it accessible isn't to teach strategy to novices.  It's so that people can understand it without having a degree in math or physics.  For instance, do people even know what phase diagrams are?  Is that a thing that needs explanation?

I believe the maths behind the "reliability" of the deck are the same as the ones behind the "gambler's ruin" problem. Notably, you will always end up with only coppers/payload in your hand at some point, unless the deck is made up of only labs or what have you. Of course, the amount of payload you will end up with before you are done drawing can be ridiculously large.
That's true on the transition line.  However (as we were discussing in the other thread) it turns out that reliability can be nonzero, even for infinitely large decks.

The closest analogy in physics is so-called "percolation theory".  We imagine a grid of atoms where some adjacent pairs of atoms are bonded, and some adjacent pairs are not bonded.  The question is, is there an unbroken path from one atom to another, even when we consider atoms that are infinitely far apart?  The probability of an unbroken path becomes nonzero when the average density of bonds is above a certain critical value.  There's always a possibility that a chunk of atoms will be walled off from the rest of the atoms, but the probability becomes very small as the chunk becomes larger.
Logged

jonaskoelker

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 201
  • Grand Market = cantrip Woodcutter
  • Respect: +252
    • View Profile
Re: Dominion phase diagrams
« Reply #6 on: November 30, 2017, 02:01:24 pm »
+1

For instance, do people even know what phase diagrams are?  Is that a thing that needs explanation?
I learned in chemistry that gasses heat when expanded or something...

For seirsly, though:

The transition between big money and an engine is similar to physical phase transitions, such as that between water and ice.
As I recall it (99% confident), 'phase' is means the state the matter is in: solid, liquid, gas. I figure a phase diagram divides some space of variables—temperature and pressure seem like good candidates—into regions in which the matter in question is in one or another phase.

So, when diagramming e.g. water, there's a 'liquid' region whose boundary includes the points (0°C, 1 ATM) and (100°C, 1 ATM); one point is also on the boundary of the 'solid' region; the other is also on the boundary of the 'gas' region.

That's my guess, based on reading the quoted passage and looking at your diagrams. I may have seen a phase diagram on wikipedia once or twice. I majored in CS and minored in Math, so my post-secondary education is not relevant. My being good at numbers and knowing natural science basics is.
Logged

Kirian

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 6968
  • Shuffle iT Username: Kirian
  • An Unbalanced Equation
  • Respect: +9095
    • View Profile
Re: Dominion phase diagrams
« Reply #7 on: November 30, 2017, 02:07:21 pm »
+3

For instance, do people even know what phase diagrams are?  Is that a thing that needs explanation?
I learned in chemistry that gasses heat when expanded or something...

For seirsly, though:

The transition between big money and an engine is similar to physical phase transitions, such as that between water and ice.
As I recall it (99% confident), 'phase' is means the state the matter is in: solid, liquid, gas. I figure a phase diagram divides some space of variables—temperature and pressure seem like good candidates—into regions in which the matter in question is in one or another phase.

So, when diagramming e.g. water, there's a 'liquid' region whose boundary includes the points (0°C, 1 ATM) and (100°C, 1 ATM); one point is also on the boundary of the 'solid' region; the other is also on the boundary of the 'gas' region.

That's my guess, based on reading the quoted passage and looking at your diagrams. I may have seen a phase diagram on wikipedia once or twice. I majored in CS and minored in Math, so my post-secondary education is not relevant. My being good at numbers and knowing natural science basics is.

That's actually an extremely good guess!  The points and boundaries you describe are pretty much perfect.

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

jonaskoelker

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 201
  • Grand Market = cantrip Woodcutter
  • Respect: +252
    • View Profile
Re: Dominion phase diagrams
« Reply #8 on: November 30, 2017, 03:15:30 pm »
0

The Village/Smithy engine
[...] Let x be the average value of a card, not including dead draw.
x = 1-A-D + Ax + min(A,D)*3*x
[...]
I am not sure how to add the value of dead draw, but it should be p*3*(1-A-D), where p is the probability of having at least one extra smithy in hand, with only one action remaining and no villages.
Markov chains seem like they might help here.

States would be characterized by (#Copper, #Village, #Smithy, #actions). Transitions would be straightforward, e.g. decrement #Village to increment #actions and add a random card, decrement #actions and #Smithy to add three random cards (i.e. to increment #Copper, #Village and #Smithy by whatever amounts with whatever the probability of drawing those amounts is).

I'm no expert on Markov chains or how to analyze them, though, but there's definitely literature out there. Maybe someone who knows can take this idea and run with it?

My gut says it's something like x = 1-A-D + Ax + P(smithy and 2+ actions)*3*x + P(smithy and 1 action)*3*(1-A-D) + 0*P(no smithy), but I suppose that just pushes the complexity into the calculation of those probabilities. Also, I'm not sure how your 'min(A,D)*3*x' terms takes into account the probability of not having a Smithy.
Logged

jonaskoelker

  • Conspirator
  • ****
  • Offline Offline
  • Posts: 201
  • Grand Market = cantrip Woodcutter
  • Respect: +252
    • View Profile
Re: Dominion phase diagrams
« Reply #9 on: November 30, 2017, 03:27:22 pm »
0

That's actually an extremely good guess!
Why thank you :)

The points and boundaries you describe are pretty much perfect.
That's how the Celcius scale is constructed*. I would expect even those who didn't make it to high school to know the '0' and '100' part, but not (necessarily) that the '1 ATM' part is relevant. And they wouldn't phrase it in terms of boundaries between iso-phase...ic(?) regions, but rather "water freezes at 0 and boils at 100".

Do you happen to live in a country that doesn't use the metric system? :P

(* Actually, Anders Celcius had it the other way around: boiling at 0, freezing at 100, and so a 1° AndersCelcius decrease would be equivalent to a 1 Kelvin increase, which is equivalent to a 1° ModernCelcius increase.)
Logged

trivialknot

  • Witch
  • *****
  • Offline Offline
  • Posts: 464
  • Respect: +675
    • View Profile
Re: Dominion phase diagrams
« Reply #10 on: November 30, 2017, 07:40:45 pm »
0

@jonaskoelker,
Thanks for the insight into typical awareness of phase diagrams.

Although many people are familiar with the phases of water, I am not kidding when I say that the water/gas transition is way more complicated than Dominion.  I'm about to complete a PhD and I still don't know WTF is going on.

But yeah, physicists will draw phase diagrams of just about anything.  You can draw a 2D phase diagram using temperature and pressure, but there's no particular reason you have to stick to those parameters.  You could add a third dimension for the amount of salt in the water.  You can also talk about a lot more phases than just solid, liquid, gas.  There are multiple phases of ice with different crystal structures.  Drawing a phase diagram for Dominion is not really that wacky from the perspective of a physicist, it just seems like the natural thing to do if you want to think too hard about it.

The Village/Smithy engine
[...] Let x be the average value of a card, not including dead draw.
x = 1-A-D + Ax + min(A,D)*3*x
[...]
I am not sure how to add the value of dead draw, but it should be p*3*(1-A-D), where p is the probability of having at least one extra smithy in hand, with only one action remaining and no villages.
Markov chains seem like they might help here.

States would be characterized by (#Copper, #Village, #Smithy, #actions). Transitions would be straightforward, e.g. decrement #Village to increment #actions and add a random card, decrement #actions and #Smithy to add three random cards (i.e. to increment #Copper, #Village and #Smithy by whatever amounts with whatever the probability of drawing those amounts is).

I'm no expert on Markov chains or how to analyze them, though, but there's definitely literature out there. Maybe someone who knows can take this idea and run with it?

My gut says it's something like x = 1-A-D + Ax + P(smithy and 2+ actions)*3*x + P(smithy and 1 action)*3*(1-A-D) + 0*P(no smithy), but I suppose that just pushes the complexity into the calculation of those probabilities. Also, I'm not sure how your 'min(A,D)*3*x' terms takes into account the probability of not having a Smithy.
I was thinking of supplementing this with a simulation later, because I need some Python practice.  Markov chains sound like the simplest way to do it.  I think I will do it that way, thanks for the ideas.

The min(A,D) term is a kludge, and it basically assumes that the number of villages/smithies you draw is exactly the average number, even if that average isn't a whole number.  It's not strictly correct but I think it's correct enough that it can tell you where the phase boundaries are.  To be fully accurate, I think you can't use x="average value of a random card" analysis at all.  Because, as you know, you're much more likely to dud with a starting hand of 1 than a starting hand of 5.
Logged

Polk5440

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1656
  • Respect: +1698
    • View Profile
Re: Dominion phase diagrams
« Reply #11 on: November 30, 2017, 09:23:47 pm »
+6

Let's use "reliability" to refer to the probability that you draw forever.  I don't have an explicit expression for the reliability, but I know that the larger D is, the larger the reliability is.

Well, we can do the calculation for the Lab engine.

Define p to be the probability that a Lab draws finitely many cards. Then

p = probability of drawing two Coppers
   + probability of drawing one Copper and one Lab that draws finitely many cards
   + probability of drawing two labs that each draw finitely many cards

or

p = (1-d)^2 + 2*(1-d)*d*p + d^2*p^2

Solving for p gives

p = 1 or ((d-1)/d)^2

Therefore, the probability that a Lab draws infinitely many cards is

1 - p = 0 or 1 - ((d-1)/d)^2

That curve looks like this:



The probability that your deck will draw forever depends on how many cards you start out with in your hand. I will do the easy case: a two card hand. Drawing a two card hand is just like playing a Lab, so the two-card hand reliability curve is exactly the graph above. I will now take the cop-out and leave the 5 card hand as an exercise for the reader.
Logged

pacovf

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3197
  • Multiediting poster
  • Respect: +3508
    • View Profile
Re: Dominion phase diagrams
« Reply #12 on: December 01, 2017, 02:33:43 am »
0

You would need all cards to be either coppers, or labs that draw a finite number of cards. The odds for that to be true for a single card are (1-d) + d*((d-1)/d)^2, so for five cards, just add an exponent 5.
Logged
pacovf has a neopets account.  It has 999 hours logged.  All his neopets are named "Jessica".  I guess that must be his ex.

trivialknot

  • Witch
  • *****
  • Offline Offline
  • Posts: 464
  • Respect: +675
    • View Profile
Re: Dominion phase diagrams
« Reply #13 on: December 01, 2017, 09:41:47 am »
+2

@Polk5440,

Brilliant!

I think the math can be simplified slightly.  If instead we define p as the probability that a random card will draw finitely, we will have:
p = (1-D) + D*p^2
p = (1-D)/D (or 1 but that's an extraneous root)

And the probability that N random cards will dud is p^N.  This is equivalent to the answer you arrived at.
Logged

pacovf

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3197
  • Multiediting poster
  • Respect: +3508
    • View Profile
Re: Dominion phase diagrams
« Reply #14 on: December 08, 2017, 11:26:19 am »
+1

I was trying to find the expected value of a Village-Smithy deck (spoiler: it's really hard), when I realized something: you don't need to do that to find the phase transition point.

The phase transition point is just the deck composition where one cycle produces enough components to repeat the cycle (and extra payload).

So, for the Lab engine, a cycle is just playing a lab. Cost: 1 Lab. Reward: 2 Cards. Hence, 50% of your cards are Labs at the transition point.

For the Village-Smithy deck, you can do the same. Cost: 1 Village, 1 Smithy. Reward: 4 Cards. So at the transition point, 25% of your cards are Villages, and 25% of your cards are Smithies.

You could do this rather trivially for all deck types if you just want to draw phase diagrams, not the expected payoff before transition. They probably won't look very interesting, due to the monolithic nature of most cards. Something like Nobles-Village would be less trivial.

EDIT: Thinking about it some more (after looking at trivialknot's original plots), I realize I made a mistake. If your deck contains such a high proportion of villages that actions are not a concern anymore, you might as well simplify the situation by saying that your deck contains only coppers and smithies (since villages are cantrips), where smithies don't require an action to be played, so the cycle changes. Cost: 1 Smithy. Reward: 3 cards. So 33% of your non-villages are Smithies at the transition point, i.e. D = (1-A)/3, at the very least for A close to 1 (and probably for other values too as long as A>D, since that equation passes by A=0.25 and D=0.25, the previously described transition point).

I believe my mistake comes from ignoring that there is a second cycle in this type of deck. Cost: 1 Village. Reward: 1 Card (we ignore the extra action). Not a useful one, so the previously described cycle still has to happen for the deck to go infinite (i.e., D!=0). I need to think about how to combine more than one type of cycle into this analysis...
« Last Edit: December 08, 2017, 04:02:57 pm by pacovf »
Logged
pacovf has a neopets account.  It has 999 hours logged.  All his neopets are named "Jessica".  I guess that must be his ex.

pacovf

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3197
  • Multiediting poster
  • Respect: +3508
    • View Profile
Re: Dominion phase diagrams
« Reply #15 on: December 08, 2017, 05:03:59 pm »
0

Let's call {A, B, C...} the proportion of different engine cards in your deck.

Let's call {a_i, b_i, c_i...} the number of cards of each type that you need to perform a cycle of type i, and N_i the payoff in cards of that cycle, necessarily at least equal to the number of cards required to perform the cycle. Let's call P_i how often you perform each type of cycle, Sum_i P_i = 1, with P_i != 0 for at least one cycle where the payoff is larger than the required number of cards.

Then you are at a transition point if A = sum_i (a_i * P_i) / sum_i (N_i * P_i), and equivalently for the other components, for a given distribution of the P_i. Note that, if the number of cycles is larger than the type of cards, not all probability distributions will lead to a "true" transition point, since you might end up with two different transition points {A, B, C...} and {A', B', C'...} where, for all engine card types, A =< A', etc, so only the first transition point is real.

But, if you are a bit clever, I think you should be able to remove all trivially useless cycles to find the true transition points. For example, in a Village-Nobles, engine, the "Village" cycle is only relevant if you have more Villages than Nobles, and the "Nobles-Nobles" cycle is only relevant if you have more Nobles than Villages, while the "Village-Nobles" cycle is relevant in both cases, so you can reduce the dimension of the probability distribution so that there is a one-to-one mapping between them and the proportion of Villages and Nobles at the transition point.
Logged
pacovf has a neopets account.  It has 999 hours logged.  All his neopets are named "Jessica".  I guess that must be his ex.

pacovf

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3197
  • Multiediting poster
  • Respect: +3508
    • View Profile
Re: Dominion phase diagrams
« Reply #16 on: December 08, 2017, 06:38:14 pm »
0

Some plots (I am terrible at making plots, so the fill area alternates between BM and engine, but hopefully the point comes across anyway). Note that now I agree with the final conclusion of trivialknot on the Village-Smithy engine!

Also useful to note is that, if A,B is a transition point, then any point with A'>=A and B'>=B is an engine. In particular, the TR-Smithy engine has a single "true", transition point, so you need to use that to distinguish between BM and engine elsewhere.


EDIT: now with correct links to the images. I will let the proof of these plots as an exercice to the reader ;)
« Last Edit: December 08, 2017, 07:03:20 pm by pacovf »
Logged
pacovf has a neopets account.  It has 999 hours logged.  All his neopets are named "Jessica".  I guess that must be his ex.

trivialknot

  • Witch
  • *****
  • Offline Offline
  • Posts: 464
  • Respect: +675
    • View Profile
Re: Dominion phase diagrams
« Reply #17 on: December 08, 2017, 10:59:33 pm »
+1

Yeah, pacovf's analysis sounds correct.  I don't think you really need a simulation to draw phase diagrams.  I'd like to make a simulation later anyway, if only to see the effect of terminal draw.

So, I guess the A/D diagrams are more intuitive than the S/V diagram, huh?
Logged

pacovf

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3197
  • Multiediting poster
  • Respect: +3508
    • View Profile
Re: Dominion phase diagrams
« Reply #18 on: December 09, 2017, 12:07:59 am »
0

Eh, S/V are probably more intuitive, but the calculations I do are easier with A/D, so I plotted that.

EDIT: this is kinda fun, here are some more plots with sifting (with other plots for reference):





Was trying to do Herald - Smithy, but third degree equations appear and that's the point where it isn't fun anymore :p

Grey regions are points where the engine goes infinite, but is forced to discard payload cards to keep going. Some unintuitive results! Will add some more comments / plots later if I am bored enough.

EDIT: added Herald, making the simplification that it's a card that draws 1+(A+D) cards and gives 1+(A+D) actions. Since the extra card drawn by Herald is always an action, this is actually a nerf, but otherwise the problem was intractable with my approach. To the right of the dotted line, we have too many terminals. Note that the transition line for high number of heralds is not a straight line, it's slightly concave.

Man I've been nerd sniped hard. I think I should be able to write some code that can draw these diagrams automatically for reasonably simple cards, just need to think about it some more.
« Last Edit: December 09, 2017, 06:03:39 pm by pacovf »
Logged
pacovf has a neopets account.  It has 999 hours logged.  All his neopets are named "Jessica".  I guess that must be his ex.

trivialknot

  • Witch
  • *****
  • Offline Offline
  • Posts: 464
  • Respect: +675
    • View Profile
Re: Dominion phase diagrams
« Reply #19 on: December 13, 2017, 08:58:54 pm »
0

Hmm... Herald seems difficult.  I'm having trouble figuring out the Herald transition point with just Heralds and Coppers.

There are definitely some weird decks that muck with the phase diagrams:
-Madman/City Quarter.  The phase transition technically occurs at zero density, because at any nonzero density, you have a nonzero chance of having a million City Quarters on top of your deck, which just might be enough to kick off.
-Minion.  The phase transition technically occurs at 100% density because otherwise you will eventually draw four coppers.  There's got to be some critical point at 25% density though, right?
-Haunted Woods.  Your reliability is 1 at the transition line.  However, it may take an arbitrarily large number of turns to actually build up to drawing your deck.
-Secret Passage.  With Secret Passage + Hamlet, you could actually have 3 phase transitions.  The first transition is when you have enough to draw every card, but some cards have to be left in your draw pile.  The second transition is when you can draw to the bottom of your deck.  The third phase transition is when you can draw your deck including the discarded cards.
-Stables.  As you increase your Stables density you'll transition into an engine... and then back into big money.
Logged

trivialknot

  • Witch
  • *****
  • Offline Offline
  • Posts: 464
  • Respect: +675
    • View Profile
Re: Dominion phase diagrams
« Reply #20 on: December 13, 2017, 10:00:34 pm »
0

So, I found a solution for Herald.  I think you were actually overestimating Herald since you didn't include the penalty of topdecking copper.

Let A be the density of Heralds, and D be the density of Smithies.
Let x be the average value of a random card.
Let h be the average value of a herald.
Let c be the value of topdecking a copper.  (c < 0)

Case 1: Underterminaled (Assume every smithy draws)
x = 1-A-D + Ah + 3Dx
h = x + Ah + 3Dx + (1-A-D)c
c = 1-x

This produces a transition at D = (1-A-A^2)/(3-A).  Interestingly, if there are no Smithies, the critical density of Heralds is one over the golden ratio.

Case 2: Action-limited (Assume every extra action lets you play a smithy)
x = 1-A-D + Ah
h = x + Ah + 3x(A+D) + (1-A-D)c
c = 1-x

This produces a transition at D = (1-A-4A^2)/(4A).  This is assuming I haven't made an error in my algebra.

As for where it switches from smithy-limited to action-limited, I'm going to guess that it's wherever those two transition lines cross.
Logged
Pages: [1]
 

Page created in 0.092 seconds with 21 queries.