Recommend
35 
 Thumb up
 Hide
29 Posts
1 , 2  Next »   | 

Dominion» Forums » General

Subject: Dominion Card Randomizer - Updated 2/11 rss

Your Tags: Add tags
Popular Tags: useful_aid [+] Dominion [+] [View All]
Zack Hiwiller
United States
Winter Park
Florida
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Hi all,

I wrote a web app for my house's Dominion nights where you just go to the page, pick the sets and optionally a couple "house rules" and it spits out the ten cards at random to save us the step of getting the cards out, shuffling them up and then having to put them back in their original boxes. My friend suggested I post it on here that other people may find it useful.

It is at http://www.hiwiller.com/dominion. I hope you enjoy it. Let me know if you find any bugs or have any comments or questions.

Update: February 10th, 2010:
Quote:
I've updated the tool to add the hooks for upcoming cards and sets. I fixed some bugs and added a sort by alphabetical option.[/url].


Update: October 20th, 2009:
Quote:
I've updated the tool for Seaside and fixed a major and some minor bugs. See the thread here.


Update: July 23rd, 2009:
Quote:
Thanks to the kind support and requests, I've added a number of features to the app:
- A button that allows you to get ten more random cards with the same parameters without having to go back or refresh the page.
- The ability to return only the text, cost and set of each card instead of the images for low-bandwidth situations (cell phones, 400 baud modems)
- A parameter to require a reaction card (currently Moat or Secret Chamber) if there are any attack cards on the board.
- A parameter to require a more equitable cost distribution (currently four cards with cost 2-3, four cards with cost 4+ and 2 cards of any cost.) This feature is exclusive to the other parameters (except for text only) for now.
- A number of bug fixes that most won't notice.

You will also notice a disabled feature called "Return a recommended set." What this will do is return ten cards that work well together, like the suggested sets that come in the rule books. The issue here is that I don't have a number of these yet. So if you have some "perfect boards" feel free to send them to me or post them along with WHY you think they are good. I started an additional thread on this.

Thanks again for all your support!


-
zack
17 
 Thumb up
0.55
 tip
 Hide
  • [+] Dice rolls
Marshall Miller
United States
Malden
Massachusetts
flag msg tools
designer
publisher
The Warren is a roleplaying game about intelligent rabbits trying to make the best of a world filled with hazards, predators and, worst of all, other rabbits.
badge
Marshall is a Boston-based researcher and game designer.
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer
Very nice. I'd like to see a check box for the option, "One card from each cost level."
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Zack Hiwiller
United States
Winter Park
Florida
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer
Thanks, Marshall. I've added that to my list for the next time I update it.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Larry Welborn
United States
Anderson
South Carolina
flag msg tools
badge
Clemson Tigers #1
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer
Mease19 wrote:
Very nice. I'd like to see a check box for the option, "One card from each cost level."


A better option, IMHO, is 4 cards costing less than 4, 6 cards costing 4 or more. Although I don't play on BSW, I think this option is available there.
3 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
United States
flag msg tools
badge
mbmbmbmbmb
Re: Dominion Card Randomizer
This is great, I think it would be great if there were two buttons, one for "try again" that remixes according to the current selected options, and a "change parameters" button that brings you back to the menu to reselect options.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jonathan Ham
United States
The Colony
Texas
flag msg tools
badge
HONK HONK
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer
Another house rule idea (that we use) is "Require reaction if attack cards present"
4 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Kevin Bourrillion
United States
Mountain View
CA
flag msg tools
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer
This is pretty cool. How's it implemented, I'm curious?

Not sure if Black Market and Envoy really need to be selectable independently from each other.

Edit: interestingly, any such generator that uses the typical 32-bit random number generator will only be capable of generating 27% of the total possible card combinations. Put another way, a combination that you make by hand using the randomizer deck is 73% likely to never come up using a computer-based tool.

