InteractiCA

More Information

This project is part of an Independent Study Project at North Carolina State University.

By utilizing interactive sketches, we wanted to find out whether students can understand concepts in computational thinking through cellular automata.

We hope you enjoy exploring cellular automata!

~ Christopher Fields & Alex Boots

Lesson 1.2 - Elementary Cellular Automata

In this lesson, we will invesigate the formulation of Elementary Cellular Automata rulesets & corresponding rule numbers using a cell's neighbors.

Learning Objectives

By the end of Lesson 1.2, you should be able to...

  • Define the basic concepts of an Elementary Cellular Automaton
  • Identify cellular automata rulesets and be able to predict changes in these rulesets
  • Formulate a rule number based on a particular automata's ruleset

Let's revisit our definition of cellular automata. In the previous lesson, we found that CA are composed of cells that interact over time steps called generations. For the purposes of this lesson, we will focus on Elementary Cellular Automata (ECA): automata comprised of cells with two states and rulesets depending on the state of their nearest neighbors. But what do we mean by neighbors and rulesets?

In general, a CA neighborhood is a group of cells surrounding a particular cell, within some distance. Remember that an ECA's rules are based on its nearest neighbors. Note that the left/right neighbors of the far left/right cells are assumed to be off cells. Select a cell below to see its neighbors:

Select a cell to see its neighbors.

A CA's ruleset defines the way that its cells interact. Remember the "flipping" automata from last lesson? The flipping nature describes that automata's ruleset. We have provided the first two generations of that automata below (given a predetermined initial state). Notice that this automata's cells actually only depend on the previous state of themselves and not their neighbors.

Select a cell from generation 1 to see which cells from generation 0 it was generated from.

Cellular automata rulesets are often described by giving a set of configurations of states between generations. For our "flipping" automata, this would mean the below configurations are true. For example, the first configuration shows that if a cell and both its neighbors are on during some generation, the resulting cell in the next generation will be off. Try to match each output of the previous simulation to one of these (feel free to use its neighbor selection tool).

Ruleset for the "flipping" automata.

Often, cellular automata are classified by a rule number that describes what their particular ruleset does. Our "flipping" automata is actually called rule 51. Why 51? The naming convention for rule numbers was created by Stephen Wolfram and is known as Wolfram Code.

The specific number assigned to a ruleset comes from the binary representation of on and off states. For example, 001100112 is binary for 51, the ruleset from the last lesson. Since there are 8 possible configurations of a cell with its immediate neighbors, there are 256 (28) possible rulesets.

Click each button to toggle the state of the output cell and see the cooresponding rule number.

27 = 128

26 = 64

25 = 32

24 = 16

23 = 8

22 = 4

21 = 2

20 = 1

Check Your Understanding

The following is the same generation simulation from the previous lesson. This time it is using a different ruleset. This ruleset is often used when describing ECA because of its interesting patterns and chaotic nature. Try and figure out which ruleset this is.

Define the ruleset for this cellular automaton. Click each button to toggle the state of the cooresponding output cell.

What is the rule number for this ruleset?