Establishing the Variable Set

March 8th, 2021

The first step in building the mathematical model for a game is the determination of the set of variables used in the mathematical model. Many designers fail to recognize the gravity of this task; they slap together a messy heap of variables, figuring that they can always add more variables as needed. This approach yields confused and tangled sets of variables for which it is impossible to build a coherent model. 

The definition of a variable set requires the application of two concept from vector calculus: first, the variable set must be orthogonal and second, it must span the vector space. Don’t panic — this is just the mathematical way of two ideas that are actually pretty simple. When we say that variables are orthogonal, we mean only that they don’t overlap. When two variables overlap (that is, they are not orthogonal), then you will have difficulty deciding which one to apply in any given situation.

This implies that your variable set must also be concise. You want as few variables as possible, because the more variables you have, the greater the chance that there will be some overlap between them. My experience is that it is better to have too few variables than too many. 

The second requirement counters the desire for conciseness. By “span the vector space”, we mean “covers every consideration”.  Of course, “consideration” is part of what you decide upon as a designer. You can bury your player in a lot of considerations, or you can make matters simpler. This is fundamental to the design process. What kind of decisions do you want your player to make? What decisions are interesting or informative? What decisions are tedious or boring?

You must have these considerations clearly established in your mind BEFORE you attempt to define the set of variables. 

I shall use a simple example here: launching a rocket into orbit around the earth. For this first lesson, I’m going to make things VERY simple. For this first step we will consider the simple case of a rocket going straight up as high as it can before it falls back to earth. The goal is to get it as high as possible while minimizing the cost of the rocket.

I can imagine a great many variables that we could consider. How many stages does this rocket have? Does it use solid rocket boosters strapped onto its sides? Are we going to take into account something called “MAXQ”, the stress placed on the rocket’s structure by atmospheric resistance? 

The real task here is to establish the absolute minimum variable set that can cover the situation. I see just two primary variables:

Engine power
Fuel supply

These are the primary variables: the ones that the player will directly control. They influence the secondary variables, which in this case are simple:

Weight
Cost

These determine the maximum altitude that the rocket will reach:

MaxHeight

 There — we have established our variable set.