Of course, this doesn't in any way even remotely lessen the value of the tool, it's just an interesting factoid. (I think there's a simple way to address it, anyway.)
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Kevin Bourrillion
United States
Mountain View
CA
flag msg tools
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer
Another useful feature: after generating a set of 10, have an option to generate a new set of 10 that exchanges exactly N of the current set for different selections. I think N=4 is enough to ensure a significantly different experience, and boy would it speed up the transition time between games! (Ordinarily, you can expect only about 2 of the cards to stay in, so you have a ton of fumbling to do; in fact I've found it's easier to just start by putting everything back and then get everything out anew rather than having to deal with sorting out what stays from what goes.)

Bonus points if, when I use this a second time, it chooses the N that should get replaced from among the (10-N) cards that were in *both* of the last two games, and chooses the N to "swap in" from among the cards that were in *neither* of the last two games. Sounds like a pain in the ass, but this would ensure a decent amount of "freshness" each time while playing a series of games, and it's a system that would demonstrate the value of a computer-based approach since it's such a damn pain in the ass to deal with by hand.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Julien Vion
France
Bry
France
flag msg tools
badge
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer
kevinb9n wrote:
This is pretty cool. How's it implemented, I'm curious?

Not sure if Black Market and Envoy really need to be selectable independently from each other.

Edit: interestingly, any such generator that uses the typical 32-bit random number generator will only be capable of generating 27% of the total possible card combinations. Put another way, a combination that you make by hand using the randomizer deck is 73% likely to never come up using a computer-based tool.

Of course, this doesn't in any way even remotely lessen the value of the tool, it's just an interesting factoid. (I think there's a simple way to address it, anyway.)


I am pretty sure that a new random number is generated for selecting each card. In this way, although the distribution may not be strictly even, all combinations can be obtained. Although maybe are you aware of some limitation of random number generators I am not?
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Kevin Bourrillion
United States
Mountain View
CA
flag msg tools
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer
Unless you're re-seeding the RNG nondeterministically between each card, there are still only 2^32 possible sequences it is capable of producing. (If, again, it's a typical RNG as used in Java etc.)

When shuffling a deck of playing cards, it's much "worse": there are more than 10^58 possible decks that the RNG is incapable of producing for every one that it is!
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Robert Fox
United States
Chandler
Arizona
flag msg tools
Fear cannot be banished, but it can be calm and without panic; it can be mitigated by reason and evaluation.
badge
A person is smart. People are dumb, panicky, dangerous animals, and you know it.
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer
kevinb9n wrote:
Unless you're re-seeding the RNG nondeterministically between each card, there are still only 2^32 possible sequences it is capable of producing. (If, again, it's a typical RNG as used in Java etc.)

When shuffling a deck of playing cards, it's much "worse": there are more than 10^58 possible decks that the RNG is incapable of producing for every one that it is!


Your statements both intrigue and frighten me. Do you know of a good resource that I can study so that this makes more sense to me? I write programs in my spare time and admit I don't know enough about how RNG's work.

Robert
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jason Woolever
United States
Mountain View
California
flag msg tools
mbmbmbmbmb
Re: Dominion Card Randomizer
kevinb9n wrote:
Unless you're re-seeding the RNG nondeterministically between each card, there are still only 2^32 possible sequences it is capable of producing. (If, again, it's a typical RNG as used in Java etc.)


I believe Java currently uses a 48-bit seed, so there are sufficient bits. Source: http://java.sun.com/javase/6/docs/api/java/util/Random.html#...
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Suzan
Netherlands
Enschede
flag msg tools
badge
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer
kevinb9n wrote:

Not sure if Black Market and Envoy really need to be selectable independently from each other.


Envoy and Blackmarket are not always send together like on BGG. I got Blackmarket from Spielbox and Envoy from Spel!. (Both of course after I ordered them from BGG )
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Geert VG
Belgium
Leuven
flag msg tools
badge
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer
My first test of your randomizer resulted in a very expensive bunch of decks... No cost 2 cards, 1 cost 3 card. Shouldn't this be more spread?
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Mark Diehr
United States
Orlando
Florida
flag msg tools
mbmbmb
Re: Dominion Card Randomizer
This can happen pretty regularly even if you are using the randomizer deck with the real cards, since there are a lot of 4 and 5 cost cards in the game. It's an interesting way to play, since there are a lot more choices when you haven't quite made it to Gold yet. And of course, with the new 6 cost cards there are even more decisions to make when you can buy Gold!
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Marshall Miller
United States
Malden
Massachusetts
flag msg tools
designer
publisher
The Warren is a roleplaying game about intelligent rabbits trying to make the best of a world filled with hazards, predators and, worst of all, other rabbits.
badge
Marshall is a Boston-based researcher and game designer.
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer
This is totally beyond the scope of your tool but I would like to see a program that collects interesting card combinations like those suggested in the end of the rules (e.g. "Big Money", etc). People could submit a combination, including name and description. Then you could randomly select from the pool of combinations and rate them once your game is over. This would allow you to select for interesting combinations and randomly select from combinations with high ratings.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Kevin Bourrillion
United States
Mountain View
CA
flag msg tools
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer
garion wrote:
My first test of your randomizer resulted in a very expensive bunch of decks... No cost 2 cards, 1 cost 3 card. Shouldn't this be more spread?


