This is a tale of how complexity can arise from even the simplest of situations...
The image above is a fractal called the SierpiĆski Triangle. It emerged from the simple, local interactions of things called cells. These cells, along with the simple rules they follow, form what is called a Cellular Automaton (CA), which is a type of model that we can use to understand and explore many natural phenomena. There are many different types of CA. The ones we will focus on today are called Elementary Cellular Automata.
There are three important things you need to know about cells...
Traditionally, we call these states 0 and 1, but to make it feel more real, we're going to call the states asleep and awake.
Each cell uses information available to it in the current step to calculate its state for the next step.
In order to better see and understand this discrete stepping concept, press the "Start" button in the interactive below. The cells will transition to the next step each second for twenty seconds.
The flashes of green and gray look interesting, but it's hard to tell what kind of pattern (if any) is forming. To solve this problem, we typically display all of the steps we've run at the same time. Below, you'll find the same CA as above, but this time, we're displaying each step as a new row, moving downward over time.
Press the "Start" button to see the pattern unfold.
The cells are part of a network. Each cell is connected to the cells directly to the left and right of it. The three cells, togther, form a local neighborhood. Below, you'll find an interactive that helps illustrate this concept.
Hover/Tap a cell to see its neighborhood. Note that the cells at the ends of the row are connected; the circular, network representation helps clarify this.
Much like in real life, cells chat with their friends and neighbors to help them make decisions. In each neighborhood, the center cell decides its next state by looking at the current states of its neighbors and itself. Since the neighborhood has three cells and each of those cells can have two possible states, there are a total of eight different combinations of cells. Let's call these combinations social situations.
How do the cells know how to behave in these social situations? Well, similar to social situations in the real world, interactions in CA universes are governed by laws, which they call rules. However, unlike our own rules, theirs are exhaustive and inflexible; all situations are codified and all cells behave exactly the same way in each situation. Since there are eight social situations in elementary CA and because the center cell can choose one of two states for each of those situations, there are 256 different rules that the cells can follow.
Below is an interactive that shows the eight possible social situations (Groups of three cells on top) and the rule (Single cells on the bottom) that tells the center cell what to do on the next iteration. The eight cells on the bottom correspond to one of the 256 possible rules that elementary CA can have. Further, since the states are binary, we can create a binary number using the states (with asleep being zero and awake being one). This binary string can then be converted to a decimal number between 0 and 255.
Try clicking/tapping on the bottom cells to change the rules.
The last piece of the puzzle is to witness the changing of the states. Hover/Tap the cells in the interactive below to see how this transition works.
Recapping, elementary cellular automata have two states, which we have called "asleep" and "awake" for this demonstration. They update their states over discrete steps (usually over time), by interacting with their neighbhors. And, sometimes, the rules they use to make these updating decisions result in some interesting emergent patterns.
Below, you'll find a little sandbox where you can explore the 256 rules at your leisure.
Most of all... Enjoy yourself and see what kinds of patterns you can find!
Thanks so much for checking this out!
This interactive explanation is based on some of the research done by Stephen Wolfram in his book, A New Kind of Science.
And was inspired by Nicky Case and Vi Hart's Parable of the Polygons and Bret Victor's Explorable Explanations.