Rule 90 (1-dimensional cellular automaton)

Project here.

So I was fooling around with Snap, seeing if I could make anything worthwhile, and I decided to implement a cellular automaton. I didn't actually look at any existing cellular automata, and I decided to make up some rules. Here they are:

  1. All cells except the first and last ones have two neighbors.
  2. The first and last cells only have one neighbor.
  3. A neighbor is, in reference to a center-cell, a cell that is directly in front of or behind the center-cell.
  4. A cell can be alive or dead, or have a value of 1 or 0 respectively.
  5. If both of a cell's neighbors are dead, it is to switch its state to dead. (under-population)
  6. If exactly one of a cell's neighbors are dead, it is to switch its state to alive. (normal population)
  7. If both of a cell's neighbors are alive, it is to switch its state to dead. (over-population)

So after I finished implementing the automaton, I noticed that its output is very similar to some other 1-dimensional cellular automata, so I looked it up, and it turns out I accidentally re-invented Rule 90.

It's really of no use other than watching and seeing what a "random" seed does. Feel free to cannibalize it to make some other 1-dimensional automata like Rules 110 or 184.

2 Likes

Nice project! Here's another cellular automata I implemented:

Watch what happens after iteration ~10100.

Around 13500 it starts doing something very interesting around the border of the screen, continuing up to around iteration 20000+ (stops around 23100, returns to the center mass).

On another run, I messed around, took both stamp blocks out, and added one after the if/else block, then when I ran the project, it started to bounce around the screen, like a ping-pong ball. Sometimes it would appear to leave the screen, but it still is bouncing, sometimes modifying a few pixels.

And, I added a few more ants (via clones), and it works well. Oddly, it works slower in turbo mode (although fullscreen slows the project down considerably, too)