Skip to Content
 

Need Math Whizzes To Balance Variable Build Orders

10 replies [Last post]
Goatfarmer03
Offline
Joined: 04/02/2010

I'm developing a card game in which the players are trying to build towers faster than the other players using a Blind Trading Mechanic I came up with. Everyone has the same deck of 40 cards, but you can only use the cards you receive from other players to build your tower. You must build your Tower using cards in the exact order you received them (no rearranging, ala Bohnanza)
Basically everyone will be trying to get cards in a certain order to finish all 8 of their Tower Floors before the other players. What order they are trying to get will be listed on a Foundation Board (aka Build Queue). I want to have 10 different "Build Queues" that players have the same % chance of achieving in the same time frame. This is where you statistics and mathematical people come in, because I am horrible at it. Help me come up with 10 Balanced "Build Queues". Here is the Card List that will be in everyone's 40 card Deck:

(stone cards are used to build the floors)
(10x)-Single Stone Cards
(5x)-Double Stone Cards
(3x)-Triple Stone Cards
(2x)-Quadruple Stone Cards
(broken stone cards will remove a number of stones from your tower and can collapse floors)
(6x)-Single Broken Stone Cards
(3x)-Double Broken Stone Cards
(1x)-Triple Broken Stone Card
(other cards)
(5x)-Mortar Cards
(2x)-Wild Cards
(2x)-Engineer Cards
(1x)-Complete Floor Card

Here is an example Build Queue I came up with:
*1st Floor* 6 Stone (using any combination)
*Mortar*
*2nd Floor* 5 Stone (must include a "Double Stone")
*Mortar*
*3rd Floor* 4 Stone (must be all "Single Stones")
*Mortar*
*4th Floor* 4 Stone (must include a "Triple Stone")
*Mortar*
*5th Floor* 5 Stone (must include a "Quadruple Stone")
*Mortar*
*6th Floor* 5 Stone (must be a "Double Stone" and a "Triple Stone")
*Mortar*
*7th Floor* Must Be A Wild Card
*Mortar*
*8th Floor* 1 Stone

There will be 8 Rounds of trading with 5 Card hands. After each round they will use the cards they received so far to build their Tower, then it will go to the next round. Can anyone come up with 9 more for me to playtest? Or 10 new ones if that one sucks.

Thanks
-goat

simons
simons's picture
Offline
Joined: 12/28/2008
What are you trying to balance?

I'm a little confused, how do you want things to be balanced? Is the idea that everyone has to use the same total number of stones? If so, couldn't you just rearrange your 8 floors here in several different permutations (i.e. swap floor 3 and floor 7, swap 8 with 2 with 5, etc)? Also, couldn't you just add and subtract one from a few various floors (i.e. +1 stone needed for floors 2 and 6, -2 stone for floor 1)? Or is there more to it than that?

Simon

Nix_
Nix_'s picture
Offline
Joined: 09/23/2009
Probabilities

I rather enjoy the mathematical part of making a game. It seems to me that you are trying to balance the difficulties of building a certain part of a tower. I don't have time to do it for you, but this is how its done.

First determine the probility of drawing certain type of card. To do this divide the number of those cards in the deck by the total number of cards in the deck. Do this for each type of card you need to build the level of the tower.

Next, figure out how many of each type of card it will require to build a level. Take the number from part one, and raise it to the power of the number of that type of card needed . Then multiply all of those numbers together.

For example if to build a floor you need 3 wood cards 2 stone cards. If the deck has30 cards then, 5 of them are wood, and 10 of them are stone. For wood: (5/30)^3. For stone (10/30)^5. Then multiply those two really small numbers together. The smaller the number the harder it is to build the floor. If the numbers for two different floors are the same, then those two floors are the same difficulty to build.

Hopefully this hellped, but more likely it just made your head spin.

simons
simons's picture
Offline
Joined: 12/28/2008
Nix_ wrote:For example if to

Nix_ wrote:
For example if to build a floor you need 3 wood cards 2 stone cards. If the deck has30 cards then, 5 of them are wood, and 10 of them are stone. For wood: (5/30)^3. For stone (10/30)^5. Then multiply those two really small numbers together. The smaller the number the harder it is to build the floor. If the numbers for two different floors are the same, then those two floors are the same difficulty to build.

