Skip to Content
 

The math of it all

97 replies [Last post]
The Magician
Offline
Joined: 12/23/2008

I am wondering just when is math required in board game design. I am not skilled in math in fact I rather dislike doing math. I know it's used in figureing prbability. My maze board for example, I know the size will influence game play time among other things. Can I get by without getting into the mathematics as long as it's functional?

Rick-Holzgrafe
Rick-Holzgrafe's picture
Offline
Joined: 07/22/2008
Playtesting beats math

Reiner Knizia holds a doctorate in mathematics, but has said that his games are designed and tuned by doing lots of playtesting, not by mathematics.

I find math useful for some design purposes, but I don't do heavy probability studies. Occasionally a spreadsheet is useful. But the best thing you can do is just playtest the daylights out of your design, and make changes whenever you find something that isn't working as well as you'd like. Repeat until it's glorious.

InvisibleJon
InvisibleJon's picture
Offline
Joined: 07/27/2008
Can I navigate a new city without using a map?

The Magician wrote:
Can I get by without getting into the mathematics as long as it's functional?
Your question and the title of this post have the same answer: Yes, but some things will take you longer, and you may feel frustrated.

Different mechanics have different mathematical properties. For example: Rolling two six-sided dice to get a number from two to 12 yields a different distribution of results than rolling a 12-sided die and re-rolling results of one. You probably already know this, but that's just the tip of an iceberg of hidden math in game design.

Consider a tile-based maze game where the object is to get from the start to the finish (I know that your game is different, but I'm trying to make the example at least a little relevant). You're trying to figure out how long the game will take to play. You know that a player's average movement result is 5 spaces, and that roughly every other turn will result in an encounter at a random point in the player's movement. You also know that about 33% of encounters will end the player's movement prematurely. You want to know what the player's actual average movement per turn will be so you can figure out how far the exit should be from the starting point. Once you have that distance, you can design your tiles to ensure that they permit average travel distances that conform to what you need.

You can either design and re-design prototypes and play test them until you hit upon the right answer, or you can do some math beforehand and help yourself out. Before reading further, take a moment and guess how far a player's actual average movement will be.

Okay. Let's do the math: Half the time, you move five spaces. The other half the time, you have an encounter. Let's figure out how far you move on a turn with an encounter. Two-thirds of the time, you do just fine and get to move your full five spaces. One-third of the time, you stop at a random point in your movement. That means that you'll stop in the middle of your movement (on average), and that's three spaces. Averaging two fives and one three together gives 4.33. That's how far you move on an encounter turn. Now average a normal turn and an encounter turn. Averaging five and 4.33 gives 4.66. This means that a player moves an average of 4.66 spaces per turn, or 14 spaces every three turns. If you want a play to take an average of 10 turns, you'll want the exit to be about 46 spaces from the start. We learned something else, too: It looks like the encounters don't really slow players down as much as we might have expected them to.

Sounds complex? Perhaps, but imagine doing all of that with no math. Imagine figuring that out with physical prototyping and trial and error. That's a lot of work. Math can be very helpful and save you a lot of effort. The effort you save is effort you can use to make your game better or make other games.

(I acknowledge that there's a lot of implied math in the example, like a random encounter during movement averaging out to be the middle of your movement, but this wasn't intended to be a math lesson. My goal is to point out that many games have a lot of math hidden in them, so knowing how to model that math can save you a lot of labor.)

Lucas.Castro
Lucas.Castro's picture
Offline
Joined: 10/22/2008
Intuition > Math

My pet-project is a board-based wargame, which is a genre that would seem to lend itself to using mathematics for balance. I have 4 different factions in the game, and each faction and each unit should be balanced to keep the game fair.

But in practice, it is almost impossible to use math to balance a complex game like that. The primary reason, in my experience, is because it is impossible to both:
A) Consider ALL the factors that affect any given calculation; and
B) Assign the correct value to ALL those factors.

The danger is when you use math and thinking that you have accomplished both A and B, when in fact you have not. You might blindly trust your math, when you should not.

That being said, I have used spreadsheets and math extensively to game me within a roughly balanced state (and I mean VERY roughly). I then use playtesting and intuition to do the rest. Once you get to a point where you know your game so well (at least for a wargame), intuition is really your best tool prior to playtesting. I now use the current state of the game as a baseline for future balance.

