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

Dominion: Prosperity» Forums » General

Subject: Dominion Card Randomizer Updated for Prosperity rss

Your Tags: Add tags
Popular Tags: [View All]
Zack Hiwiller
United States
Winter Park
Florida
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
With much thanks to BGGer:
David Briel
United States
Indianapolis
Indiana
flag msg tools
badge
Wallop !
Avatar
mbmb

the Dominion Card Randomizer is updated for Prosperity.

Quick change log:

- Prosperity cards added, naturally

- Added a "Require 1 card that allows you to trash something" filter. This question seemed to come up often in personal plays "Do we have anything to get rid of curses?" so I added a filter on it.

- Changed the "If Attack card exists, require Reaction card" filter to require Moat instead of any reaction card since that is what folks were using it for anyway.

- Removed the "Equitable Cost Distribution" filter. 1) With prosperity, having five of your cards cost 2-3 seems a little archaic. 2) When combined with all the other filters, I was getting way too many infinite loops where there just weren't enough sets that could fill all the requirements. I don't think this was a very popular feature, but yell at me if you did this ALL THE DAMN TIME and need it.

As always, let me know if there are bugs and features you desire. The more features I add, the more I have to test to make sure it works in concert with all the other filters and features (source of earlier problems), so please only ask for something if you would use it a lot. This was originally created for personal use, but nonetheless I aim to please. And hey, if I keep this updated, maybe I'll have enough geekgold for an avatar and all the bits and pieces that go with it someday!
17 
 Thumb up
5.36
 tip
 Hide
  • [+] Dice rolls
Ido Abelman
Israel
Hod Hasharon
flag msg tools
Avatar
mbmbmbmbmb
you should probably add a colony/platinum randomization. It doesn't seem too hard to program - randomize a number between 0 and 9, if that position in the cards array is occupied by a prosperity card, add platinum and colony.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Derek Thompson
United States
Marion
Indiana
flag msg tools
badge
Avatar
mbmbmbmbmb
Awesome. Love your randomizer and use it all the time.

I would like a couple features if possible and if they are easy to implement:

Would it be possible to change "include a reaction card" simply to "include Moat and/or Lighthouse"? Lighthouse never gets noticed since it is not a Reaction card, but they both serve the purpose people want: warding off attacks.

Secondly, we used the equitable distribution feature sometimes, but obviously Prosperity ruins it. Would it be difficult to implement a "choose your costs" option, where you just pick how many you want of each cost, and then it randomly picks among those costs?

I was also wondering if it will also generate randomly "Use Colony/Platinum" or not with Prosperity mixed with other sets, according to the Prosperity rules? (Though personally, I'd just use them all the time, and it's not like I can't just roll a die for that.)
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Zack Hiwiller
United States
Winter Park
Florida
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
CBpegasus wrote:
you should probably add a colony/platinum randomization. It doesn't seem too hard to program - randomize a number between 0 and 9, if that position in the cards array is occupied by a prosperity card, add platinum and colony.


Yes, that is upcoming. I just wanted to get this up there while I had an hour to spare so people could start using it.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Michael Giron
United States
Fort Collins
Colorado
flag msg tools
badge
Avatar
mbmbmbmbmb
Really cool app!

One small glich I noticed while hitting randomize a few times, was that the Bank card sometimes shows up duplicated in the same set of 10.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Zack Hiwiller
United States
Winter Park
Florida
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
eskmoe wrote:
Really cool app!

One small glich I noticed while hitting randomize a few times, was that the Bank card sometimes shows up duplicated in the same set of 10.


Fixed that bug. Somehow Bank got into the database twice.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Matt E
United States
Minnesota
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
The biggest problem I have with the app is the 'Use 3-5 Alchemy cards recommendation'. The problem is that when it's checked, 3-5 Alchemy cards always appear. Every set uses Alchemy. It should also be able to create sets with no Alchemy cards, just not sets with 1, 2, or any number greater than 5.

Here's the algorithm I suggest, reposted from another thread:

LastFootnote wrote:
There are 10 cards in a set. Each set with Alchemy cards has x=4 cards on average. Since there are y=12 cards in the Alchemy set, there are y/x (3 with my sample values) sets worth of Alchemy cards. If you have z=90 total cards in your collection, that's z/10 disjoint sets worth of cards total (9 for my sample value). So I'd like to have a randomizer that gives a (y/x)/(z/10) = 10y/xz chance of seeing Alchemy cards in a set, then if there are Alchemy cards, pulls 3 to 5 such cards from Alchemy and the rest from the other sets.

Again, the reason I suggest this particular algorithm is that it does a fairly good job of making sure you don't see each Alchemy card more or less often than each non-Alchemy card.


EDIT: This is actually the only problem I have with the app. In general, it's a good app.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Zack Hiwiller
United States
Winter Park
Florida
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
If I read you right, there's an easy way to do this as is and it only takes two steps.

1) Uncheck the recommendation box and draw ten.
2) Then if you get exactly one or two alchemy cards in the ten it pulls, run it again with the box checked.

