Arithmetic-type INT rules
Posted: February 17th, 2021, 7:50 pm
This is a set of rules that merge arithmetic with INT rules.
Can someone make a script to make these rule tables?
Examples:
Addition modulo 8, B2/S0123456H:
Multiplication modulo 10, B2/S0123456H:
Addition modulo 4, B3/S23:
Addition modulo 8, B2/S:
Can someone make a script to make these rule tables?
Examples:
Addition modulo 8, B2/S0123456H:
Code: Select all
@RULE Addition8
@TABLE
n_states:8
neighborhood:hexagonal
symmetries:permute
0,1,1,0,0,0,0,2
0,1,2,0,0,0,0,3
0,1,3,0,0,0,0,4
0,1,4,0,0,0,0,5
0,1,5,0,0,0,0,6
0,1,6,0,0,0,0,7
0,2,2,0,0,0,0,4
0,2,3,0,0,0,0,5
0,2,4,0,0,0,0,6
0,2,5,0,0,0,0,7
0,2,7,0,0,0,0,1
0,3,3,0,0,0,0,6
0,3,4,0,0,0,0,7
0,3,6,0,0,0,0,1
0,3,7,0,0,0,0,2
0,4,5,0,0,0,0,1
0,4,6,0,0,0,0,2
0,4,7,0,0,0,0,3
0,5,5,0,0,0,0,2
0,5,6,0,0,0,0,3
0,5,7,0,0,0,0,4
0,6,6,0,0,0,0,4
0,6,7,0,0,0,0,5
0,7,7,0,0,0,0,6
@COLORS
0 0 0 0
1 255 0 0
2 255 128 0
3 255 255 0
4 128 255 0
5 0 255 0
6 0 255 128
7 0 255 255Code: Select all
@RULE Multiplication10
@TABLE
n_states:10
neighborhood:hexagonal
symmetries:permute
0,1,1,0,0,0,0,1
0,1,2,0,0,0,0,2
0,1,3,0,0,0,0,3
0,1,4,0,0,0,0,4
0,1,5,0,0,0,0,5
0,1,6,0,0,0,0,6
0,1,7,0,0,0,0,7
0,1,8,0,0,0,0,8
0,1,9,0,0,0,0,9
0,2,2,0,0,0,0,4
0,2,3,0,0,0,0,6
0,2,4,0,0,0,0,8
0,2,6,0,0,0,0,2
0,2,7,0,0,0,0,4
0,2,8,0,0,0,0,6
0,2,9,0,0,0,0,8
0,3,3,0,0,0,0,9
0,3,4,0,0,0,0,2
0,3,5,0,0,0,0,5
0,3,6,0,0,0,0,8
0,3,7,0,0,0,0,1
0,3,8,0,0,0,0,4
0,3,9,0,0,0,0,7
0,4,4,0,0,0,0,6
0,4,6,0,0,0,0,4
0,4,7,0,0,0,0,8
0,4,8,0,0,0,0,2
0,4,9,0,0,0,0,6
0,5,5,0,0,0,0,5
0,5,7,0,0,0,0,5
0,5,9,0,0,0,0,5
0,6,6,0,0,0,0,6
0,6,7,0,0,0,0,2
0,6,8,0,0,0,0,8
0,6,9,0,0,0,0,4
0,7,7,0,0,0,0,9
0,7,8,0,0,0,0,6
0,7,9,0,0,0,0,3
0,8,8,0,0,0,0,4
0,8,9,0,0,0,0,2
0,9,9,0,0,0,0,1
@COLORS
0 0 0 0
1 255 0 0
2 255 128 0
3 255 255 0
4 128 255 0
5 0 255 0
6 0 255 128
7 0 255 255
8 0 128 255
9 0 0 255Code: Select all
@RULE B3S23Addition4
@TABLE
n_states:4
neighborhood:Moore
symmetries:permute
var a={1,2,3}
var b={1,2,3}
var c={1,2,3}
var d={1,2,3}
var e={1,2,3}
var f={1,2,3}
var g={1,2,3}
var h={1,2,3}
0,1,1,1,0,0,0,0,0,3
0,1,2,2,0,0,0,0,0,1
0,2,2,2,0,0,0,0,0,2
0,1,1,3,0,0,0,0,0,1
0,1,2,3,0,0,0,0,0,2
0,2,2,3,0,0,0,0,0,3
0,1,3,3,0,0,0,0,0,3
0,3,3,3,0,0,0,0,0,1
1,0,0,0,0,0,0,0,0,0
1,a,0,0,0,0,0,0,0,0
1,1,1,0,0,0,0,0,0,2
1,1,2,0,0,0,0,0,0,3
1,2,2,0,0,0,0,0,0,0
1,1,3,0,0,0,0,0,0,0
1,3,3,0,0,0,0,0,0,2
1,1,1,1,0,0,0,0,0,3
1,1,1,2,0,0,0,0,0,0
1,2,2,2,0,0,0,0,0,2
1,1,2,3,0,0,0,0,0,2
1,2,2,3,0,0,0,0,0,3
1,1,3,3,0,0,0,0,0,3
1,2,3,3,0,0,0,0,0,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