Dominion Card Picker

This card picker program is for the card game Dominion by Donald X. Vaccarino, and includes features for both true random and artificial card selection. The various card picker fields and checkboxes were designed to attempt to produce interesting and balanced games, with multiple viable openings and strategies. Included also is a blind veto system, by which cards can be replaced from the set while still preserving all of the set parameters. Suggested settings for artificially selecting kingdom sets can be found here.

Dominion Card Picker v1.2.0

Dominion by Donald X. Vaccarino. Card Picker by Toskk.

Card Sets Card Set Restrictions Functional Restrictions
Dominion
Intrigue
Seaside
Alchemy
Prosperity
Cornucopia
Hinterlands
Dark Ages
Guilds
Envoy (Promo Card)
Black Market (Promo Card)
Stash (Promo Card)
Walled Village (Promo Card)
Governor (Promo Card)

Select total cards.

Dominion: Min. Max.
Intrigue: Min. Max.
Seaside: Min. Max.
Alchemy: Min. Max.
If there are any Alchemy cards, include at least 3.
Prosperity: Min. Max.
Cornucopia: Min. Max.
Hinterlands: Min. Max.
Dark Ages: Min. Max.
Guilds: Min. Max.

Include at least 1 card that provides additional buys or gains.
Include at least 1 card that lets you trash or return other cards.
Include at least 1 card that provides +2 or more cards.
Include at least 1 card that provides +2 or more actions.
Only allow Attack cards if there is at least one relevant Reaction or lighthouse card.
Don't allow more than Attack card(s).
Don't allow more than terminal Action card(s).
Don't allow more than non-Action card(s).

Reject sets with useless or redundant cards.

Specific Card Restrictions Cost Restrictions

For card restrictions, enter the exact name of each card, including capitalization. Use a comma with no space to enter multiple cards (e.g. Navigator,Possession).

Include these cards:

Don't allow these cards:

Cost 2: Min. Max.
Cost 3: Min. Max.
Cost 4: Min. Max.
Cost 5: Min. Max.
Colony/Platinum Selection Method Shelter Selection Method
Always use Colonies/Platinum.
Only use Colonies/Platinum if there is at least one card costing 6 or more.
Only use Colonies/Platinum if a randomly-picked card is a Prosperity card.
Never use Colonies/Platinum.
Always use Shelters.
Only use Shelters if there is at least one Dark Ages card.
Only use Shelters if a randomly-picked card is a Dark Ages card.
Never use Shelters.
Organize: By Cost Alphabetical

Notes:

