Where Art, Math, Programming, Science and Crowd Control Meet.

Imagine 100 squares arranged in a 10 x 10 grid like this:

Each square can change color from white to red, depending on a rule it shares with the other squares.  In using this rule, each square can use 2 pieces of information:

  1. Its color
  2. The number of adjacent squares that are red or white

Each square repeats this rule indefinitely, and each square updates simultaneously — it doesn’t wait for any other square to finish updating before it does.

So with these restrictions, what results would we get?

Let’s start with a very simple rule:

Reverse your color

The grid would flash white and red indefinitely. Here are some still frames of the results:


 Not very interesting or surprising.  But what if the rule is:

Turn red if an even number of adjacent squares are red; otherwise turn white

Then we’d get a flashing mosaic of highly organized patterns (that eventually repeat).  Here are the still frames:

What’s interesting is the patterns show GLOBAL order; they make sense when viewed as a whole, yet there was no global authority creating the pattern, just a series of squares operating independently with only local information.  Yet from this local information, global order emerged.

In a sense, this is no mystery. Even though each square only has access to adjacent squares, those adjacent squares have access to adjacent squares, and so on.  So information does propagate, although it gets processed every step of the way.  Yet the results are still surprising because there’s no explicit coding for global order.  It just emerges.  It’s self-organization.

Seeing this in action — even on a very simplified case — suggests an explanation for much of the order seen in the real world.  For instance, do social groups self organize?  What about biological organisms or their components?  Crystals?  Other physical processes?

This even raises questions about the nature of intelligence.  It’s easy to think of intelligence as a global entity, but could intelligence reside in “the whole system” much as the order reside in the whole grid (squares + propagation + rule + initial state)?  What is the whole system in the case of intelligence?  The whole body?  The person and culture?  Once again, I think of Searle’s Chinese Room thought experiment.  Is intelligence in the entire set-up of this room?

Let’s keep the same update rule, but vary the initial state.  What if  we start off with a random red square?  Here are the frames:

A small change in initial conditions can lead to dramatic changes in the results.  Chaos Theory.

Order in the initial conditions implies order in the results.  For instance, if a pattern exists in the initial conditions (such as a square of 4 red squares), you get:


Even the symmetry seems to be related to the symmetry of the initial state.  For instance, start with an orderly initial state that exhibits diagonal symmetry and the patterns you get also appear to be diagonally symmetrical:


We could go on forever.  Change the size of the grid and the patterns change. Change the update rule and the patterns change.

But don’t take my word for it — try it out yourself!  Don’t worry about all the code — just focus on the lower right hand panel.

So we talked about Emergence and mentioned Chaos. But the medium upon which we explored this — the squares and the update rules are an instance of a class of structures called Cellular Automata.  They’ve been used to study computation, traffic jams, generate music and may even form a basis for learning and games — topics I’ve been exploring and may blog in the future.

Cellular Automata can vary dramatically.  They can have any number of dimensions, more than one state, be non-deterministic and so on.

Update rules can be as involved as you like.  For instance, a very popular Cellular Automaton is the Game of Life and it has a more complex update rule:

  1. Any red cell with fewer than two red neighbors turns white.
  2. Any red cell with two or three red neighbors stays red.
  3. Any red cell with more than three red neighbors turns white.
  4. Any white cell with exactly three red neighbors turns red.

This leads to surprisingly complex scenarios, and people have experimented with different initial states and documented the results.  There’s documentation on a whole category of patterns, properties and interactions in this system, and people have actually built functioning computers in this system!

You can try the Game of Life Here


16 thoughts on “Where Art, Math, Programming, Science and Crowd Control Meet.

    1. My pleasure! This is really cool stuff. I haven’t heard of Boids, but I visited the link, along with some related ones, and it looks cool. I think this is an instance of Swarm intelligence/behavior, but it’s similar to CA’s in that order emerges. Thanks!

      1. Yes, it’s incredibly fascinating. It’s also unnerving that we can create models that can (and sometimes must) take on a life of their own. It’s like we are no longer in control and must observe and learn about the behavior of our own creations.

      2. It makes me think of the sci-fi stories that play with the idea of more sophisticated versions of these experiments that the inhabitants mistake for reality or even this very Universe…

      3. Thanks for that. Having studied quantum physics I was ready to disregard the idea but Wikipedia tells me that “Quantum versions of digital physics have recently been proposed” so it looks like I have more reading to do! 🙂

      1. Lol, that’s what “To Do” lists are for — to stare accusingly at you.

        Don’t worry if you don’t get to it. If you happen to get to it, yes, I’d love to know your thoughts. If you don’t, no biggie.

        I’ve jumped into my next interest any way — Game Theory. But I’ll probably spiral back around to Cellular Automata 😀

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