# From Maths To Meeples

I wrote this piece for the magazine my old university maths society published back in September. The original piece was aimed at maths students, and I’ve edited it slightly to give more detail on the mathematical ideas.

Leaving mathematics behind was difficult. At university, it was the core of my identity. My friends were mathematicians, my shelves were piled with maths books, and my coffee was drunk from mathematical mugs. Four years on, I’m happy to say it still has a huge impact on how I think: in my work, as a software developer, but also in my game design.

In this article, I’ll be discussing some of the ways studying maths influenced my approach to game design.

# 1. The Need For Rigour

In both fields, there’s a huge focus on seemingly trivial details. This was a huge cause of frustration in my first year of studying. I’d covered all the interesting cases- why would it matter if n was 0?

I eventually came to appreciate the details, and this has been incredibly valuable when designing board games. It’s easy to overlook special cases, such as a player needing to play a card when they have no cards left. Eventually these cases will all happen: in fact, players often deliberately seek out these cases and try to exploit them.

While they’re not the most exciting part of designing a game, they’re a crucial one, and my mathematical training made them a lot easier to identify.

# 2. Choosing Axioms

When studying mathematics, axioms are the starting point for a theory. These can be thought of as basic, irrefutable truths, such as ‘if A=B, and B=C, then A=C’. They provide a base from which more complicated and surprising truths can be deduced.

There are a lot of interesting parallels between a set of axioms for a mathematical theory and a set of rules for a game. An ideal set of rules needs to be consistent and cover everything your game should do. If your rules contradict each other, or leave people unsure of what to do, then your game is fundamentally broken. The same applies to a mathematical theory.

In addition to functionality and consistency, your rules should also be as simple as possible. If a rule is too complex, one solution is to replace it with an equivalent but more intuitive one. The ideal solution, however, is to remove the rule entirely.

## The Axiom of Choice

There are some good examples of mathematicians trying to streamline a set of axioms. One example is the axiom of choice from set theory. Roughly speaking, this axiom is as follows:

“Given any collection of sets, a set exists which takes one element from each set in the collection.”

In everyday terms, you can think of the axiom of choice using drawers. If I have a drawer which contains pairs of socks, then I can go through the drawer, pick one sock from each pair, and put them in another drawer. This doesn’t seem like a very controversial statement- it might sound a bit pointless, but it certainly shouldn’t cause anything to go horribly wrong.

However, the other rules to set theory say things like ‘if I have two drawers of stuff, I can combine the contents and put it in a bigger drawer’. The axiom of choice seems a little complicated, and ideally, would be replaced by a simpler rule, or we’d remove it entirely.

Unfortunately, this isn’t possible. There’s no way to get rid of the axiom of choice. Even worse, the axiom of choice has some incredibly unintuitive consequences. Taken to a logical extreme, the axiom of choice leads to The Banach-Tarski paradox. This is a mathematical construction where a sphere can be cut into five infinitely complicated pieces, and rearranged into two identical spheres, with exactly the same volume. Obviously, this is impossible in reality, but it demonstrates how a simple and intuitive mathematical theory can break down spectacularly when you start messing around with infinity.

The game design version of this is far less dramatic, but it definitely still happens. A very small amount of complexity added to a game can very easily be exploited to create unexpected side effects. It’s often a difficult choice to make between a ruleset which doesn’t do everything you want, and a ruleset that can go to pretty weird places in the wrong hands.

## Geometry

Another example can be found in Euclidean geometry. Euclid put forward five axioms, from which all geometry should follow. The first four are totally intuitive, corresponding naturally to using a ruler and a compass to do geometry on paper. They say things like ‘if I have a straight line, I can take my ruler and make the line as long as I want’. The fifth axiom, however, caused centuries of controversy. There are various formulations of this axiom, the most illustrative being the triangle postulate:

“The angles in a triangle must add up to 180 degrees.”

Why is this axiom needed? Including this statement as a basic rule of geometry is incredibly dissatisfying. Mathematicians searched for a way to derive this axiom from the other four for two thousand years. The conclusion was that the axiom is indeed necessary- but only in Euclid’s geometry.

There are other alternate geometries, where the axiom may not be true. To illustrate this, consider a triangle drawn on the surface of the earth. The base runs along the equator, and reaches a quarter of the way around. The top of the triangle lies at the north pole. The two sides make a right angle at each vertex. Each corner of the triangle is 90 degrees, so the angles actually add up to 270 degrees. On the surface of a sphere, the triangle postulate is false.

Several times, I’ve seen an analogous situation in my game design. For example, I was making a co-operative game, which had some extra challenging cards in the deck. I spent weeks trying to find cards with the right difficulty level. Out of curiosity, I tried a game where I just removed the challenge cards, and it solved the problem completely.

Like the new geometries which were discovered by removing the triangle postulate, games can take surprising and interesting directions if you’re brave enough to relax rules which seem unquestionable.

# 3. Structuring An Argument

When analysing a game, it’s often useful to break it down into three stages, according to the MDA framework:

• Mechanics: The core rules of the game.
• Dynamics: How the rules interact.
• Aesthetics: The emotional responses to the game.

A good illustration of this is to consider the game of poker. The core mechanics are just a series of points where each player can choose to bet or to fold, and the ways hands are ranked. Bluffing is an example of a dynamic. The rules never say that you players should act as if their hand is better than it is, but it’s a consequence of the betting mechanics. The tension, that makes the game fun, is the aesthetic that is creating by the bluffing dynamic.

There’s a very similar structure to a mathematical argument. The three stages are axioms, lemmas, and theorems.

• Axioms: Basic assumptions from which the argument follows
• Lemmas: Useful consequences of the axioms
• Theorems: The end goals- an interesting or surprising fact

Starting with axioms, the aim is to create theorems, and lemmas are used as a stepping stone in the process. A good lemma has uses in many situations. Similarly, a good dynamic, such as bluffing, can re-used in multiple games just be adding in the right set of mechanics.

It’s also useful to consider these two structures when considering how much detail is needed when explaining a game. When learning mathematics, the best explanations I saw would break a theorem down into a set of two or three lemmas, from which the theorem naturally followed. The lemmas might take a few lines of explanation, but the shorter the explanations, the better. If the lemmas were clear enough, there was a really satisfying moment of realisation when you saw how they combined.

Similarly, a game shouldn’t have to explain how it will be fun. Ideally, players should be able to see the potential aesthetic just from the rules, but still be surprised while playing the game.