In this way you will be guaranteed zero or 3+.

I'll consider adding this as a feature though.

(The 3-5 filter is actually just ensuring 3+. You can end up with 6, but after 5 it starts pulling from the available pool.)
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Matt E
United States
Minnesota
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
zhiwiller wrote:
If I read you right, there's an easy way to do this as is and it only takes two steps.

1) Uncheck the recommendation box and draw ten.
2) Then if you get exactly one or two alchemy cards in the ten it pulls, run it again with the box checked.

In this way you will be guaranteed zero or 3+.

This doesn't do much to solve the problem. Even though you won't be using Alchemy cards in every setup, you'll still be using them in almost every setup, since the probability of getting at least one Alchemy card in the set is very high. As a result, you still play with the Alchemy cards much more often than the other cards.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Zack Hiwiller
United States
Winter Park
Florida
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
I'm sorry then, I'm not sure what you are getting at. You want something that rolls a dice as to whether have Alchemy or not at 25.86% (10*12)/(4*115) where the 115 changes depending on the sets selected and then if that roll is successful to add 3-5 Alchemy cards?
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Josh
United States
Missouri
flag msg tools
mbmbmbmbmb
First of all, I love this app and it's the only one I use. The use of: card art, and sorting of cards by cost, is the reason it's #1 in my eyes. Some of the other web page apps that have appeared over the last year-or-so have not pulled me away from this one. So, good job and thank you.

LastFootnote wrote:
The biggest problem I have with the app is the 'Use 3-5 Alchemy cards recommendation'. The problem is that when it's checked, 3-5 Alchemy cards always appear. Every set uses Alchemy. It should also be able to create sets with no Alchemy cards, just not sets with 1, 2, or any number greater than 5.


I noticed this too once you implemented alchemy and think there should be a way to not always have them appear in the mix even when checked.

One thing I noticed a long time ago(intrigue/seaside), and I'm not sure if it is a bug or just coincidence, is when you click the ANOTHER TEN CARDS? button, you always seem to get a few cards that were in the previous set?

 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Zack Hiwiller
United States
Winter Park
Florida
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
frog213 wrote:
One thing I noticed a long time ago(intrigue/seaside), and I'm not sure if it is a bug or just coincidence, is when you click the ANOTHER TEN CARDS? button, you always seem to get a few cards that were in the previous set?


First, thanks for the kind words.

I think it should be fairly common (more common during intrigue/seaside, but less and less as the card pool increases) to get two sets in a row that share a card. My combinatorics is extremely rusty so maybe someone can help me out here? If there are 115 cards, then there are 115 choose 10 sets of 10 or 7.45403942 × 10^13. If you take those ten cards out, then there are 105 choose 10 or 2.88484586 × 10^13 sets that would not share a card or 38% of the total sets. So 62% of the time the next set will share at least one card? I could be wholly off. It has been many years since I had statistics.

It's clear I should do something about the Alchemy part. I'm just not sure what yet.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Mike Krajewski
United States
Fitchburg
Wisconsin
flag msg tools
badge
Avatar
mbmbmbmbmb
zhiwiller wrote:
It's clear I should do something about the Alchemy part. I'm just not sure what yet.


Directly from Donald X, here's how he suggests to do it:
donaldx wrote:
For those of you wondering how to have a normal randomizer deck with one of everything and yet still end up with 3+ Alchemy cards when there are any at all, here's a simple method: Deal out the first 8 cards. Then if there are any from Alchemy, deal out 2 more, skipping cards that aren't from Alchemy. If otoh there are no Alchemy cards, deal out 2 more, skipping Alchemy cards. Put all of the skipped cards back on top of the randomizer deck. This way you see Alchemy cards just as often as other randomly mixed in cards, but they show up in clumps.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Matt E
United States
Minnesota
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
zhiwiller wrote:
I'm sorry then, I'm not sure what you are getting at. You want something that rolls a dice as to whether have Alchemy or not at 25.86% (10*12)/(4*115) where the 115 changes depending on the sets selected and then if that roll is successful to add 3-5 Alchemy cards?