The “Reject sets with useless or redundant cards” checkbox currently applies the following restrictions:

  • Only allow Quarry if there is at least one Festival, Market, or an Action card costing 6 or more.
  • Only allow Scout if there is at least one Baron, Crossroads, Explorer, Hunting Party, Farmland, Menagerie, Mystic, Peddler, Tournament, Tunnel, Wishing Well, Action/Victory, or Treasure/Victory card.
  • Only allow Chancellor if there is at least one Baron, Counting House, Explorer, Herald, Hunting Party, Inn, Minion, Stash, Treasure Map, or Tournament card.
  • Only allow Counting House if there is at least one Ambassador, Beggar, Chancellor, Coppersmith, Ill-Gotten Gains, Moneylender, or Mountebank card.
  • Only allow Armory, Ironworks, Talisman, or Workshop if there is at least one Bishop, Bridge, Caravan, Conspirator, Crossroads, Envoy, Feodum, Fishing Village, Fool’s Gold, Gardens, Great Hall, Highway, Island, Menagerie, Procession, Scheme, Silk Road, Smithy, Throne Room, Tournament, or Warehouse card.
  • Only allow Tunnel if there is at least 1 card that allows you to discard or at least 1 hand-reducing Attack card.
  • Only allow Contraband if there are no other sources of +buy.
  • If there is a Chapel, don’t allow Loan, Moneylender, or Spice Merchant.
  • Only allow Reaction and Lighthouse cards (other than Fool’s Gold, Market Square, Trader, Tunnel, and Watchtower) if there is at least one relevant Attack card.
  • Don’t allow multiple cost 2 cards that provide +1 Card and +1 Action.
  • Don’t allow multiple same-cost cards that let you trash or return other cards.
  • Don’t allow more than 3 cards that let you trash or return other cards.
  • Don’t allow more than one cost 3-4 card that lets you trash or return other cards.
  • Don’t allow multiple same-cost cards that provide +2 or more actions.
  • Don’t allow more than one cost 3-5 card that provides +2 or more actions.
  • Don’t allow more than one cost 5-6 card that provides +2 or more actions.
  • Don’t allow more than one cost 2-3 card that provides +2 or more actions.
  • Don’t allow more than 1 Reaction or Lighthouse card (except Fool’s Gold, Market Square, Trader, Tunnel, and Watchtower).
  • Don’t allow more than 1 hand-reducing Attack card.
  • Don’t allow more than 2 curse-giving Attack cards.
  • Don’t allow more than 1 treasure-trashing Attack card.
  • Don’t allow both King’s Court and Throne Room.
  • Don’t allow more than one Armory, Ironworks, or Workshop card.
  • Don’t allow both Nomad Camp and Woodcutter.
  • Don’t allow both Envoy and Smithy.
  • Don’t allow more than 1 Hunting Party, Laboratory, or Stables card.
  • Don’t allow both Chancellor and Scavenger.
  • Don’t allow both Count and Mandarin.
  • Don’t allow more than 1 Catacombs, Embassy, or Journeyman card.
  • Only allow cards with on-trash abilities if there is at least 1 card that allows you trash them.
  • Only allow Squire if there is an Attack card.

30 comments

