Each motif created by Granny Life Motif Generator is determined by a mathematical algorithm. This algorithm is a particular set of rules that takes one motif and turns it into another one. This creates a sequence of over 1400 unique motifs which users can select for the Granny Life project.
Let's break down how this algorithm works:
STEP 1: The zeroth generation
We start with "Generation 0", an initial motif that just has four "live" cells. We will call the white cells "alive" or "on", and the main-color cells "dead" or "off". In the case of the Granny Life project, each cell represents a cluster of two half-double crochet stitches. The outer border will always be white, and is not included in the algorithm.
STEP 2: Count your neighbors
Each cell has four neighbor cells at its corners. Along the diagonals these neighbor cells might be oriented in different directions, and at the edges we will copy and wrap around. The white image shows various ways that four pink neighbor cells can surround a blue cell.
In our original "Generation 0" image, each of the center white cells has two alive neighbors, each of the teal cells that touch the white center cells has one alive neighbor, and all of the other teal cells have zero alive neighbors.
STEP 3: The next generation
Now we will use the neighbor counts of each cell to decide if that cell will be alive or dead in the next generated motif. The rule we are going to use is the following:
Live/white cells will be alive in the next generation only if they have NO alive neighbors.
Dead/teal cells will be alive in the next generation only if they have JUST ONE alive neighbor.
What this means for our "Generation 0" is the all the white cells with 2 neighbors are going to turn OFF in the next generation, all of the teal cells with 1 neighbor are going to turn ON in the next generation, and all of the other teal cells (which have 0 neighbors) are going to stay OFF. According to our rules, Generation 1 will have eight alive cells, around the original white cells.
STEP 4: Keep going
We now have a new motif that we can use to generate yet another, and another, and so on. Each time we count up how many corner neighbors each cluster cell has, and then use that number to decide whether or not that cell will be alive in the next generation.
For the Granny Life project we require that the overall motif has between 35% and 50% alive/white cells, so neither Generation 1 or 0 could be used for the project. However as the generations continue, the white cells will grow and interact with each other to create more complex motifs that can be used for the project. Things start getting interesting around Generation 9.
Here are what Generations 2 through 9 look like, in order:
(coming soon)
(coming soon)