Hello everyone,
Well, coming from a background in video game theorycrafting, I was surprised to find that while there are several excellent Dominion simulators, there aren't any Dominion models.. calculators that quickly evaluate the strength of Dominion cards relative to each other and to the deck without simulation. So, I've been endeavoring to create one, as usual using javascript. I've finally finished a prototype version of the calculator, and would love some feedback and debugging on it.
The interface is currently very simplistic, and includes only a very limited selection of Dominion cards.. this is still a work in progress..
In brief, the calculator does the following:
1). It evaluates the purchasing power of the averaged hand (and card) in your deck.
2). Using the above as a baseline, it evaluates the relative purchasing power value of adding specific cards to the deck.
Note: To reset your deck to turn 1, simply refresh the page.At a basic level, the calculator is quite simple. For example, it is pretty trivial to calculate the value of something like Smithy if you haven't purchased anything for your deck yet (or have purchased only Treasure).. with a brand new deck, the purchasing power of a Smithy would be 0.7 (7 Coppers in 10 total cards) * 3 draws = 2.1.. or very slightly better than if the Smithy were instead a Silver. This all gets more complicated as you add more action cards to the deck, however, particularly terminal actions. Thanks to some formulas appropriated from AdamH's thread over in the Articles forum, however, the calculator is for the most part able to correctly compensate for chaining actions and terminal collisions, altering the relative value of each card based on the probability of these events occurring.
Strengths of the CalculatorUnlike a Simulator, the calculator is theoretically able to evaluate the relative value of a huge number of cards/strategies at any point in the development of the deck, and executes instantly. All cards are constantly ranked by their relative purchasing power value, and re-updated with every purchase or trash.
Limitations of the CalculatorI don't think I need to tell anyone that there are lots of limitations to modeling Dominion.. not the least of which being that in some cases the underlying mathematics and probabilities are simply too complex to model (at least for me).
Some mechanics are simply not going to be 100% accurate, and some cards may not ever be possible to model properly. So please take any result from the Calculator with a 'grain of salt'. While I am fairly confident that for the most part the relative values are accurate, in many cases the results are not very intuitive or easy to utilize. Beyond this, though, there are several very important limitations to the Calculator:
1). The relative values of each card are entirely based on the purchasing power of the deck/hand/card.. i.e. 'Big Money'. In short, this Calculator only optimizes for treasure-based strategies. It also will not ever recommend purchasing Victory cards. By definition, these are likely to hurt the purchasing power of the deck (with the rare exceptions of possibly Nobles, Harem, etc.). Theoretically, the Calculator *could* suggest when it is optimal to start 'going green'.. for example, from simulation of the Big Money strategy, it is typically optimal to start purchasing Provinces once your deck reaches ~18 total treasure, or a per-hand purchase power of ~6 and per-card purchase power of ~1.2.
2). The Calculator isn't actually playing your deck, and doesn't understand the concept of a deck, hand, and discard pile. In short, it is evaluating the purchasing power of your entire deck as a single object, rather than as a discrete number of hands. While this is not exactly 'incorrect', the implications of this method are not entirely intuitive. For example, from simulation of the Big Money + Smithy strategy, it appears optimal to try to purchase a second Smithy sometime just after turn 7 or so. The Calculator, by contrast, will typically suggest that the relative value of a second Smithy surpasses the relative value of Silver at somewhere around turn 13. These results are not actually at odds with each-other. The Calculator isn't taking into account how many turns it might be between when the second Smithy is purchased and when it might actually first be played. So while it might not be optimal to purchase a Smithy at turn 7, based on your current deck at turn 7, by the time it comes around to actually playing that Smithy your deck might be 2-3 Silver heavier, and at that point it *might* be optimal to have a Smithy in the deck. To quickly summarize the issue.. the Calculator cannot anticipate your future (in the turns after the current one) purchases, nor does it know just how soon any purchased card is going to be played. So best use of the Calculator often requires adding several cards to the deck, to evaluate the future purchasing power of the deck several turns out, based on a prediction of what your next few draws might be.. not the easiest thing in the world to do.
3). There are several mechanics that the Calculator currently does not support at all, including the effect of +buys, +2 actions, and Attack cards. While I believe that I can eventually figure out the probabilities for modeling cards like Vault, Warehouse, Salvager, etc.. I'm currently not positive about +2 action cards.. the probabilities involved with determining when they might allow for +card/+action chains are very complex.
I could also possibly give an estimate for the value of Attack cards, however it would only be directly applicable to a specific opponent deck (I could probably use either a mirror deck or a Big Money deck as the opponent). I also am not positive that Duration cards are currently being modeled 100% correctly..
4). As is probably obvious given the above limitations, the Calculator is not an AI that will tell you how to win at Dominion.. it still requires a fair amount of knowledge, prediction, and decision-making to utilize (and even then Dominion is subject to a lot of random variation). Theoretically, it might be possible to use it to create an actual Dominion AI, however that would require two additional components: A). an actual understanding of deck, hand, and discard pile, and B). a method of applying the same deck evaluation calculations out into the future, examining the potential impact on the deck at some future point based on all possible purchases up to that point.
Whew.. sorry for the wall of text.. anyway, I am very interested in feedback on the Calculator.
I'm definitely going to continue developing it, and would very much appreciate any testing or troubleshooting anyone would be willing to do. If there's enough interest in it, I'll also eventually find a host for the program somewhere.
Thanks,
Toskk