Rule:HexBuss
@RULE HexBuss
neighborhood:hexagonal
https://conwaylife.com/forums/viewtopic.php?p=72231#p72231
Author: Andrew Trevorrow (andrew@trevorrow.com), Oct 2009.
The following Python transition function implements Frank Buss's 3-state rule on a hexagonal grid, as described here:
http://www.frank-buss.de/automaton/hexautomaton.html
The @TREE data was created by copying the Python code to the clipboard and then running Golly's make-ruletree.py script.
start copying
name = "HexBuss" n_states = 3 n_neighbors = 8 def transition_function(s):
# s[0..8] are cell states in the order NW, NE, SW, SE, N, W, E, S, C # but we ignore the NE and SW corners to emulate a hexagonal grid: # NW N NE NW N # W C E -> W C E # SW S SE S SE
# set n1 and n2 to the number of neighbors in states 1 and 2
n1 = 0
n2 = 0
for i in xrange(8):
# ignore s[1] and s[2]
if i < 1 or i > 2:
if s[i] == 1: n1 += 1
if s[i] == 2: n2 += 1
if s[8] == 0 and n1 == 0 and n2 == 1:
return 2
elif n1 == 1 and n2 == 1:
return 1
elif n2 == 2:
return 1
elif n2 == 3:
return 2
else:
return 0
end copying
@TREE
- Automatically generated by make-ruletree.py.
num_states=3 num_neighbors=8 num_nodes=44 1 0 0 0 1 2 0 0 2 0 0 1 1 1 1 1 2 0 0 3 2 1 3 3 3 2 4 5 2 0 0 0 2 3 0 3 3 4 7 8 1 2 2 2 2 3 3 10 3 5 8 11 4 6 9 12 3 7 7 4 3 8 4 11 4 9 14 15 2 10 10 0 3 11 11 17 4 12 15 18 5 13 16 19 3 4 4 11 4 14 14 21 4 15 21 18 5 16 22 23 3 17 17 7 4 18 18 25 5 19 23 26 6 20 24 27 7 28 28 28 8 29 29 29 4 21 21 18 5 22 22 31 5 23 31 26 6 24 32 33 7 34 34 34 8 35 35 35 3 7 7 7 4 25 25 37 5 26 26 38 6 27 33 39 7 40 40 40 8 41 41 41 9 30 36 42
@COLORS 0 0 0 0 1 0 255 192 2 0 192 255
@ICONS
hexagons