Yes, this is exactly it. You hit it on the nose. For your randomizer, the 12 and 4 would stay constant (since you can't disable specific cards), so the 115 is the only thing that should change as you select and de-select other sets.

mkrajew wrote:
zhiwiller wrote:
It's clear I should do something about the Alchemy part. I'm just not sure what yet.


Directly from Donald X, here's how he suggests to do it:
donaldx wrote:
For those of you wondering how to have a normal randomizer deck with one of everything and yet still end up with 3+ Alchemy cards when there are any at all, here's a simple method: Deal out the first 8 cards. Then if there are any from Alchemy, deal out 2 more, skipping cards that aren't from Alchemy. If otoh there are no Alchemy cards, deal out 2 more, skipping Alchemy cards. Put all of the skipped cards back on top of the randomizer deck. This way you see Alchemy cards just as often as other randomly mixed in cards, but they show up in clumps.

That works great if you're going through an entire randomizer deck, drawing each new set of 10 without replacing the previous sets in the deck. A randomizer app like this one does replace the cards for each set, so Donald's algorithm would result in using Alchemy cards a disproportionately large number of times.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Whitney Barnes

California
msg tools
LastFootnote wrote:
The biggest problem I have with the app is the 'Use 3-5 Alchemy cards recommendation'. The problem is that when it's checked, 3-5 Alchemy cards always appear. Every set uses Alchemy. It should also be able to create sets with no Alchemy cards, just not sets with 1, 2, or any number greater than 5.

Here's the algorithm I suggest, reposted from another thread:


With a computer, the answer's much simpler; tell it how many Alchemy cards are allowed (0,3,4,5) and have it repick the set of 10 until it comes up with an acceptable set.

Personally, on my own program, I have it pick 0,3,4, or 5 potion-costing cards, so Herbalist and Apprentice come up a little more often than the others, and turns up a lot with no potion-costing cards.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Matt E
United States
Minnesota
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
I guess that's slightly simpler to code, but if I were designing a randomization algorithm, I'd prefer one that didn't have to unnecessarily cycle through a loop three times on average.

And as you say, your method uses each Alchemy card less than each non-Alchemy card on average, just as Donald's algorithm uses each Alchemy card more than each non-Alchemy card.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Paul W
United States
Eugene
Oregon
flag msg tools
Avatar
mbmbmb
It depends on how you want to weight things. It you want all "legal" choices to be equally likely, the following solution works:

N = total # of kingdom cards

Total number of "legal" sets w/ 3-5 alchemy rule:

T = (N-12) choose 10 + (N-12) choose 7 * 12 choose 3 + (N-12) choose 6 * 12 choose 4 + (N-12) choose 5 * 12 choose 5

0 Alchemy card set proportion:
0Alch = (N-12) choose 10 / T

3 Alchemy cards set proportion:
3Alch = (N-12) choose 7 * 12 choose 3 / T

4 Alchemy cards set proportion:
4Alch = (N-12) choose 6 * 12 choose 4 / T

5 Alchemy cards set proportion:
5Alch = (N-12) choose 5 * 12 choose 5 / T

So one method of generating these sets is to calculate these probabilities, generate a random number between 0 and 1, and then draw the appropriate number of alchemy and non-alchemy cards.

For example, with the 115 non-promo cards, the breakdown would be as follows:

0 Alchemy set-ups: 82.1%
3 Alchemy set-ups: 15.2%
4 Alchemy set-ups: 2.5%
5 Alchemy set-ups: 0.25%
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Matt E
United States
Minnesota
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
So that algorithm causes each legal set of cards to turn up with equal probability. The alchemy cards will each still see less action than the non-Alchemy cards, though. I think the frequency with which you see each individual card is more important than the frequency with which you see each set of cards, but that's my opinion.

Bear in mind also that as the number of non-Alchemy cards continues to grow, the proportion of legal sets with Alchemy will shrink much faster than the actual proportion of Alchemy cards in the pool.

EDIT: For instance, once the 2011 expansions release (one small set and one large set), the number of Dominion cards will be about 150. Your algorithm will then only produce sets with Alchemy about 6% of the time, meaning that each Alchemy card would only show up about once every 51 games, as opposed to once every 15 games (there are 15 sets of 10 cards in a deck of 150).
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Doug Linger
United States
Renton
Washington
flag msg tools
mbmbmb
zhiwiller wrote:
As always, let me know if there are bugs and features you desire. The more features I add, the more I have to test to make sure it works in concert with all the other filters and features (source of earlier problems), so please only ask for something if you would use it a lot. This was originally created for personal use, but nonetheless I aim to please. And hey, if I keep this updated, maybe I'll have enough geekgold for an avatar and all the bits and pieces that go with it someday!


Include Platinum and Colony cards if Prosperity is allowed. Since they don't always show up, include them in the display if they should get added, and either specifically mention they're not added if they're not, or just don't include them among the cards in the supply.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Charles Waterman
United States
Commerce Township
Michigan
flag msg tools
mbmbmbmbmb
CBpegasus wrote:
you should probably add a colony/platinum randomization. It doesn't seem too hard to program - randomize a number between 0 and 9, if that position in the cards array is occupied by a prosperity card, add platinum and colony.


Sorry Mr. Abelman, but -

Zack? Nahh, don't bother. Too many people will start a 5 page long thread on here about whether you should have added that and what probabilities should have been used, etc. I have a d10.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Paul W
United States
Eugene
Oregon
flag msg tools
Avatar
mbmbmb
LastFootnote wrote:
So that algorithm causes each legal set of cards to turn up with equal probability. The alchemy cards will each still see less action than the non-Alchemy cards, though. I think the frequency with which you see each individual card is more important than the frequency with which you see each set of cards, but that's my opinion.

Bear in mind also that as the number of non-Alchemy cards continues to grow, the proportion of legal sets with Alchemy will shrink much faster than the actual proportion of Alchemy cards in the pool.


Yep, I agree that equal probability on a per-card basis is probably more useful. The question is: how to do that? Thinking further, this seems to be the case under the following circumstances, though it'd be nice if someone could double-check me on this:

N = total number of cards
X = proportion of 3Alch games
Y = proportion of 4Alch games
Z = proportion of 5Alch games

Enforcing Alchemy card rate:

X * (3/12) + Y * (4/12) + Z * (5/12) = 10/N
or
3X + 4Y + 5Z = 120/N

Enforcing non-Alchemy card rate:

(1-X-Y-Z) * 10/(N-12) + X * 7/(N-12) + Y * 6/(N-12) + Z * 5/(N-12) = 10/N
which also simplifies to
3X + 4Y + 5Z = 120/N

So we have a single equation in three variables (assuming N is fixed), which yields an infinite number of solutions. A single solution could be enforced by fixing a ratio in the frequency of the alchemy set types. If you fix them all to be equal, the result is:

X = Y = Z = 10/N

In short, you can have all cards show up with equal probability by having 3, 4, and 5 alchemy set ups selected each with probability 10/N.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Matt E
United States
Minnesota
flag msg tools
designer
badge
Avatar
mbmbmbmbmb
montebanc wrote:
CBpegasus wrote:
you should probably add a colony/platinum randomization. It doesn't seem too hard to program - randomize a number between 0 and 9, if that position in the cards array is occupied by a prosperity card, add platinum and colony.


Sorry Mr. Abelman, but -

Zack? Nahh, don't bother. Too many people will start a 5 page long thread on here about whether you should have added that and what probabilities should have been used, etc. I have a d10.

I doubt that'll happen. It doesn't matter which of the methods the program uses. As for arguing about whether it should be included, it's right there in the Prosperity rules clear as day, so it makes sense to include it as an option. Why would anyone complain about an option they can turn off?
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Charles Waterman
United States
Commerce Township
Michigan
flag msg tools
mbmbmbmbmb
OOPS, Sorry, I got here too late. It has begun....

(BTW - I LOVE this app and use it on my home PC nearly every time we play!)
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Paul W
United States
Eugene
Oregon
flag msg tools
Avatar
mbmbmb
montebanc wrote:
OOPS, Sorry, I got here too late. It has begun....


Actually, my posts aren't addressing the platinum/colony selection algorithm at all, as there are several trivial approaches which are all correct. Implementing the 3-5 alchemy cards restriction is less intuitive, but I've laid out two possible techniques depending on the outcome desired.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Charles Waterman
United States
Commerce Township
Michigan
flag msg tools
mbmbmbmbmb
zhiwiller wrote:
With much thanks to BGGer:
David Briel
United States
Indianapolis
Indiana
flag msg tools
badge
Wallop !
Avatar
mbmb

the Dominion Card Randomizer is updated for Prosperity.


HOORAY!!!!! I wish I could throw 2 or three geek gold your way - but I don't have any!!!

zhiwiller wrote:

- Changed the "If Attack card exists, require Reaction card" filter to require Moat instead of any reaction card since that is what folks were using it for anyway.


Rats. Wish you hadn't changed this. I LOVED getting Lighthouse or Secret Chamber with this, and often kept cycling through new sets until Moat stopped showing up and one of the othjer two cards did instead. Why not keep the old functionality as a choice (including Watchtower now, heehee!) with the Moat Only choice as a mutually exclusive possibility as well? Onegaishimasu???

Montebanc?
 
 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.