Skip to comment form

  1. Steve

    This is almost perfect :-) The only thing I would change is that currently the options for: ‘Only use Colonies/Platinum if the first card picked is a Prosperity card’ and ‘Only use Shelters if the first card picked is a Dark Ages card’ prevent both occuring (and I really like the randomness of potentially having none, one or both).

    Maybe platinum/Colony could use the first card, and Shelters use the second card?

    Fantastic work!

  2. Toskk

    Hi Steve,

    *laugh* looking back at my coding, I technically didn’t actually have it check the literal ‘first’ card (as the algorithm actually picks all 10 cards at once) but a random card in the set.. so in the current implementation even with both of those boxes checked you can still get both Colonies and Shelters (just with very slightly lower frequency than if it actually checked the first card for one type and the second card for the other). Perhaps I should reword the option tooltips..

    Thanks for the feedback, though! Any other changes you’d like to see? I haven’t written the post about this version yet, but about 50% of the Dark Ages cards currently don’t have images loading with them (as Diehrstraights.com hasn’t hosted those ones yet), but they *should* just start working once the images get hosted there.

  3. Chris

    Hi there! Selecting only Cornucopia or only Seaside causes the script to hang (Firefox 14), reported line 2348.

  4. Toskk

    Hi Chris,

    Ah.. I see the problem.. it’s Cornucopia, or more specifically Young Witch. If you only select Cornucopia (or sometimes it plus one other set), it’s very possible for the card picker to put Young Witch in the 10 Kingdom cards, and then not have a cost 2-3 card left to use as its Bane card. :( There are only 3 total cards from Cornucopia (Hamlet, Fortune Teller, and Menagerie) that can qualify for that spot, making the chances of actually getting a set that works very low (thus the script hang).

    I’m not 100% sure how best to resolve the issue.. by the rulebook, you aren’t actually supposed to use either Cornucopia or Alchemy stand-alone.. so I could definitely just add a check that just tells the user they can’t select a set using only those expansions? Suggestions?

  5. Riemann Zeta Jones

    Donald X. Vaccarino said, on forum.dominionstrategy.com somewhere (the rules sub-forum) that the principle of ‘do as much as you can’ applies in the set-up phase as well. In this case if there is no card that can function as the Young-Witch’s Bane, then you play with the Young Witch, but with no Bane, since you do as much as you can of the set up.

  6. Toskk

    Hi Riemann,

    I did read that post by Donald, however he also has other posts there specifically about Young Witch’s Bane card.. where he said essentially word-for-word: “if this case arises, the group will figure it out”. It’s a very Donald-like answer (given his distaste for ‘official’ rules errata), but it doesn’t really help with determining how the card picker program should behave (short of the script locking up with indecision, as it currently does). ;) I could certainly make the card picker not pick a Bane card at all in these rare cases, but is that really desirable behavior? It could cause some odd complications with the veto system, as well..

    Thoughts? :)

  7. Riemann Zeta Jones

    I think on the rare occasion where it happens, the picker should produce a kingdom with a YW but no bane. It might be best if there was a note explaining this.

    In the cases where vetoing happens, and I know this is not the easiest thing to do with an all-at-once-type kingdom-picker, the bane should not be picked until it is known that the YW is in the kingdom, which is after all the vetoing has taken place.

  8. Hsiale

    I really like the picker and will definitely use it once my recently ordered set of Dominion + Intrigue arrives. I have one idea that could improve usability while probably not requiring so much work from you.

    My guess (I’m not too much into coding but know some basic ideas) on how the picker works is: a webpage with a script picking cards + a database storing cards data so that the script has a source of information on each card’s features. Is it possible for you to make a downloadable version of the picker (which could well still be a webpage with some additional files, but stored locally) with database in a format that’s easy to read and edit for a human? This will:
    - work when your internet connection fails for some reason,
    - have a small bonus of making it possible to set your own defaults,
    - have a big bonus of user being able to expand the database whenever needed, which would be a huge help for people playing with some unofficial Dominion expansions (seeing that there’s quite many of them on various gaming sites, they must get some playtime and being able to use picker also when using such expansion is really good, as people playing with those probably have randomizer decks of over 200 cards, not very easy to use).

  9. Toskk

    Hi Hsiale,

    Well, the program and database are actually all stored in the page script itself, in a single combined html/javascript format. It makes it very easy to be portable (I can just copy-paste the code into anything that will accept html and javascript), but a little tougher to edit (as my coding is a bit hackish and not well-documented).

    The card images themselves are also hosted totally separately, over at dominion.dierstraights.com. So a local/downloadable version of the card picker would only be able to load the images of each card if it still had an Internet connection. Theoretically, it would be possible to download/collect all of the images, and then change the coded links to local locations, but that would take some work.

    With that said, though, I would be happy to provide a downloadable version of the card picker. I’ll place a link to it on the page above (down at the very bottom of the page). Please let me know if you have any questions about the coding.

  10. Brendan

    Hi Toskk,

    I realize it’s been months since you last commented here, but I had two questions I was wondering if you could answer.

    1) I really like your card picker implementation, specifically for the ratios in set selection, however, would it be possible to allow for an up to 14 card selection (a non-blind veto mode?) I realize that could be a lot of work to balance things like the ratios (have to scale based on number desired.) but even if none of the features scaled, it would be a huge boon for me.

    2) Will you update your card picker for Guilds once it is released?

    As an addendum, if you’re not interested in updating for either of these, I’d be happy to do some work on your code to try and implement these features.

    Thanks!

  11. Toskk

    Hi Brendan,

    Yes, although I’m not playing very much Dominion currently, I’m definitely committed to keeping this card picker updated (and implementing new features, as requested). :D I think I could add the ability to just deal out up to 14 cards, yes. The only caveats being you may need to use different filter settings for that than you would for picking 10 cards (as the filters would definitely apply overall to every card selected). For example you’d be able to select ‘up to 14′ for a lot of the popups, instead of the current 10, but the actual filters wouldn’t function any differently (e.g. the require 1 +2 action card filter would still force just one card). Would that work ok?

    I’ll definitely implement Guilds when it is available (although I might not purchase it, so may not have as good of an understanding of what should be included in the redundancy filter settings), as well, although of course image support depends on dominion.dierstraights.com uploading/hosting the images. So initially it may just be text labels for the cards (as it was with Dark Ages for a while).

    Does that help? :)

  12. Brendan

    That sounds great! Technically intrigue includes rules for 5-6 player games, but I imagine that’s something of an edge case as I don’t think many users would be concerned about a 5-6 player non blind draft game, but it might be worth considering for completions sake if its an easy scalability change. I know I’m certainly not interested in 5-6 player games :P

    Thanks so much for keeping this updated!

  13. Dan

    This is great,

    What would you think about adding a field for the number of players, then specifying the number of Estates, Provinces, Curse cards to include?

    Dan

  14. Toskk

    Hi Dan,

    That wouldn’t be that hard to do. Ideally, where would that information be output? I assume just as text?

    1. Dan

      Just text would be great.

  15. Showdown35

    Hi Toskk, I absolutely love this card picker, my group uses it exclusively when we play. Is there any chance you are considering adding a built in Black Market card picker in the future. It could pretty much work the same way as this picker, just only pick three cards, and if its built in, it could even exclude the cards picked in the main ten (well, 9 since Black Market itself would be one of them.

    Thanks!

  16. Toskk

    Hi Showdown35,

    Oo neat idea.. yes, I could probably implement something like that. Ideally, how would it look/function?

  17. Showdown35

    Well, I guess it would look similar to the card picker as it is, just like a mini-version, only displaying three cards at a time. Ideally it would automatically use the same sets that are already selected, but that should be editable too since some people like to keep their black market deck restricted to certain sets, even when playing with others.

    The tricky part is that it would have to be able to be used again and again while not turning up any duplicate cards until ALL cards have been revealed. And then, once every card has been revealed, it would have to reveal them again in the same order (since, in real life, you would put unbought cards on the bottom of the deck)… It would also be good to have a “veto” option as well, since some groups have certain cards they don’t want to play with, like token generating cards, or ones that use mats.

  18. Showdown35

    One more comment as well about the useless and redundant restrictions. I don’t believe Scout should have the restrictions itdoes. Even without any “victory cards matter” cards or multi type victory cards available, Scout is still valuable as it clears out the useless victory cards from the top of your deck, making your next turn better, which I believe is kinda the flavour of the card.

    It also combos well with any cards that care about the top of your deck, like Wishing Well or Scrying Pool. It allows you to set up the top of your deck for draws (as in if you know you are going to draw one more card, you can move the the victory cards out and ensure you have a gold or whatever on top. Basically, you get to pick from the top four cards of your deck because you can put them back in any order.)

    It’s the only card on the useless and redundant list that I’m not sure why its there.

  19. Toskk

    Hi Showdown35,

    Well, the problem with Scout in general is that the math doesn’t really support using scout solely for next-turn improvement. i.e. you’re almost never better-off actually buying Scouts at all if all they’re going to do is (maybe) help your next turn (at the expense of this one).

    Good point about Wishing Well and Scrying Pool with Scout, though.. there are probably a few other cards that need to be included too. Like Peddler and Horn of Plenty. I’ll do some tweaking of that setting for the next update. :)

    Edit: just to add some numbers to help, for an example of just how poor of a buy Scout typically is.. from simulation Scout + Big Money loses *very* badly to just Big Money. :( ~30% / 67% split, in favor of Big Money. You really need some kind of enabler to make it worth its purchase. :P

    Have you played around with Dominion simulators much? :)

  20. Showdown35

    Not at all! Although it sounds interesting. I just have a soft spot for Scout because I’ve had a couple fun wins using it to fix my next turn late in the game (like removing 2 provinces and a Duchy from the top of my deck, setting up a monster next turn). And I didn’t think it was bad enough to warrant artificial randomness exclusion with the absence of a certain set of cards.

    Anyway, what’s the status of the Black Market picker idea? Is it realistically possible to have it continually pick 3 random cards without duplicates, and is it plausable to be able to tell it which, if any, of the cards was purchased so it won’t pick it again when all cards have been revealed and it has to cycle through them again?

  21. Toskk

    Hi Showdown35,

    I’ve been thinking about how to build that style of card picker.. but I’m at a bit of a loss, unfortunately. For starters, it would need to be totally separate from the existing card picker (as you wouldn’t want to have cards in the actual kingdom set be part of the black market deck), but not only does it need these cards as inputs, it also needs to keep track of all previous cards shown/picked, and not just those displayed the previous deal. :P

    So I think it could be done, still using javascript, but javascript definitely isn’t the ideal language for such a program. :( I already had to do some slightly-unusual coding for the existing ‘veto’ buttons.. technically when you click on one of them, they execute the same function as ‘select cards’, just they add the existing kingdom set as inputs into the formula.

    It would definitely be a more long-term project, though..

    As for simulators, if you’re interested in them, I’d recommend Geronimoo’s:

    http://dominionsimulator.wordpress.com/

    I worked for a while on an (unreleased) Dominion deck calculator (not a simulator) that would evaluate the total buying power of a deck, based on whatever cards you put in it, but ultimately it became too difficult to properly handle the complexity of the probabilities involved. :P But it was very good at showing the strength of Big Money.

  22. b0rsuk

    “Only allow Chancellor if there is at least one Baron, Counting House, Explorer, Hunting Party, Inn, Minion, Stash, Treasure Map, or Tournament card.”

    Add Herald to this list. Chancellor may be the best card to use for Herald’s “overpay” ability. In fact, it makes Navigator and Cartographer look bad.

    Open Chancellor/Something
    Get 2 Treasure Maps into your deck somehow
    Wait until you draw Chancellor + $4, get Harald.

  23. Toskk

    Hi B0rsuk,

    Excellent, good to hear about tweaks to the restriction filter. I’ll get that change added in the next day or so. Thanks for the feedback.

  24. b0rsuk

    Armory is good target for Band of Misfits. You could make a rule exception.

  25. Toskk

    Hi B0rsuk,

    Even if there then isn’t any good targets for Armory? Would you mostly just be using Armory to grab Silvers in that case? :)

  26. Tom

    This wont work for me. Long running script. Am I doing something wrong?

  27. Toskk

    Hi Tom,

    Hmm.. that sounds like the settings you chose are causing the script to fail to finish (i.e. the set settings you chose cannot produce a complete Kingdom set). Most commonly, this happens when you specify a certain number of minimum/maximum cards per expansion that don’t total up to 10 (or however many cards you’ve asked it to select for you). Another common issue is if you set a minimum # of cards for a set, but haven’t checked the box to use that set.. the picker will of course never be able to complete that request. Can you post the picker settings you’re using? It should be pretty quick to figure out what’s wrong. Thanks,

    Toskk

    Edit: just to expand on this slightly, the card picker program currently includes no range checking, so it is very possible to give it settings for which it will lock up (fail to ever find a set that meets all specified criteria).

  28. Thomas

    Hello, I think I have found a glitch,
    Farmland, Duke, Library, Market, Saboteur, Coppersmith, Shanty Town, Woodcutter, Lighthouse, Moat, !Colony, !Platinum
    As far as i can see, there is no prosperity card in this and i selected only use Colonies/Platinum if a randomly-picked card is a Prosperity card.

    I love this website and think it is very helpful, just one thing i noticed

  29. Toskk

    Hi Thomas,

    Hmm.. did you notice Colony and Platinum actually on the list of images for the set? They’d appear down below the Kingdom card set if they are to be used. The ! in front of them on the text output is (really was) for Isotropic, and tells it NOT to use Colonies and Platinum. I should probably get rid of that text output entirely now, as Isotropic is no longer used. Does that help at all? :) I’m glad you like the card picker program, too! Thanks,

    Toskk

Leave a Reply

Your email address will not be published. Required fields are marked *


seven − = 4

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>