SoupAutomat

From SeqFan, see SoupAutomat.

The SoupAutomat is a 1D cellular automaton. The automaton has 11 states: the dot and the digits 0 to 9. The next line is calculated in three steps:

  1. initialize the new line with dots
  2. iterate all cells of the original line. If the digit n of a cell is odd, add n+1 to the cell of the next line, which is n positions to the left below the iterated cell. If the digit n of a cell is even, add n+1 to the cell n positions to the right. If the destination cell is a dot, set it to the value n+1. The resulting values can be greater than 9.
  3. Normalize the cells: For each cell which is not a dot, write a line, with the left aligned value of the cell starting at the cell position. Then add all lines, but from left to right.

Examples for step 2:

0: ........0........
1: ........1........
2: .......2.........
3: .........3.......
4: ......4..........
5: ..........5......
6: .....6...........
7: ...........7.....

Example for step 3:

For each cell which is not a dot, write a line, with the left aligned value of the cell starting at the cell position:

..886442.0..3.5..7.9.9..  input states
.........19  sum for new cell 9
..........39  sum for new cell 10
...........9   sum for new cell 11
............10  sum for new cell 12
-------------------------------------------------
.........11210..........  adding from left to right

Simple Python code, without boundary checks: SoupAutomat2.py . Usage: Install Python, if not already installed (I've tested it with Python 2.5, but should work with other versions, too). Start a command line prompt or shell. Change to the directory where you've saved the SoupAutomat.py, then start the script with "python SoupAutomat.py". You should see this output:

...............886442.0..3.5..7.9.9...............
......................11210.......................
.....................22.2.4.......................
.......................33.3...5...................
....................44.4.6........................
........................55.5...7..................
...................66.6.8.........................
.........................77.7...9.................
..................88.8.10.........................
......................2.1.99.9....................
.................11010.23.........................
................22.3.5...3........................
................1033..4...........................
...............641........5.......................
................2...513...........................
...............6..342.............................
...............4.....735..........................
..............8...69..............................
..........10..........9.7.........................
.........2.1.10..8................................

You can change the seed, the number of generations and the length of the automaton in the source. It is possible to use the dot for seeds, too, e.g. "12.3".

Golly implementation

Install Golly, then download this file, unpack and copy the SoupAutomat.py in the "Scripts\Python" directory in Golly, and SoupAutomaton.icons and SoupAutomaton.table in the "Rules" directory. Then start the SoupAutomaton script in Golly and you can enter the initial line. Press space for calculating the next generation.

Sample usage (the quality of the small digits is not as good in the video as in Golly itself) :


28 . Januar 2010, Frank Buß