That's the thing about randomness; weird things happen. It's one of the things I love about Dominion -- you never know what kind of weird board you might have to adapt to next.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Kevin Bourrillion
United States
Mountain View
CA
flag msg tools
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer
FuManchu wrote:
kevinb9n wrote:
Unless you're re-seeding the RNG nondeterministically between each card, there are still only 2^32 possible sequences it is capable of producing. (If, again, it's a typical RNG as used in Java etc.)

When shuffling a deck of playing cards, it's much "worse": there are more than 10^58 possible decks that the RNG is incapable of producing for every one that it is!


Your statements both intrigue and frighten me. Do you know of a good resource that I can study so that this makes more sense to me? I write programs in my spare time and admit I don't know enough about how RNG's work.

Robert


Don't be frightened. It's still perfectly good enough for game play anyway. After all, there are gazillions of 52-card deck arrangements that you'll never ever see in your lifetime because you just can't get around to it, but that doesn't lessen the value of the arrangements you do shuffle and the games you play with those.

The most important thing to understand about these RNGs is that they're really PRNGs -- pseudorandom number generators. They are actually deterministic; just in a way that's difficult to detect. There are also true RNGs, such as you find on random.org, which require special hardware. I think most of the problems of pseudo-randomness melt away if you simply re-seed the generator every now and then using something like "system time in nanoseconds when the request was received"; no one can possibly game that by timing their request to come in at an exact nanosecond.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Kevin Bourrillion
United States
Mountain View
CA
flag msg tools
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer
Oh, for learning I suppose you could start with wikipedia:
http://en.wikipedia.org/wiki/Pseudorandom_number_generator

I don't know that much about them myself (considering my job is building Java core libraries).
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Brad Brooks
United States
West Hills
California
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer
FuManchu wrote:
kevinb9n wrote:
Unless you're re-seeding the RNG nondeterministically between each card, there are still only 2^32 possible sequences it is capable of producing. (If, again, it's a typical RNG as used in Java etc.)

When shuffling a deck of playing cards, it's much "worse": there are more than 10^58 possible decks that the RNG is incapable of producing for every one that it is!


Your statements both intrigue and frighten me. Do you know of a good resource that I can study so that this makes more sense to me? I write programs in my spare time and admit I don't know enough about how RNG's work.

Robert


Geoff Engelstein did a GameTek segment that talked about this which you can listen to here.
3 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Zack Hiwiller
United States
Winter Park
Florida
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer - Updated 7/23
Just bumping this so folks can check out the update.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Jonathan Ham
United States
The Colony
Texas
flag msg tools
badge
HONK HONK
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer - Updated 7/23
I just found a bug in this. I was using the base Dominion set, Envoy, and Black Market (no Intrigue). I had the option "If there is an Attack card, require a Reaction card." enabled, and got two Moats in the set.
The full set of 10 was:
Moat, Moat, Workshop, Woodcutter, Chancellor, Thief, Bureaucrat, Throne Room, Council Room, Adventurer.

Edit: Apparently this isn't limited to just the Moat. Using the same parameters, I got a double Throne Room.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Zack Hiwiller
United States
Winter Park
Florida
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer - Updated 7/23
Jonathan, you are right. I will look into this next time I dig into it. For some reason, it isn't correctly flagging the nine cards already chosen when it picks the tenth. In the meantime, just generate a new ten cards. The problem isn't with the random distribution.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
ŁṲÎS̈
United States
Mesa
Arizona
flag msg tools
F*** it! Do it LIVE!
badge
Didn't know what to spend all this sweet GG on, so I bought the overtext.
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer - Updated 7/23
thumbsup

Nice work, Zack.

Hope you don't mind, I stole your idea for outlining the cards by expansion for my own card randomizer/analyzer thing.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Carsten ◄► Wesel
Germany
Pinneberg-Quellental
Germany
flag msg tools
badge
Avatar
mbmbmbmbmb
Re: Dominion Card Randomizer - Updated 7/23
monteslu wrote:
Hope you don't mind, I stole your idea for outlining the cards by expansion for my own card randomizer/analyzer thing.
Do you have a link for us?
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
1 , 2  Next »   | 
Front Page | Welcome | Contact | Privacy Policy | Terms of Service | Advertise | Support BGG | Feeds RSS
Geekdo, BoardGameGeek, the Geekdo logo, and the BoardGameGeek logo are trademarks of BoardGameGeek, LLC.