simons
simons's picture
Offline
Joined: 12/28/2008
Computer simulations are also a way to go

I agree that in the end, there is no substitute for playtesting, however math can be a good first sweep (the way grade point average or standardized tests are often a first sweep). If you have some way of approximately quantifying everything, it gives you a good starting point (from which you can figure out if the supposed “extraneous” factors really can be ignored). Although, as I said, it’s more and less useful, depending upon your game. Wargames seem especially prone to requiring math; games like Settlers of Catan, maybe not so much.

Along with plain mathematics, computer simulations can also be a good tactic.

(The next two paragraphs are a bit technical, but are another tactic I use to save time, if you’re interested)

My favorite computer simulation is something called a genetic algorithm (or though I’ll admit, what I use isn’t usually a true genetic algorithm). For those who don’t know what that it, basically it is a computer simulation based on the principals of natural selection. You come up with a problem, and fine some way to quantify the answer to the problem. You then come up with a large number of randomly generated solutions. You assign each solution a “fitness,” which is basically a way to measure how good the solution is. You then take only a certain proportion of the solutions (only the best ones), and delete the rest. From the remaining solutions, you keep a few exact duplicates, and you “mutate” some of them randomly (or, under some algorithms, you “breed” the solutions, and create a new set of solutions that are hybrids of the previous set), in order to keep up some amount of variation. You then repeat the process for the new generation of solutions. Do this 1000 times, and you often have a pretty good answer.

For a more concrete example, I’m working on a wargame right now. Each player, when developing a character, can choose from a number of different stat increases, and I wanted to develop them in such a way that all were roughly equivalent (so there is no single best thing to choose). So, I came up with a test set of possible advancements each character could have (such as +1 Attack, or +3 Dodge and +2 Armor, or...). At the beginning, each of 1000 or so characters were randomly assigned an advancement. Each generation, each character would fight against another random character within the population. The winner of the battle would contribute 2 “offspring” to the next generation, and the loser would be killed and contribute nothing. Occasionally some characters would be randomly switched to a different advancement (maybe 2% of the time). Characters would fight for 1000 generations (or something like that, I can’t honestly remember the numbers), and at the end of it, I looked at what the distribution of different advancements were. If, for example, +3 Dodge and +2 Armor was unfairly powerful, often it would represent 70-90% of the population (and thus, I would need to tone it down for the next simulation). If it was too weak, it might only represent 1-3% of the final population, in which case I would need to tone it up in the future. I knew I was finished when no advancement ever had more than ~20% of the total population at the end of a simulation (although, afterwards I ran a slightly simpler test to make sure this was reasonably accurate).

That said, when it came down to playtesting, I discovered that +3 Aim/+2 Dodge was more powerful than my computer said it would be, because my simulation had only considered melee combat. In the playtest, archers were using Aim it as well, and often badly injuring characters before they even got to melee. Similarly, I have yet to figure out how spells that ignore Armor will have an impact on that stat’s power (though so far, it hasn’t made a real game-shaking impact).

That might have been overly technical, if so I’m sorry, although I think it was one of the most useful things I learned during my short time as a computer science major, so I thought I would share it. (If I did a bad job explaining it, and you’d like to know more, PM me and I’ll try again)

Simon

seandavidross
seandavidross's picture
Offline
Joined: 08/12/2008
If this was BGG, I'd have given these a thumbs up

InvisibleJon wrote:
imagine doing all of that with no math. Imagine figuring that out with physical prototyping and trial and error. That's a lot of work. Math can be very helpful and save you a lot of effort.
That was a very good example. If anyone is interested in seeing another example of how math can be applied to save effort, but also to inform the design of a scoring system, there's a link in my BGDF profile to some designer notes for one of my games.
simons wrote:
That might have been overly technical, if so I’m sorry, although I think it was one of the most useful things I learned during my short time as a computer science major, so I thought I would share it. (If I did a bad job explaining it, and you’d like to know more, PM me and I’ll try again)
I think you did a very good job explaining it, and I really enjoyed reading about how you applied GAs in your design process - but, then, I'm a Computer Science graduate with an interest in evolutionary computing, so I can only speak for myself...

Howitzer_120mm
Howitzer_120mm's picture
Offline
Joined: 03/04/2009
If this was BGG, I would have given you guys a tip

That was a really interesting read. Of course, I also love math. :)

