You may do better with an approach that mimics the likely characteristics, and then selects cards that meet the characteristics, and then resolves conflicts. Here is a possible approach:
Consider the gross characteristics of such a deck: number and distribution of costs, number of +n Buys +n Cards +n Actions, number of duration cards, number of attack cards.
Now start the build by choosing a cost distribution, say 2 2's, 3 3's, 2 4's, and 3 5's.
Choose 20 cards at random with cost distribution mirroring the target distribution. Now try a subset of 10 appropriate cards. Check their stats against the others, e.g. number of +1 Buys. If all the stats match up, then check to see how many pairs of cards are disallowed. By whatever means, determine which cards out of the ten chosen do not represent a good fit to a random desired deck, and replace those cards with appropriate choices from the remainder of the 20 cards. If possible, let the stats dictate the
replacement subset. Now evaluate the modified deck, and see how many of the stats are
out of whack. Chances are good that you will converge to an acceptable deck within a
few trials.
If you implement this and find contrarily that chances are bad on converging to a good deck, then try resolving conflicts using a subset of 30 cards instead of a subset of 20 cards. I believe that finding a good set of characteristics will give you a way of
generating many good random decks, rather than just considering how often individual cards and card pairs occur or do not occur in favored decks.
Gerhard "Ask Me About System Design" Paseman, 2010.04.06
No comments:
Post a Comment