During the past few days I've made a machine that computes Wolfram's Rule 90 elementary cellular automaton:
I chose Rule 90 mainly because of it's simplicity: it is possible to implement it with only one XOR gate per cell, and wires coming from only two cells. This also makes it possible to fit a large number of cells (50x40 in this version) within TPT's screen. Here's a schematic diagram showing how it works:
The inputs of each XOR gate are connected to the upper-left and upper-right cell outputs, and the cell right above it is ignored. When one presses the "start" button, the first row, i.e. the "seed" row, is read and sent to the lower row. Each cell then XOR's the coming inputs, thus setting the state to 1 or 0:
Left | Right | Result |
0 | 0 | 0 |
0 | 1 | 1 |
1 | 0 | 1 |
1 | 1 |
0 |
...the result is also sent to next lower row of cells, and the process repeats itself, until the calculation is complete (i.e. no more cells can be changed, or the screen limit has been reached).
Okay, but where's the fun? Well, the main interest of Rule-90 is the neat Sierpinski triangle it produces when fed only one "on" cell in the seed:
You may note that if you try to make a Sierpinski triangle in the center of the display, this happens:
After the edges of the triangle hit the borders of the screen, it becomes "broken". That is perfectly normal, because the borders of the screen are always "0"s and cannot be set to a different state, unlike "real" cellular automata programs, in which the borders can (theoretically) grow endlessly, according to need.
Usage:
- Press the yellow buttons on the top to set the initial pattern (seed);
- Press the "start" button to begin calculation;
- ???;
- Profit!
The other buttons do exactly what they say: "random seed" randomizes the seed, "reset seed" resets the initial pattern and "clear display" explodes the whole thing clears the display. That's all.
Also, I suggest you to try the following seed: 110110...11011
More info about Wolfram's Rule 90: http://en.wikipedia.org/wiki/Rule_90
Thanks to:
@mniip 's deco style in their 1-D celullar automaton, and the machine itself, which inspired me;
@mecha-man for their WireWorld ultra-compact XOR gate, without which, the realization of this machine would not have been entirely possible.
I thought you died from cancer ... *FACEPALMS*
Seriously? It was Merbo who died...
*FACEPALMS again.* My mistake no need to flip out. Great save though +1 for greatness!
...
Nice =o it has less than half particles as mine...and the cells are toggleable...make Rule 110 NAO
...and I should learn how to use the magic of CRAY, DTEC, etc.