-
Notifications
You must be signed in to change notification settings - Fork 3
Rule Support
HROT rules are outer totalistic rules that make use of neighbourhoods with range larger than 1.
CAViewer supports arbitrary neighbourhoods via the CoordCA format (Specify with N@).
CAViewer also supports arbitary weighted neighbourhoods & state weights via the LifeViewer format (Specify with NW).
In addition, weighted rules up to range 2 can be specified in the neighbourhood selector in the HROT rule dialog.
- Asterisk (A)
- Checkerboard (B)
- Aligned Checkerboard (b)
- Circular (C)
- Triangular Neighbourhood on Triangular Grid (D)
- Gaussian Weighted Neighbourhood (G)
- Hexagonal (H)
- Triangular Moore (L)
- Moore (M)
- Von Neumann (N)
- Triangular Neighbourhood on Hexagonal Grid (T)
- Saltire (X)
- Euclidean (2)
- Tripod (3)
- Hexagram (6)
- Star (*)
- Cross (+)
- Hash (#)
- CoordCA Format (Custom Neighbourhoods @)
- LifeViewer Format (Weighted Neighbourhoods W)
- LifeViewer Format (State Weights W)
Use N@ with no extra hex digits if you specify the neighbourhood / state weights in the neighbourhood / state weights selector.
Take this neighbourhood as an example:
0,0,1,0,0
0,1,1,1,0
1,1,x,1,1
0,1,1,1,0
0,0,1,0,0
If the cells around it are in this configuration:
0,0,1,0,1
1,0,1,0,0
0,1,x,1,0
0,1,1,1,0
0,0,0,0,1
Then, the cell has 7 neighbours as 7 cells coincide with the '1's on the neighbourhood.
Now what if I had this weighted neighbourhood and the same configuration:
0,0,-1,0,0
0,1,1,1,0
-1,1,x,1,-1
0,1,1,1,0
0,0,-1,0,0
Then the cell would have a neighbourhood sum of 6 * 1 + 1 * -1 = 5
.
For multi-state rules such as generations, state weights can also be used.
The cell will be added to the neighbourhood sum with a value of neighbourhood weight * state weight
.
Alive cells in 2-state rules have a state weight of 1 and dead cells have a state weight of 0.
Weights should be expressed in this format in RLE files as comments (ensure the use of #R)
#R 1 2 3 2 1
#R 2 4 6 4 2
#R 3 6 9 6 3
#R 2 4 6 4 2
#R 1 2 3 2 1
State weights are placed below neighbourhood weights and are written as follows.
The first number represents the state weight of the 0th state and so on.
#R 0 1 0 0 2 -1 0 0
So a RLE file for a weighted rule should look like this:
#R 0 0 1 0 0
#R 0 1 2 1 0
#R 1 2 0 2 1
#R 0 1 2 1 0
#R 0 0 1 0 0
x = 2, y = 2, rule = R2,C2,S2-3,B4,7-8,N@
o$bo!
This only applies to pattern files.
For neighbourhood weights in the rule dialog, use the neighbourhood weight selector or express weighted rules with NW
and the LifeViewer format.
- Cells have 2 states, dead and alive.
- Cells are born (turn from dead to alive) if they have X neighbours and X is in birth.
- Cells stay alive if they have X neighbours and X is in survival.
- If not, the cell dies (turn from alive to dead).
B0 rules are supported via emulation by alternating rules. See this for information on the alternating rules are generated.
Apgtable generation is supported for normal rules, B0 rules and weighted rules.
Note that the generated apgtables for weighted rules can be several gigabytes in size if you are using a large neighbourhood like R2 Moore.
The code that simulates HROT rules can be found here.
R<range>,C2,S<survival>,B<birth>,N<neighbourhood>
R<range>,C2,S<survival>,B<birth>,N@<CoordCA>
R<range>,C2,S<survival>,B<birth>,NW<LifeViewer>
Generations rules are a multistate generalization of 2 state rules in which live cells can exist in different states, and cells that would die in a 2-state cellular automaton instead advance to the next state.
The name "Generations" is due to the conceptualisation of this process as cells "getting older" before eventually dying
- A dead cell
- Will become alive if it has X neighbours and X is in birth.
- If not, it stays dead.
- A living cell
- Will stay alive if it has X neighbours and X is in survival.
- If not, it advances to state 2 in the next generation of the pattern.
- A cell in state m ≥ 2 will advance to state ((m + 1) mod n) in the next generation of the pattern.
State weights can also be used with generations rules. By default, all states have a state weight of 0 except the alive state.
This extension of generations rules is known as Weighted Generations.
The code that simulates HROT Generations rules can be found here.
R<range>,C<states>,S<survival>,B<birth>,N<neighbourhood>
R<range>,C<states>,S<survival>,B<birth>,N@<CoordCA>
R<range>,C<states>,S<survival>,B<birth>,NW<Neighbourhood Weights>
R<range>,C<states>,S<survival>,B<birth>,NW<Neighbourhood Weights>,<State Weights>
Support for INT rules is planned.
- Range 1 Moore Isotropic Non-Totalistic
- Range 1 Hexagonal Isotropic Non-Totalistic
- Range 2 Von Neumann Isotropic Non-Totalistic
- Range 2 Checkerboard Isotropic Non-Totalistic
- Range 2 Far Corners Isotropic Non-Totalistic
- Range 2 Far Edges Isotropic Non-Totalistic
- Range 2 Knight Life Isotropic Non-Totalistic
- Range 2 Cross Isotropic Non-Totalistic
- Range 3 Cross Isotropic Non-Totalistic