Actually, I think that's not quite how that works. I think that would be the right idea for rolling dice in a perticular order, but not for drawing a set of cards. First, you don't take into account how many cards are drawn, or the fact that they can be drawn in different orders (wood, wood, brick or wood, brick, wood give you an equivalent hand). Also, every time you draw a wood, it makes you less likely to draw another one, and more likely to draw a stone.

For a simple example as to why, think about this: what if you have a deck that has 8 cards, with 4 red cards and 4 blue cards, and you needed 3 of each. Is your chance...
(4/8)^3 * (4/8)^3
1/2^3 * 1/2^3
1/8 * 1/8
1/64?
Now, if you drew 8 cards (all of them), this might argue that your chance is 8/64=1/8, when in reality your chances are 100%.

This is hard stuff, and I'm actually not sure how to wrap my brain around how to get the right answer. I'll keep thinking, but would be curious if anyone else knew how to figure this out (I really love the mathematical part of game design as well).

Goatfarmer03
Offline
Joined: 04/02/2010
Wow, thanks alot everyone. I

Wow, thanks alot everyone. I have twiddled with the rules a bit after testing some stuff out. I am going to make up some preliminary rules and post them to download. That should give everyone a better idea at how the Trading happens and what cards do what.

Piqsid
Offline
Joined: 02/17/2010
Brute Force

Here is the brute force method:

Deal out every possible five card combination from your 30 cards and then count up how many of them are the combination you want. Divide the second number into the first and you have your percentage.

First the easy part. There are 30 possible cards for the first card, and 29 possible second cards. For each of those 870 2-card combos (30 X 29), there are 28 possible cards for number three. In total there are 30 x 29 x 28 x 27 x 26 = 17,100,720 possible 5 card combos.

Now, how many of those are what you want? You want 3 wood and 2 stone. The first combo you are looking for is W-W-W-S-S. So how many of these are there? Since there are 5 wood cards and 10 stone cards and we have to consider each of these cards as being different you get 5 x 4 x 3 x 10 x 9 = 5,400.

The next hand down the line is W-W-S-W-S = 5 x 4 x 10 x 3 x9 = 5,400.

Hopefully you can see that there are going to be 5,400 possible ways to deal each hand that we want. So how many hands are there?

W-W-W-S-S
W-W-S-W-S
W-W-S-S-W
W-S-W-W-S
W-S-W-S-W
W-S-S-W-W
S-W-W-W-S
S-W-W-S-W
S-W-S-W-W
S-S-W-W-W

I think there are 10 of them. This means there are 10 x 5,400 = 54,000 hands that could be dealt that would give you 3 wood and 2 stone. Sounds like a lot, but 54,000 / 17,100,7200 = (about) 0.003, or about 0.3%.

I have taken way too many math classes in my life, and I do not know if there is a more elegant way to reach this solution. If there is, with would require months of math class, while the brute force method requires only a few minutes and a calculator.

I hope this helps.

stubert
Offline
Joined: 01/26/2009
There is more at stake here

There is more at stake here than simple probability, since you are dealing in game theory.

(by the way, I am a statistical systems analyst for an electrochemical engineering company - statistics, probability and tweaking multi-variable systems are my speciality)

The things that will most drastically affect your probabilities (since OTHER PLAYERS are what YOUR hand depends on) are:

1) is your "build queue" visible to the other players?
2) how is the "trading" done?
3) are decks replenished (i.e. - discard pile reshuffled into a new deck) once they are depleted?
4) does each player get their OWN "build queue", or are there a list of possible build queues that ALL players may attempt to achieve?
5) how many towers is each player trying to build (i.e. - can you use pieces that you CAN NOT use for one tower on another in an attempt to complete your 3 towers in the least amount of time)?