ReneWiersma
ReneWiersma's picture
Offline
Joined: 08/08/2008
I use a lot of math during

I use a lot of math during game design. Most of it before prototyping. This way I can get an idea of how the numbers work out, before actually making the proto and figuring out later why the game didn't work. I don't like prototyping so if I can catch a few errors by working through some math beforehand that saves me a lot of work.

Much of the math I use is pretty simple. I have a tile game where each turn 3 tiles per player are auctioned. If the game takes ten turns with five players I need 3 * 5 * 10 = 150 tiles. With three players I would either use only (3 * 3 * 10) 90 tiles during the game, leaving 60 of them unused, or I could make the game last longer taking up to (150 / (3 * 3)) = 16 turns. With five players and ten turns each player would have 30 tiles at the end of the game. With three players and 16 turns each player would have 48 tiles at the end of the game. So, doing this little math exercise learns me that a three player will game either result in a great deal of unused tiles, or with each player ending up with more tiles at the end of the game. I have to make sure the game system is robust enough to handle the option I choose to go with.

larienna
larienna's picture
Offline
Joined: 07/28/2008
Math reference

Like I said in other thread, I am currently reading some books about math in probabilities. I am understanding half of it but I could always make a reference sheet that could explain some stuff. Still, it probably already exist somewhere on the internet.

As for computer generation, is there software that allow you to do these generations without actually programming the whole thing yourself.

For my starcraft lite variant, I tried using a ponderation for each stats to compare the strenght of units with each other. It's really hard to do and it's really hard to determine the ponderation. There is also diffierent scaling: linear, exponential, etc. So my evaluations where pretty approximations. Probably computer generations would allow to create a better ponderation.

In overall, if an hour of math can make me save much more time as prototype building and play testing, then I don't mind using it.

One of my habits is that I have a lot of symetry in my games. This is somewhat a way to make a game balanced intuitively without needing to do calculations and testing.

The Magician
Offline
Joined: 12/23/2008
This is great feedback. Thank

This is great feedback. Thank you! I will have to print this and take it with me to take it all in.

The Magician
Offline
Joined: 12/23/2008
Jon, that was a really helful

Jon, that was a really helful example. Thank you! I look forward to checking out your website and games when I can get a good chance.

Mitchell Allen
Mitchell Allen's picture
Offline
Joined: 08/09/2008
Math, Shmath! I hate math too...Sometimes

One thing I have discovered about my design philosophy is that everything seems to boil down to simple hoarding.
Maybe it is the influence of the games that I enjoy playing: PC simulations.
Your basic resource gathering priorities determine your success in advancing the capabilities of your units, factories and ultimately, your empire.

Translating that into board games has been an eye-opener for me. I found that crude increments in probabilities were sufficient - no less than 10% increments. This makes my math simple, giving me more time to play-test and tweak.

Most of the time, I use a 10-20-30-40 ratio to delineate attributes, rates of change, and chance of encounters.
That 10% works just as well as 5%, 8% or 15%: it simply means "Not very often".

There is one aspect of math that's really important: scale. It wouldn't do to have gold trade on the open market for $6,000 USD per ounce. Yet, without careful scaling of money, troops or any other economical aspect of your game, you risk creating unrealistic worlds.

coco
Offline
Joined: 07/27/2008
fractals, for example.

I'm investigating how to create 'fractal' maps that can be explored by the players. I mean, generated during play. The maps must be logical, as if they've been built by intelligent creatures. So there must be no paths to 'nothing', no loops, ...

That's why I'm trying to use fractals. Fractals usually have a tree structure. I'm a math teacher and I've been working with fractals a bit, so I hope I find an elegant solution. I'm working with seeds right now (a seed is a number used to generate random sequences).

Just an example on how math can be used in game design.

bluesea
bluesea's picture
Offline
Joined: 07/28/2008
coco wrote:I'm investigating

coco wrote:
I'm investigating how to create 'fractal' maps that can be explored by the players. I mean, generated during play. The maps must be logical, as if they've been built by intelligent creatures. So there must be no paths to 'nothing', no loops, ...

coco,
check this out, maybe it will give you some inspiration.

http://www.ted.com/index.php/talks/ron_eglash_on_african_fractals.html

The Magician
Offline
Joined: 12/23/2008
coco wrote:I'm investigating

