you're reading...

Mathematics of the Sandbox: Descend into Chaos

One of the key phrases that you quickly come across reading about EVE Online is Emergent Gameplay. It is a cornerstone of how the game is designed, how we discuss about it and also how CCP makes a business model out of the MMO. The developers have called it the Sandbox. But what is Emergence actually? Why does it create entertaining game experiences? Do we really need to loose stuff in EVE? What is special about PvP? How do you design a (game) system that supports emergence?

This is the first in a series of articles I am going to write, musing about these kinds of questions from a scientists point of view. I am going to discuss some of the simple models you can find in the literature about complex systems and will try to make a connection between the fascinating findings obtained in such models to the game we play. I hope that these discussions are entertaining in themselves and maybe, if we are lucky, will lead to some insights into the nature of the EVE sandbox. One of the central questions I would like to shed some light onto, are the roles different forms of player vs. player (PvP) interaction play in EVE. I am doing this project for my own education and entertainment and in doing so will try to provide references to the literature whenever necessary.

All the models presented here will be implemented in python and I will make the code available through ipython notebooks for those interested to play around themselves. A small warning before we begin: There will be some math coming up. Don’t be afraid, if you can play spreadsheets online you will have little problems with this stuff. Please note that it is at times very important to look closely at the graphs and diagrams. So take your time!

Descend into Chaos – The Logistic Map

Let’s start with one of the most simple but also most striking examples of a model that shows emergent structures and and a transition to chaos: The logistic map. Discussions of this model can be found in almost any book on complex systems. I have been looking into “Complexity: A Guided Tour” by Melanie Mitchell.

The model leading to the logistic map is deceptively simple. It can be written in a single equation:

logisticThis equation describes a very simple model for a population of individuals in a limited universe. The individuals are allowed to reproduce but they will also die. The universe has a maximum number of individuals that can be supported, the “maximum carrying capacity”. x_i is the number of individuals alive in the year i divided by the maximum carrying capacity. x is therefore a number between 0 and 1 where x=0.2 means that the current population is at 20% of the maximally allowed population. The rate of birth is proportional to the number of individuals. If you double the number of individuals also the number of offspring that join the population in the next year will double. This is expressed by the part of the equation

growthHere R is the population growth rate. If R=0.2 the population would grow by 20% per time step. This would lead to exponential growth. By the way, if we discuss economic growth, this is the equation that most people have in mind. Note that the a constant growth rate R implies more and more growth per year.

In a limited system exponential growth is not possible. At some point the limited carrying capacity takes an effect. This is modeled by the second term (1-x_i). The closer the current population is to the carrying capacity the more people will die because of overcrowding. The farther we are still away (smaller x) from the carrying capacity, the more people survive. In the simplified model of the logistic map both effects, birth rate and death rate are captured in a single constant R.

Now one can examine how a population develops in time if you start with an initial population x0 and fix the parameter R to a certain value. Starting from an initial population of 10% of the carrying capacity (x0=0.1) , let’s look how the population develops in time for R=2 (blue), R=3.2 (green) and R=3.5 (red).

logiOszFor a small value of R=2 (blue curve) the population initially rises and quickly stabilises at a value of x=0.5. Indeed it is easy to confirm for R=2 that 2*0.5(1-0.5) = 0.5. Now let’s increase the value of R slightly to R=3.2 (green curve). After the initial rise we observe an oscillation pattern. The population jumps between two distinct values from year to year. Note that a qualitative change has taken place in the behaviour of the system. From settling into a constant equilibrium value it has moved into an oscillatory solution. If we increase R again to 3.5 we get the red curve. Again we have kind of a oscillatory behaviour but now there are 4 values that the population cycles through. Interesting! Note that nothing of this is immediately evident in the simple equation we have written down above.

What happens if we tune up the parameter R once again? Say to R=3.738


