Discrete Dynamics Lab |
I found these examples while experimenting with the "k-totalistic"
rules, where the lookup table depends just on the totals of each value
in the neighborhood. Complex dynamics like this can be found automatically
by my method of classifying rule space, described for 1d in
"Classifying Cellular Automata Automatically: Finding gliders, filtering,
and relating space-time patterns, attractor basins, and the Z parameter".
To see this paper click here
for publications.
I am indebted to Antonio Lafusa
(alafusa@tiscalinet.it) for introducing me to this class of rule, see his
paper for Alife8 which describes similar complex 2d k-totalistic rules
found by genetic algorithm (Bilotta, Lafusa, Pantano, "Is
self-replication an embedded characteristic of the artificial/living
matter?").
totalistic rules - tcode and kcodeA new option in multi-value DDLab is to limit the program to run forwards only for just totalistic rules ("totalistic mode", enter t at the first prompt). This disables basins of attraction, and works with much shorter lookup tables than the default "basin mode", allowing greater values for v (value range) combined with k (the neighborhood). There are two types of totalistic rules, "kcode" and "tcode":
kcode, k-totalistic rulesFor k-totalistic rules, "kcode", the lookup table depends just on the totals of each value in the neighborhood.DD-Life and other complex rules belong to this "kcode" type.. The size of the table S = (v + k - 1)! / (k! x (v -1)!). An example of the table for v=3, k=6, S=28, is shown on the right. I am extremely grateful to Paolo Patelli for providing the decision tree recursive algorithm for listing the strings of possible totals, and for retrieving the lookup table index directly from these string. |
kcode 2121022002022021221222211202 ---------------------------------- _lookup table index / _totals strings of 2s, 1s, 0s / / _a possible lookup table, / 2_1_0 / any outputs (0,1,2) can be entered here 0: 0 0 6 -> 2 1: 0 1 5 -> 0 2: 0 2 4 -> 2 3: 0 3 3 -> 1 4: 0 4 2 -> 1 5: 0 5 1 -> 2 6: 0 6 0 -> 2 7: 1 0 5 -> 2 8: 1 1 4 -> 2 9: 1 2 3 -> 1 10: 1 3 2 -> 2 11: 1 4 1 -> 2 12: 1 5 0 -> 1 13: 2 0 4 -> 2 14: 2 1 3 -> 0 15: 2 2 2 -> 2 16: 2 3 1 -> 2 17: 2 4 0 -> 0 18: 3 0 3 -> 2 19: 3 1 2 -> 0 20: 3 2 1 -> 0 21: 3 3 0 -> 2 22: 4 0 2 -> 2 23: 4 1 1 -> 0 24: 4 2 0 -> 1 25: 5 0 1 -> 2 26: 5 1 0 -> 1 27: 6 0 0 -> 2 |
tcodeFor t-totalistic rules, "tcode", the lookup table has S = ((v-1) x k)+1 entries for each possible sum of the all the values in the neighborhood.An example of the table for v=3, k=6, S=13 (12 to 0), is shown on the right.
notesIn both cases, lookup tables are set out with the highest index on the left. If v=2 the lookup tables for vcode and kcode, and the resulting dynamics, are identical. |
tcode 2012202000211 ------------------- _totals, and lookup table index / _a possible lookup table, / / any outputs (0,1,2) can be entered here 12 -> 2 11 -> 0 10 -> 1 9 -> 2 8 -> 2 7 -> 0 6 -> 2 5 -> 0 4 -> 0 3 -> 0 2 -> 2 1 -> 1 0 -> 1 |
Below are "quick start" instructions for running the DD-Life and other complex CA shown above based on a k=6 hexagonal 2d lattice (i.e. each cell is connected to its 6 neighbors). Prompts, and responses to prompts, are shown in bold, the precise wording may vary. Backtrack with q. We start with the first (2 line) prompt of the main sequence of prompts when starting DDLab.
EXIT-q, graphics setup-g, randseed-r, totalistic/forward only-t
forward only/single basin/subtree-s (def-field): Enter t for the short,
totalistic lookup table (recommended). Alternatively enter s for the full look-up table.
If t was entered, which we will assume from now on,
the first 2 line prompt changes to...
EXIT-q, graphics setup-g, randseed-r, allow basins-b
totalistic rules and forwards only (def): Press Enter.
Value range (def 2, max 8): Enter 3.
enter cell scale in pixels, default 5: Press Enter. This can be rescaled later on-the-fly.
Network size (length) max to fit 185, default 150: Press Enter. This is the default for a 1d CA. It will be superseded when setting 2d or 3d.
Neighborhood size k: mixed-m, or enter 1-25 (def 3): Enter 6, or the required k. k can be reset when specifying 2d or 3d.
At this point a top right window appears with a series of prompts.
For a 1d CA you would press Enter to skip them.
WIRING: special-s load-l random-r
regular: 3d-3, 2d-2 (hex+x), 1d-def: Enter 2 for 2d (k=6 gives a hex
lattice, otherwise adding x forces a hex lattice), enter 3 for 3d.
forwards only (uses less memory, slower)-y: Press Enter.
2d, enter width (def 40): Enter 100 depth (def 40):
Enter 120 (or what you prefer).
On a true hex lattice this is roughly square.
Neighborhood size k: mixed-m, or enter 1-25 (def 6):
Enter 6 (or press Enter for the default), or the required k.
This is a repeat of the main sequence prompt.
At his point a small top-center window may flash up: setting things up, wait...
The main sequence of prompts resumes:
totalistic only: tcode-t (def-kcode): Press Enter.
DD-Life and other complex rules are all kcode, k-totalistic rules.
At this point another top right prompt appears:
RULES: single code (def), load rulemix-l, amend k-matrix-a
mix: no limit-n, or set limit up to 200:
Press Enter. This prompt is for for mixed-rule networks - we can ignore it.
The main sequence resumes with a 2 line prompt: (note "v3k6" corresponds to your selections above.)
Select v3k6 (table=28) totalistic kcode: empty-e fill-f printxterm-x
maj-m rand-r bits-b hex-h repeat-p load-l (def-rand):
Enter l to load a tcode file, for other options see the manual.
A top right prompt allows the rule to be loaded, enter the filename.
For the k=6 HexLife enter v3k6s1 (without the extension .vco, this is
added automatically), or load any other v3k6.. rule.
Note that v and k for the file must be the same as the v and k selected
before, otherwise you get an error message. For further filing info and options see the manual.
Then you should see the lookup table in color, and the following prompt:
kcode loaded, revise-q, continue-ret: Press Enter.
The rule will be shown in hex, some details about it appear in a bottom window,
and also a top right prompt appears (for the network architecture and network
graph, see the manual) which we can skip - press Enter.
At this point a large main sequence window appears, with a 2 line prompt:
Select SEED (v3 2d ij=100,120), win-w empty-e fill-f rand-r
bits2d-b hex-h repeat-p load-l (def-r): Press Enter, or enter r, for a
random seed, the initial state.
central 2d block(def diam 20), all-a size (max98): Press >Enter. The seed
can be reset later on-the-fly.
The seed is displayed, with various options including a top right prompt to save the seed.
- Press Enter, probably twice, until the prompt below appears.
This is the final prompt, together with a top center hint accept
defaults-d.
We are almost there!
FORWARDS ONLY options: analysis-a histograms-h (ALL-def): Enter d to
skip numerous "forwards only" options, and start running the CA.
Now the 2d CA starts from the seed in the top left of the screen.
The window on the right is the on-the-fly key index, indicating changes that
can be made by a single key press while the CA is running.
Try some:
g to enter a randomly chosen complex rule from an included sample (in
dd_extra.tar.gz),
1 for random value flips in the kcode table, 2 to restore the flips,
r for a random kcode,
e or c to expand or contract the scale,
O for the original rule,
4 for 5 for a single cell value against a uniform background,
v for a random central patch,
l to perturb a single cell, L to perturb a central patch,
0 to randomly change the color scheme.
There are many other on the fly options - some are slightly different than shown in the manual.
Press q to stop the CA. This gives a top right interrupt options window. Press Enter to continue running. From the interrupt options you can backtrack with q. The interrupt options allow you to revise, save, or load; the rule, seed or current state; and various other things.
Run the other 2d rules as described above, but with the required neighborhood k, network size i,j, and filename.
For 3dLife do as above with k=6 (nearest neighbors, north south, east, west,
up, down) and max network size i*j*h <= 40*40*40.
Load the 3d filename v3k6a2.vco or v3k6x1.vco (these rules also give interesting mobile
structures in 2d);