coco wrote:
I'm investigating how to create 'fractal' maps that can be explored by the players. I mean, generated during play. The maps must be logical, as if they've been built by intelligent creatures. So there must be no paths to 'nothing', no loops, ...

That's why I'm trying to use fractals. Fractals usually have a tree structure. I'm a math teacher and I've been working with fractals a bit, so I hope I find an elegant solution. I'm working with seeds right now (a seed is a number used to generate random sequences).

Just an example on how math can be used in game design.


coco, Duuuuuuuuude! That is so cool you're into fractals. I was just talking about implementing fractals with my game and board structure, with my girl griend. We are both intrigued by sacred geometry. It is uterly fasinating. The pentigram for example infinately regenerates it's shape within itself. It is prety much the original structure of everything including the "golden section". That is a fabulous topic and would love to engage you on the matter.

Katherine
Offline
Joined: 07/24/2008
I have no interest in

I have no interest in entering into a discussion of fractals but was recommended profantasy for map making ...

http://www.profantasy.com/

The Magician
Offline
Joined: 12/23/2008
Yes I have never liked to do

Yes I have never liked to do math. However, I am interested in sacred geometry because it is utterly profound. Also I always used certain math in various ways in my art and the craft. I still work to get around math as much as possible when doing something.

seo
seo's picture
Offline
Joined: 07/21/2008
Fractal <> interesting maze

coco wrote:
I'm investigating how to create 'fractal' maps that can be explored by the players. I mean, generated during play. The maps must be logical, as if they've been built by intelligent creatures. So there must be no paths to 'nothing', no loops, ...

That's why I'm trying to use fractals.

But fractals are also recursively self-replicating, which will lead to extremely boring and predictable mazes, unless you use just a small fraction of a very complex fractal (though that might be too fiddly).

A better starting point for automatic generation of perfect mazes would be this.

The Magician
Offline
Joined: 12/23/2008
I had given some thought to

I had given some thought to use fractals to structure quests or objectives. As an abstract model for how objectives were structured. Here's an example of one of my ideas:

You have a tall triangle, The base of which is where you start out in relation to the challenges or missions. You could have like say seven missions within that triangle that lead to the top. At the top of the triangle, If completed, you are rewarded with something, an amulet or medel whatever. But, that triad that represents a sires of quests, could be just one in the game. You could have a pentagram as a structure of quests (I'm speaking about a game idea I had), and have five triads. So you could say "you must earn five pendents of something, each pendant will be earned by completing a sires of quests, structured in triads. You earn one pendant, move to another sires of missions and earn the next. Does this make sense to you as an abstract way of structering challenges in a game? The structure could branch out in infinate number. That was my first idea of using fractals in games.

Willi B
Offline
Joined: 07/28/2008
tesselations and mathematical art

These are areas that appeal to me for their immediate usage, though I know there is much more math that to be used in game design. I think that our studies in math will make our games better and allow our designs to be simpler to learn if mechanical elegance is the goal. The more we know about math, the more mechanics we will discover.

My 2 cents.

The Magician
Offline
Joined: 12/23/2008
Willi B wrote:These are areas

Willi B wrote:
These are areas that appeal to me for their immediate usage, though I know there is much more math that to be used in game design. I think that our studies in math will make our games better and allow our designs to be simpler to learn if mechanical elegance is the goal. The more we know about math, the more mechanics we will discover.

My 2 cents.

This is true and vary good point. Though I have often wondered, game design could be structured from a passion for music or art as well. And these are mathematically based in many ways. I have contemplated if mechanics could reflect the beautiful structure of a musical composition or art piece. Let's think about some similarities, not to compare apples to grapes, but it's a thought: In games, music, and art, they all share this: "balance". In my maze game in some of my brain storming session where I wasn't letting logic get in the way of ideas commeing in, I had imagined that maze squars had different colors and tones balanced in a certain way around the board. These tones would have distinct mechanical properties to them. But perhaps it wouldn't be like I was just painting a pretty picture and throwing in some mechanics. Perhaps the mechanics really works well together, the game play was sound. And the color helped the player understand the game more without haveing to look at rules.

coco
Offline
Joined: 07/27/2008
another example

The Magician wrote:
That is a fabulous topic and would love to engage you on the matter.

I apreciate that, but too many projects here at the moment ;-)

Here is another example of using math:

A deck of N cards. Type 1 cards are discarded during the game and never used again. Type 2 are discarded but can be used again. Type 3 can't be discarded. Each player can have a maximum of 5 cards on their hands at the end of the turn. The game ends when one of them have 5 cards of type 3 (cannot discard). If the drawing pile gets exhausted, then shuffle the discarding pile and use it as the drawing pile.

How many cards the deck should have so it is shuffled a maximum of X times during the game? (To avoid shuffling excess)

The answer depends on the rules, but I show this only as an example.

The Magician
Offline
Joined: 12/23/2008
Isn't "Dominian" like this?

Isn't "Domain" like this?

Willi B
Offline
Joined: 07/28/2008
nope

you reuse all cards and re-shuffle them back to a new draw stack when the draw stack is exhausted.

Mitchell Allen
Mitchell Allen's picture
Offline
Joined: 08/09/2008
Math and the Maze

seo wrote:

A better starting point for automatic generation of perfect mazes would be [this](http://www.mazeworks.com/mazegen/mazetut/index.htm).

Thanks for sharing this resource! Years ago, I wrote a maze game that used an unnecessarily complex algorithm (I didn't have a clue, really). The depth-first search is elegant. I'll finally be able to add mazes to my board game maker software.

Cheers,

Mitch

Katherine
Offline
Joined: 07/24/2008
Can I ask which game maker

Can I ask which game maker software? At the moment I am using a variety of soft ware - none of which is particularly good.

Mitchell Allen
Mitchell Allen's picture
Offline
Joined: 08/09/2008
Math of it All - Shazzazz

It's my own program. I use it to create mockup boards that you can print.
I've found that it's a lot of fun to use for the GDS challenges :)

Cheers,

Mitch

Rick-Holzgrafe
Rick-Holzgrafe's picture
Offline
Joined: 07/22/2008
Maze-makers

Mitchell Allen wrote:
seo wrote:

A better starting point for automatic generation of perfect mazes would be [this](http://www.mazeworks.com/mazegen/mazetut/index.htm).

Thanks for sharing this resource! Years ago, I wrote a maze game that used an unnecessarily complex algorithm (I didn't have a clue, really). The depth-first search is elegant. I'll finally be able to add mazes to my board game maker software.

I had to smile, Mitch! I also wrote a maze game once, and also had to design my own maze-generation algorithm. Mine is similar to what I saw at the site Seo posted, but not identical. In mine, the first pass only creates the "true path" from the entrance to the exit. A second pass then fills in the forks and dead ends. I found that to get really good mazes, I had to tune it a bit: if the true path wanders and curves too much, it fills the space leaving room for few false paths, making the maze too easy to solve. But if it doesn't wander enough, the solution is too short and obvious. I got the best results by having the true path favor going straight rather than turning a corner.

What else does your program offer? It sounds interesting!

The Magician
Offline
Joined: 12/23/2008
Rick, have you considered a

Rick, have you considered a complex vortex maze algorithm that can be repeted, making them join? However some tiles connect and some don't making it so the player can't easily see the joining paths.

Rick-Holzgrafe
Rick-Holzgrafe's picture
Offline
Joined: 07/22/2008
The Magician wrote:Rick, have

The Magician wrote:
Rick, have you considered a complex vortex maze algorithm that can be repeted, making them join? However some tiles connect and some don't making it so the player can't easily see the joining paths.

Nope, never thought about it. I only ever needed a maze algorithm for that one computer game, over 20 years ago now. None of my boardgame designs are maze-based.

In general, I regard mazes as too confining to make good boardgame environments. Players should have lots of interesting choices, and mazes by their nature tend to restrict choices. (But I know this isn't universally true; Dungeon Twister is an excellent game that takes place in a maze. Come to think of it, I really need to play Dungeon Twister again. It's been too long!)

The Magician
Offline
Joined: 12/23/2008
Since, designing maze game, I

Since, designing maze game, I been contemplating or should I say I find great aisthetical value in geometrical shapes. Often, I look at grids, grids with shapes on them, configurations of squars and rectangles and my mind indulges in thinking of these in turms of a game. If no mazes, I aften wonder how to create a maze like or labrinthical experience out of shapes. I don't know exactly how to put it, but I often wonder if some kind of maze experience can be created in mechanics, but not necessarily being a maze. It could be some simple squars and mechanics that create a complex puzzle. Or, a grid of colored squars that the colors have their own mechanic and some how form a game.

Syndicate content


forum | by Dr. Radut