The graph shows two curves. Both with an R-3.738. Focus on the blue curve for a moment. Again the behaviour is kind of oscillating or fluctuating between large and small value. However it is not apparent how many “solutions there are” There are four or five values that seem to recur but once in a while a different value pops up. The system has taken on a seemingly chaotic behaviour. This can also be examined by letting the system evolve from a slightly different starting point. Let’s vary x0 by one permille x0=0.1001. This results in the green curve. While at the very beginning the both populations behave very similarly, after a few generations they start to diverge and the values they take on do not have anything to with each other anymore. This is a simple example of what is meant by the butterfly effect.

We have varied the initial population a bit. Let’s see what happens if we vary R by a small amount. Let’s increase R from 3.738 to 3.74:


Huh? Now the two curves for x0=0.1 and x0=0.1001 follow exactly the same pattern. Also we are back to an oscillation with 5 values. From chaos we have re-emerged into a regime of order!

There is a nice way to visualize what is going on. We can make a 2-dimensional plot, which shows the possible values of the population versus the value of R. The starting value can be arbitrarily choosen and we will use x0=0.1 here. Also we discard the first 100 point in each time series to get rid of the initial phase where the system swings in.


Bifurcation diagram of the logistic map.

Now who would have thought that this innocent formula could lead to such rich structure? The line to the very left shows the single solution we have encountered in our first plot (blue curve). For R>3 the oscillations between two values develop. And also the split — a “bifurcation” in math-speak — into 4 states is clearly visible for R>3.45. The bifurcations continue with increasing R until we descend into a chaotic region. Note, however that even inside this chaos there are some clear structures visible of values that the system encounters more often than others. Also there are regions for R where order is suddenly reestablished as we have seen in the example before. None of this is obvious from the simple model we have used. These structures could be classified as emergent structures. In fact the logistic map is probably the simple dynamic system, with one time-dependent variable and one parameter, that exhibits chaotic and emergent behaviour. An interesting feature that is also a big theme of complex system and chaos theory is the self-similarity one observes in the picture above. Note how the bifurcation points look alike at different levels and scales.

A zoom into the bifurcation diagram to illustrate the self-similarity of the emergent structures on many scales. Note the scales of the axes.

A zoom into the bifurcation diagram to illustrate the self-similarity of the emergent structures on many scales. Note the scales of the axes. Can you find where this structure lives in the large diagram above?

Crucial ingredients for such structures to emerge in the system is on the one hand the iterative nature of the formula, which generates one situation out of the previous one and on the other hand the non-linear character of the formula. Without the second term we would just have gotten boring exponential growth. Remember, the second term implemented the limitation of the system by saying that there is a maximum number of individuals that the universe can sustain.

There are a couple of observations we can make on this simple example that we should keep in mind when talking about complex systems and try to connect it with a system like EVE Online.

  • Simple systems can exhibit emergent behaviour
  • Limitations are an important ingredient
  • The decent into chaos is often controlled by an external parameter. The same system can behave qualitatively differently, depending on the value of such a parameter.
  • Chaos does not mean the absence of structures. Indeed chaotic regions may display quite interesting, emergent structures
  • Even in a region of chaos small changes in the external parameters can lead to the reestablishment of order (the current situation on null sec comes to my mind)
  • Dynamic systems may show a self-similarity where a typical pattern repeats itself at many different scales

The logistic map is only one example of a very simple dynamic system. In particular there are no distinct individual actors in the model and the model makes no statement on structures that play out in spatial dimensions. Such kind of systems will be examined in following articles. For now I leave you with the wonder of the beauty of the logistic map.

You can use the code that was used to create the plots shown here to play around and explore the logistic map yourself!

Fly smart! Chira.

About chiralityeve

A rookie capsuleer exploring the depths of New Eden



  1. Pingback: The Rule of Law | States of Entanglement - 22/04/2013

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s


Copyright Notice

EVE Online and the EVE logo are the registered trademarks of CCP hf. All rights are reserved worldwide. All other trademarks are the property of their respective owners. EVE Online, the EVE logo, EVE and all associated logos and designs are the intellectual property of CCP hf. All artwork, screenshots, characters, vehicles, storylines, world facts or other recognizable features of the intellectual property relating to these trademarks are likewise the intellectual property of CCP hf. CCP is in no way responsible for the content on or functioning of this website, nor can it be liable for any damage arising from the use of this website.
%d bloggers like this: