# Modelling invasions with adapted Conway’s game of life

If you haven’t already, see my previous post on coding Conway’s game of life and similar invasion dynamic based simulations. In this post I will focus less on the boring Python code and dive into trying different starting simulations and tweaks that will give us interesting results.

#### Test 1: Simple blobs

Let’s start simple. One blob of red and a slightly smaller blob of blue. What happens over time?

This slideshow requires JavaScript.

The blobs spread left and right into areas of no competition and a stale mate occurs across the centre. What is surprising is that despite fewer blues in the starting configuration, in later patterns the blue sometimes outnumber the reds in a single generation before periodically falling back down below the number of reds.

#### Black squares: Introducing bounds

It doesn’t seem right that the populations can grow without limit, so let’s introduce a new type of square: a black square

We tweak our original rules so that a black square cannot be populated. You can imagine this square representing oceans, or an immune person to a proximity disease for example. If we enclose the system with black squares, then the populations are bounded. It will also be interesting seeing how they interact in the presence of “obstacles” we make out of black squares.

For example the previous starting configuration ends up looking like this:

Running it for much longer gets some pretty surprising results, blue actually outnumbers red for a long time! The system is very chaotic. The shapes and mutations that occur can actually benefit blue even though it started out with less population.

The above lead me to believe that an important aspect of a population’s invasion ability is actually it’s shape and not total number of individuals.

### How to invade a country

I promise this title is justified.

Thinking back to the actual rules going on here, we can think of these simulations as invading tribes subject to conflict, overpopulation and underpopulation. Suppose blue have just arrived and know red are hiding on a peninsula connected by a narrow piece of land. Suppose each tribe has 8 members.

#### Shape 1

This is a very fruity way of saying, suppose our starting configuration looks something like this:

Note how there is one more blue in the line at the bottom than at the top. How does the land and conflict progress? Well, something like this:

It takes around 400 generations to kill off the red. Blue has the early space to really improve their numbers, before slowly killing off red who barely make it off the peninsula. The extar blue man at the bottom at the start meant that the bottom section of peninsula was invaded before the top.

#### Shape 2: How to invade a country….quicker!

The fight plays out like this

Red extinction happens in a very similar total number of generations. But at around 100 generations red are actually doing better than blue (and in 150 there is a splinter group of reds deep in blue territory.)

#### Shape 3: Optimal (that I could find)

If we say blue can be no more than 2 spaces away from the edge, what shape is optimal? Sadly with 8 blues to assign and a possible 66 places there are around 6 billion starting setups to test, so here’s just a few that I tried:

Let’s call the 347 one optimal. If red know this is how blue are going to set up, if they are only allowed to arrange within the left hand side, what’s a good defence?

### Red’s point of view: Defending the peninsula

From experimenting, in general, starting near the entrance of the left hand side is a good strategy, providing the best possible spread of red before having to contest space with blue.

The 3123 one in particular highlights the chaotic nature of these systems. The fight has early profile:

where red at many times have the majority, but lose it and become extinct, but only after a huge number of generations.

Finally, there’s a very important case to try:

In the next post I will be experimenting with different sorts of obstacles within the bounded region.