Abstraction Design

The Introduction to a talk I gave recently...

Abstractions

Creating an abstraction means to take a phenomenon or concept and reduce it to a simpler version by ignoring certain factors. We can then use an abstraction to predict things about the more complex phenomenon or concept.
For example, we can predict the motions of entire planets just using a few simple equations, despite the fact that planets are extremely complicated, by reducing planets to points with mass.

When building abstraction with the goal of predicting something the goal is to simplify as much as possible, but not too much so that we don't lose the ability to predict what we want to predict. An abstractions that is more detailed (ignores less effects) can potentially predict more about the world, but at the cost of being more complicated.
In some sense that is what we have evolved to do as humans, is to learn to ignore the parts of the chaos of our universe that are not necessary for our survival.

Instantiation

If we take a model/abstraction and look at a particular case, we get a prediction.
If we are doing a thought experiment we can imagine what the future state might be.
Or if we have an equation that models some part of the world we can plug in some numbers into it and it will output predictions of what the state of the object will be in the future, for example.
But it recently got very interesting because computers have made this step much easier to do.

For example to produce images of a 3D scene a computer uses abstractions of how light bounces around in the world before it reaches our eyes to produce the images we see, and computes this 30 or 60 times per second.
In some way, by instancing abstractions computers turn them back into “realities” because they can feel surprising, interactive, etc...

Generalization

There is another thing we can do an abstraction. We can take any abstraction and generalize it without concern for whether it has a physical representation in our universe. You could say this is what pure mathematics is about.
For example, we can add a fourth number to space (x,y,z,w) and see what that would be like.

Any game does this and in a sense games are a natural part of a process to understand the universe, a universe in a more general sense including its generalizations.
For example, Sim City is based on a model (i.e. is an instance of an abstraction) of a city created by Jay Wright Forrester. Adding Godzilla to Sim City is a generalization.

Designing Abstractions

When you look at the world to design an abstraction, ideally if you are a physicists the abstraction might contain surprising results because it might encode more about the world than what you based in on when you designed it.

For example one of the things that made Einstein famous is that his theory of relativity predicted that light’s path would get bent by heavy objects, and in 1919 during a solar eclipse, it was confirmed by looking at starlight as stars passed behind the sun.

When you are making a Video Game, you have to decide what the abstraction level for each component is going to be.

The highest abstraction (i.e. the less detailed) might be “if statements,” for example: if (main character does this) then { react like this } else { react like that }.

For more detail we could use an equation for example to compute the path of a projectile. The equation might become more detailed: we could consider air friction, etc...

An equation might return something that the designer of the equation didn't expect. That's interesting because it means that systems that are at a more detailed level of abstraction are more interesting to explore since the designers themselves more often do not know everything that could happen with them. This effect is what I care about a lot as a designer.

If statements are essentially step functions, which also create discontinuities that are often a source of problems in models. It is possible to combine lots of step functions to make a smooth-looking curve, but it takes a lot more effort.

By the way, I am not saying that all if statements are bad, just that as a designer we chose to focus on a region to explore, and where we explore it is better to use more detailed abstractions. For example, in Miegakure there are characters that walk around using simple state machines. I choose to not explore their internal state very much, as just their change in position is interesting enough with respect to the core of the game.

7 Responses to “Abstraction Design”

  1. This is a very nice line of thinking, reasoning, and explaining.

    Related (possibly isomorphic) claim: "Integer numbers are more interesting than real numbers."

    🙂

    • aaron parr says:

      Integers are real numbers.

      Do you mean to say that rational numbers are more interesting than integers or vice versa?

      • Wolfgang Keller says:

        Integers are rational numbers.

        Do you mean to say that p-adic numbers are more interesting than real numbers or vice versa?

        😉

  2. Jake says:

    You seem to be confusing abstractions with approximations and models.

    For example predicting planetary motion is an abstract concept; it says nothing on the how only the what. We can create a highly detailed model of the planets, taking into account each planets' size, density, shape and also general relativity. Or we can create a simpler model using point masses and Newtonian mechanics.

    Both models are only approximations of reality but both will predict planetary motion. On the highest level it does not matter which model is used only what it does.

  3. Vyacheslav says:

    Hi, Marc! Thanks for this piece.
    I'm pondering approach "code as evolving design document".
    Thinking in terms of OOP sometimes help to produce interesting abstractions in game design. One example is physics based games. If all objects have weight then throwing any object can break something, knock out an enemy.
    There is also roguelike's kitchen sink approach when you get so many variables that unexpected (funny) things happen. Although these games tend to have very discrete (step function) behavior. And things produced by rng tend to be boring.
    Puzzle games tend to explore fewer systems and prioritize interesting consequences over random possibility space explosion. Many puzzle designers are interested in things they don't understand and computer acts as visualization tool to better understand these systems. More important problem for me is to figure out how to link complex puzzle system to human condition. Small puzzle games I did were too abstract and concerned block movement and playing with numbers. Ability to link those parts and touch people - this is where genius lies.

    • marc says:

      About the human condition thing, I think Miegakure does some pretty great things about that, but I don't want to talk about them yet.

  4. Peter says:

    Glad to see news in here. It has been dangerously quiet since May.

    Using abstraction is indeed a very humans solution. But i think, we might hit a barrier at some point: where a phenomenon looses a critical component at a high level of abstraction, and at the same time lies beyond the realm, we can grasp. An example might be: finding a general solution to the navier-stokes equations.
    But then again, maybe things like miegacure push the limits of our imagination in the right direction.

Leave a Reply