I will address these points in order, but first a note about probability as determined by an outside source. You must take into account that once people begin sending their cards to another deck, the ability to figure probability of cards that are able to be used to build goes pretty much out the window. It appears that you actually have the possibility with 4 other players of getting NOTHING BUT SINGLE STONE CARDS (assuming that you must give your entire deck away each game, if you received the 10 single stone cards from each of the other 4 players' decks, you would receive 40 single stone cards and nothing else).

Essentially, if you are trading cards from your deck with cards from your opponents' decks, you and your opponents will be "creating" a whole new set of decks that, although they are drawn from the same larger pool of cards, will not follow the rules of probability as stated, and will DEFINITELY disallow a great percentage of 8-level towers (upwards of 95%)

For example, in your build queue above, if no one ever traded you 2 triple stones, a quadruple stone or a wild card, you would be unable to complete your tower. Furthermore, if you HAD to play them in the order you received them, being forced to play both of your wild cards before the 7th floor would preemptively prohibit victory (assuming someone only traded you 2 of them, but if not - some other player is likely not to be victorious as well). Also, your tower necessitates more mortar than is available to you. Also, if you obtain enough mortar to build YOUR tower, some other player WON'T.

Point 1) This poses a problem for setting up your build queues. If they are visible to all players, then this game will take a very lonog time, since you will be at the mercy of the randomness of each deck - until someone has NO CHOICE but to trade someone something they need, they simply WILL NOT TRADE IT TO THEM. If it were me, and I could see my opponents' build queues, I would never trade them anything useful until I had to, and give someone working on their 3rd level a wild card, and someone working on their 6th level all single stone or mortar cards. Also, if you know someone needs mortar, you would give the mortar instead to people who did not need it, and since they would have to use the cards in the order received, they would be wasting the mortar they were given.

Point 2) Without SEVERELY limiting how players trade (or without giving them access to cards in their own deck) it is nearly impossible to determine the end net composition of any player's set of 40 cards. As I had stated earlier, it is possible for someone to get nothing but single stone cards. It is also possible for someone in the above scenario to get 20 mortar cards. This would mean that the other 4 players would be trying to build levels with a total of 5 mortar cards, implying that if any one of them used a third mortar card, the other 3 of them would have a 0% chance of being traded a mortar card (while the person with 20 mortar cards has a 50% chance of drawing a mortar card). This means that for mortar cards (in a 5-player game), your (net usage) deck has the possibility of containing anywhere from 0-20 mortar cards.

For a quick exercise, let us apply this example to all of the cards in a 5-player game (assuming four OTHER players are supplying your deck with an assortment of 40 cards total from the 160 contained in their decks).

If we take the possibility of having the highest concentration of any single card first, you can see that there is a possibility of getting 10 single stone cards from each player, giving you 40 single stone cards (we will start here and work down until we are examining possibilities with NO single stone cards in them).

This gives you 1 possible deck with 40 single stone cards in it. If you take 1 single stone card out and replace it with any other possible NON-SINGLE STONE CARD, you have 10 other cards that COULD be that 40th card. This gives you 10 possible decks comprised of 39 single-stone cards. If you apply this up until you have 36 single-stone cards, the formula remains rather straightforward, giving you 1+10+100+1000+10000, or 11111 possible decks with 36 or more single stone cards in them. Once you get to 35 (since there is no longer the possibility of a single other card filling all four other slots in the deck), you must take into account ALL other possibilities among the remaining cards to fill in those 5 slots. There are not 10 different cards, but rather 9.991071 (since there are only 112 possibilities out of 116 to fill in that 40th slot). When THIS possibility is multiplied out, it gives you 99911 possible decks, rounding out your possibilities for ONLY DECKS WITH 35 OR MORE SINGLE STONE CARDS to just over a hundred thousand possibilities.

Calculating each separate probability for each combination to guarantee that each build queue wll be able to be built (especially given that at least one of the decks contains ABSOLUTELY no mortar) is impossible.

Point 3) If decks are replenished once they are depleted, then figuring probabilities is nearly irrelevant (though even harder than I have stated already, given that teh second iteration of 40 cards introduces a fractal-like calculation matrix in which the 20-mortar card deck is the only deck that can give out a winnable quantity of mortar, and the 40-single stone card deck is the only deck that can give a winnable quantity of single-stones - AND EVERY POSSIBILITY IN BETWEEN). Eventually, players will obtain what is necessary to build their queue, but as stated earlier, if other players can see your build queue, the game can grow stale easily when three rounds progress with excellent strategy employed by all players so that no one can build their respective towers.

Points 4 & 5) By allowing several possibilities for players to attempt, it allows for a player to change their aim mid-game. If, for example, there are 15 buildings,they might all have the same 1st level, then break down from there - 7 of the same level 2 and 8 of a different level 2, then each of the two different 2nd levels would break down further. This would allow players to see which tower you were attempting to build, but not figure out your exact plan until you were closer to victory. Giving the game an end point and seeing who is closest to their goal might also keep the game from stalling. And, if you were able to choose between three (hidden) different build queues, your opponents might have a harder time figuring out which you were trying to build.

Some of these problems might be lessened if your builders had a "warehouse", in which (even though they HAD TO PLAY certain cards in a specific order) they could hold up to 1 additional card for each 2 levels they have built, for example. You might represent this as a space with 4 slots on it, and each slot says something like "level 1", "level 2", "level 4", and "level 6". You would only be able to fill any of those slots if you had already built whatever level was labeled on that space, but you would only be able to EMPTY those spaces if you were legally able to play one of those cards. This would give a small buffer (to increase likelihood of victory), but would still necessitate a certain amount of strategy (to aptly use the buffer "warehouse" space) in order not to reduce your ability to win. This would also keep the game from stalling (since players could keep cards they could not play NOW, but would need later). It would also lessen the need for figuring the probabilities, since most any combination that could be fulfilled with the cards in a single deck would be OK (probability-wise).

Please let me know when you upload a set of rules so that I can give you a more detailed analysis.

Pastor_Mora
Pastor_Mora's picture
Offline
Joined: 01/05/2010
WTF????????????

I didn't quite get your explanation. Could you expand a little bit on it??....
LOL!!! (man, I miss emoticons)
You see, goat, that's what you get from asking the right people!!!

Take my word: just use the Fibonacci sequence for most rare to most common cards
And make decks for 52 or 54 cards, it will cost you the same as to print just 40

Keep thinking!

royalfa
Offline
Joined: 03/26/2010
Impressed

Hi there

Wonderful explanation about how some key points in the game affect the probability.

I wanted to ask some of the same questions above (queue visible or not, trading mechanic, etc.) and I too want to know when you upload the rules for a check.

I have some idea to make the queues but need to see how is the trading process, is there a respond (like a counter offer in game theory) and my idea have some more flexible construction mechanic: You don't have to play the stones in the "exact" order you receive them but maybe need to do something else (I think in something like a "turn to break the unnecessary stone" but the workhouse idea sound fine).

Pator_Mora:
Can you elaborate about the Fibonacci. please.
Can this method be used to have a fair percent of frequency cards (common, uncommon, rare,..) per booster, sealed deck and, ultimate, card box?
If I have a 110 card set with 5 frequency (common, uncommon, rare, very rare and unique) then how exactly use the Fibonacci sequence??

scifiantihero
Offline
Joined: 07/08/2009
@Royalfa . . .

. . . the way I interpreted his Pastor's comment about the Fibonacci sequence was (in terms of how I am thinking about a game I'm working on) that if I have a bunch of cards, and some of the cheaper ones will help to make bigger, rarer, more powerful ones, say, costed 1-5, that the Fib. would be a good way to allocate them. So, maybe I have 2 5-cost, 2 4- cost, 4 3-cost, 6- 2 cost, and 10- 1 cost. I also think his comment might have been a generalization with a little bit of humor intended, but I might be wrong.

I'm not sure it was meant to be applied for rarity distribution per CCG type product. But maybe it could be applied to the allocation of particular rarities within the whole set!

Also (kind of stealing the OP's thread here), do you think a CCG style distribution system is a good way to go? I wouldn't bet money on them right now. It seems like a more Limited game would whet people's appetites a little better at the moment! But that's just me.

:)

Pastor_Mora
Pastor_Mora's picture
Offline
Joined: 01/05/2010
First things first

First thing you have to ask yourself is:
"Why do I have a 110 cards deck???"

I assume you've heard about the sequence, if not,
http://en.wikipedia.org/wiki/Fibonacci_number

How you use it? It depends on the elements of your game. For a simple example, suppose you have a deck of:
1 unique card (say permanent items)
2 very rare (most powerfull actions)
3 rare (advanced actions)
5 uncommon (basic actions)
8 common (upgraded resources)
13 very common (regular resources)

You have a 32 cards deck, with 21 resources and 10 spells + a great item. Multiply the deck per number of players, and voilá!

For a 4 players game, you'll get that your deck is missing 18 cards! ;)

The idea, although, is to mix resources and actions, so there is a balance between them, because the sum of the first and second always equals the third. If you are asking yourself, for example, how many lands should I put to support a creature, or how many spells to affect it, well, you follow the scale. Put 13 land cards to support 8 creatures cards, or they won't be showing often enough. And put just 5 cards to affect them, or you won't have anything to affect in the first place. It really depends on what mechanic you are talking about.

Keep thinking!

PS if you add 1 & 21, you get a 54 cards deck! great for printers!

Syndicate content


forum | by Dr. Radut