I've implemented Logic Grid rules in Golly. Here are two rule-generating scripts:
LoGrid-gen.py:
Code: Select all
import golly
from string import Template
spec = golly.getstring(
'''This script will generate the Logic Grid rule for given specification
Please enter 8 octal digits(0-7) describing the configuration for
1st digit - no incoming lines
2nd digit - line coming from the upper left
3rd digit - line coming from above
4th digit - lines coming from above and from the upper left
5th digit - line coming from the left
6th digit - lines coming from the left and from the upper left
7th digit - lines coming from the left and from above
8th digit - lines coming from the left, from above, and from the upper left
If in the rule "when no lines are incoming, no lines are outgoing",
consider using the "LoGrid_bl-gen.py" script.
Digits mean:
0 - no outgoing lines
1 - line going to the lower right
2 - line going down
3 - lines going down and to the lower light
4 - line going to the right
5 - lines going to the right and to the lower light
6 - lines going to the right and down
7 - lines going to the right, down and to the lower light
''', "", "Enter rule specification")
if len(spec)!=8:
golly.exit("Incorrect specification string")
trst = []
for ch in spec:
if ord("0") <= ord(ch) <= ord("7"):
trst.append(ord(ch)-ord("0")+1)
else:
golly.exit("Incorrect specification string")
ruletpl=Template(
'''@RULE $rname
Rule for Logic Grid.
Generated by LoGrid-gen.py script.
Each intersection is assigned a type based on the input lines coming in from above, the left, and the diagonal upper left.
This makes eight possible types, each represented by a diagram in the controls.
Each type has its own rules about which output lines to draw below, to the right and diagonally to the lower right. These are determined by specification.
Intersections are only assigned a type after the lines above and to the left have been drawn, so outputs of one row change the types of the next, cascading to infinity.
This rule builds Logic Grids step by step.
It has separate state for no outgoing lines.
States:
0 - background/yet undefined
1 - no outgoing lines
2 - line going to the lower right
3 - line going down
4 - lines going down and to the lower light
5 - line going to the right
6 - line going to the right and to the lower light
7 - line going to the right and down
8 - line going to the right, down and to the lower light
Specification is $sspec, rule images:
$ris1
$ris2
$ris3
"Logic Grid" rulespace by Nico Disseldorp.
Coding, tables, icons by Anton Sanarov.
@TABLE
n_states: 9
neighborhood:Moore
symmetries:none
var h={5,6,7,8}
var nh={0,1,2,3,4}
var v={3,4,7,8}
var nv={0,1,2,5,6}
var d={2,4,6,8}
var nd={0,1,3,5,7}
var z={0,1,2,3,4,5,6,7,8}
var y={z}
var x={z}
var w={z}
var u={z}
var t={z}
0,0,u,w,x,y,z,0,t,0
0,nv,u,w,x,y,z,nh,nd,$s1
0,nv,u,w,x,y,z,nh,d,$s2
0,v,u,w,x,y,z,nh,nd,$s3
0,v,u,w,x,y,z,nh,d,$s4
0,nv,u,w,x,y,z,h,nd,$s5
0,nv,u,w,x,y,z,h,d,$s6
0,v,u,w,x,y,z,h,nd,$s7
0,v,u,w,x,y,z,h,d,$s8
''')
rl1=[ " ", "\\ ", " | ", "\\| "]
rl2=[[" O ", " O-"],["-O ", "-O-"]];
rl3=[ " ", " \\", " | ", " |\\"]
def addrl(lin, lout, r):
r[0].append(rl1[lin&3]);
r[1].append(rl2[lin>>2][lout>>2]);
r[2].append(rl3[lout&3]);
rulename = "LoGrid-"+spec;
ris=[[],[],[]]
for i in xrange(0,8):
addrl(i, ord(spec[i])-ord('0'), ris)
ruletxt = ruletpl.substitute(
rname=rulename,
sspec = spec,
ris1=" ".join(ris[0]),
ris2=" ".join(ris[1]),
ris3=" ".join(ris[2]),
s1=trst[0],
s2=trst[1],
s3=trst[2],
s4=trst[3],
s5=trst[4],
s6=trst[5],
s7=trst[6],
s8=trst[7])
fname = golly.getdir("rules")+rulename+".rule"
f = open(fname, "w")
f.write(ruletxt)
f.close()
golly.new(rulename+"-test")
golly.setrule(rulename)
golly.show("Created "+rulename+".rule and selected that rule.")
LoGrid_bl-gen.py:
Code: Select all
import golly
from string import Template
spec = golly.getstring(
'''This script will generate the Logic Grid rule for given specification
(with implicit blank cell)
Please enter 7 octal digits(0-7) describing the configuration for
1st digit - line coming from the upper left
2nd digit - line coming from above
3rd digit - lines coming from above and from the upper left
4th digit - line coming from the left
5th digit - lines coming from the left and from the upper left
6th digit - lines coming from the left and from above
7th digit - lines coming from the left, from above, and from the upper left
This script is for rules in which if no lines are incoming, no lines are outgoing.
If this is not the case, please use the "LoGrid-gen.py" script.
Digits mean:
0 - no outgoing lines
1 - line going to the lower right
2 - line going down
3 - lines going down and to the lower light
4 - line going to the right
5 - lines going to the right and to the lower light
6 - lines going to the right and down
7 - lines going to the right, down and to the lower light
''', "", "Enter rule specification")
if len(spec)!=7:
golly.exit("Incorrect specification string")
trst = []
for ch in spec:
if ord("0") <= ord(ch) <= ord("7"):
trst.append(ord(ch)-ord("0"))
else:
golly.exit("Incorrect specification string")
ruletpl=Template(
'''@RULE $rname
Rule for Logic Grid.
Generated by LoGrid-gen.py script.
Each intersection is assigned a type based on the input lines coming in from above, the left, and the diagonal upper left.
This makes eight possible types, each represented by a diagram in the controls.
Each type has its own rules about which output lines to draw below, to the right and diagonally to the lower right. These are determined by specification.
Intersections are only assigned a type after the lines above and to the left have been drawn, so outputs of one row change the types of the next, cascading to infinity.
This rule builds Logic Grids step by step.
No outgoing lines are represented by state 0
States:
0 - background/no outgoing lines
1 - line going to the lower right
2 - line going down
3 - lines going down and to the lower light
4 - line going to the right
5 - line going to the right and to the lower light
6 - line going to the right and down
7 - line going to the right, down and to the lower light
8 - synchronization state
Specification is $sspec, rule images:
$ris1
$ris2
$ris3
"Logic Grid" Rulespace by Nico Disseldorp.
Coding, tables, icons by Anton Sanarov.
@TABLE
n_states: 9
neighborhood:Moore
symmetries:none
var h={4,5,6,7}
var nh={0,1,2,3}
var v={2,3,6,7}
var nv={0,1,4,5}
var d={1,3,5,7}
var nd={0,2,4,6}
var z={0,1,2,3,4,5,6,7,8}
var y={z}
var x={z}
var w={z}
var u={z}
var c={0,8}
var cc={c}
0,c,u,w,x,y,z,cc,d,8
c,nv,u,w,x,y,z,nh,d,$s1
c,v,u,w,x,y,z,nh,nd,$s2
c,v,u,w,x,y,z,nh,d,$s3
c,nv,u,w,x,y,z,h,nd,$s4
c,nv,u,w,x,y,z,h,d,$s5
c,v,u,w,x,y,z,h,nd,$s6
c,v,u,w,x,y,z,h,d,$s7
''')
rl1=[ " ", "\\ ", " | ", "\\| "]
rl2=[[" O ", " O-"],["-O ", "-O-"]];
rl3=[ " ", " \\", " | ", " |\\"]
def addrl(lin, lout, r):
r[0].append(rl1[lin&3]);
r[1].append(rl2[lin>>2][lout>>2]);
r[2].append(rl3[lout&3]);
rulename = "LoGrid_bl-"+spec;
ris=[[" "],[" O "],[" "]]
for i in xrange(1,8):
addrl(i, ord(spec[i-1])-ord('0'), ris)
ruletxt = ruletpl.substitute(
rname=rulename,
sspec=spec,
ris1=" ".join(ris[0]),
ris2=" ".join(ris[1]),
ris3=" ".join(ris[2]),
s1=trst[0],
s2=trst[1],
s3=trst[2],
s4=trst[3],
s5=trst[4],
s6=trst[5],
s7=trst[6])
fname = golly.getdir("rules")+rulename+".rule"
f = open(fname, "w")
f.write(ruletxt)
f.close()
golly.new(rulename+"-test")
golly.setrule(rulename)
golly.show("Created "+rulename+".rule and selected that rule.")
Here are the colors and icons for generated rules:
LoGrid-shared.rule
Code: Select all
@RULE LoGrid-shared
Colors and icons for Logic Grid rules with explicit empty intersections
@TABLE
n_states: 9
neighborhood:Moore
symmetries:none
@COLORS
0 0 0 0 background
1 128 128 128 no lines
2 128 128 255 diagonal
3 128 255 128 vertical
4 128 255 255 vert diag
5 255 128 128 horizontal
6 255 128 255 hor diag
7 255 255 128 hor vert
8 255 255 255 all lines
@ICONS
XPM
/* width height num_colors chars_per_pixel */
"31 248 2 1"
/* colors */
". c #000000"
"4 c #FFFFFF"
/* icon for state 1 */
"444............................"
"444............................"
"444............................"
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
/* icon for state 2 */
"444............................"
"4444..........................."
"44444.........................."
".44444........................."
"..44444........................"
"...44444......................."
"....44444......................"
".....44444....................."
"......44444...................."
".......44444..................."
"........44444.................."
".........44444................."
"..........44444................"
"...........44444..............."
"............44444.............."
".............44444............."
"..............44444............"
"...............44444..........."
"................44444.........."
".................44444........."
"..................44444........"
"...................44444......."
"....................44444......"
".....................44444....."
"......................44444...."
".......................44444..."
"........................44444.."
".........................44444."
"..........................44444"
"...........................4444"
"............................444"
/* icon for state 3 */
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
/* icon for state 4 */
"444............................"
"4444..........................."
"44444.........................."
"444444........................."
"4444444........................"
"44444444......................."
"444.44444......................"
"444..44444....................."
"444...44444...................."
"444....44444..................."
"444.....44444.................."
"444......44444................."
"444.......44444................"
"444........44444..............."
"444.........44444.............."
"444..........44444............."
"444...........44444............"
"444............44444..........."
"444.............44444.........."
"444..............44444........."
"444...............44444........"
"444................44444......."
"444.................44444......"
"444..................44444....."
"444...................44444...."
"444....................44444..."
"444.....................44444.."
"444......................44444."
"444.......................44444"
"444........................4444"
"444.........................444"
/* icon for state 5 */
"4444444444444444444444444444444"
"4444444444444444444444444444444"
"4444444444444444444444444444444"
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
/* icon for state 6 */
"4444444444444444444444444444444"
"4444444444444444444444444444444"
"4444444444444444444444444444444"
".44444........................."
"..44444........................"
"...44444......................."
"....44444......................"
".....44444....................."
"......44444...................."
".......44444..................."
"........44444.................."
".........44444................."
"..........44444................"
"...........44444..............."
"............44444.............."
".............44444............."
"..............44444............"
"...............44444..........."
"................44444.........."
".................44444........."
"..................44444........"
"...................44444......."
"....................44444......"
".....................44444....."
"......................44444...."
".......................44444..."
"........................44444.."
".........................44444."
"..........................44444"
"...........................4444"
"............................444"
/* icon for state 7 */
"4444444444444444444444444444444"
"4444444444444444444444444444444"
"4444444444444444444444444444444"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
/* icon for state 8 */
"4444444444444444444444444444444"
"4444444444444444444444444444444"
"4444444444444444444444444444444"
"444444........................."
"4444444........................"
"44444444......................."
"444.44444......................"
"444..44444....................."
"444...44444...................."
"444....44444..................."
"444.....44444.................."
"444......44444................."
"444.......44444................"
"444........44444..............."
"444.........44444.............."
"444..........44444............."
"444...........44444............"
"444............44444..........."
"444.............44444.........."
"444..............44444........."
"444...............44444........"
"444................44444......."
"444.................44444......"
"444..................44444....."
"444...................44444...."
"444....................44444..."
"444.....................44444.."
"444......................44444."
"444.......................44444"
"444........................4444"
"444.........................444"
XPM
/* width height num_colors chars_per_pixel */
"15 120 2 1"
/* colors */
". c #000000"
"4 c #FFFFFF"
/* icon for state 1 */
"44............."
"44............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
/* icon for state 2 */
"44............."
"444............"
".444..........."
"..444.........."
"...444........."
"....444........"
".....444......."
"......444......"
".......444....."
"........444...."
".........444..."
"..........444.."
"...........444."
"............444"
".............44"
/* icon for state 3 */
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
/* icon for state 4 */
"44............."
"444............"
"4444..........."
"44444.........."
"44.444........."
"44..444........"
"44...444......."
"44....444......"
"44.....444....."
"44......444...."
"44.......444..."
"44........444.."
"44.........444."
"44..........444"
"44...........44"
/* icon for state 5 */
"444444444444444"
"444444444444444"
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
/* icon for state 6 */
"444444444444444"
"444444444444444"
".444..........."
"..444.........."
"...444........."
"....444........"
".....444......."
"......444......"
".......444....."
"........444...."
".........444..."
"..........444.."
"...........444."
"............444"
".............44"
/* icon for state 7 */
"444444444444444"
"444444444444444"
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
/* icon for state 8 */
"444444444444444"
"444444444444444"
"4444..........."
"44444.........."
"44.444........."
"44..444........"
"44...444......."
"44....444......"
"44.....444....."
"44......444...."
"44.......444..."
"44........444.."
"44.........444."
"44..........444"
"44...........44"
XPM
/* width height num_colors chars_per_pixel */
"7 56 2 1"
/* colors */
". c #000000"
"4 c #FFFFFF"
/* icon for state 1 */
"4......"
"......."
"......."
"......."
"......."
"......."
"......."
/* icon for state 2 */
"4......"
".4....."
"..4...."
"...4..."
"....4.."
".....4."
"......4"
/* icon for state 3 */
"4......"
"4......"
"4......"
"4......"
"4......"
"4......"
"4......"
/* icon for state 4 */
"4......"
"44....."
"4.4...."
"4..4..."
"4...4.."
"4....4."
"4.....4"
/* icon for state 5 */
"4444444"
"......."
"......."
"......."
"......."
"......."
"......."
/* icon for state 6 */
"4444444"
".4....."
"..4...."
"...4..."
"....4.."
".....4."
"......4"
/* icon for state 7 */
"4444444"
"4......"
"4......"
"4......"
"4......"
"4......"
"4......"
/* icon for state 8 */
"4444444"
"44....."
"4.4...."
"4..4..."
"4...4.."
"4....4."
"4.....4"
LoGrid_bl-shared.rule
Code: Select all
@RULE LoGrid_bl-shared
Colors and icons for Logic Grid rules with implicit empty intersections
@TABLE
n_states: 9
neighborhood:Moore
symmetries:none
@COLORS
0 0 0 0 background/no lines
1 128 128 255 diagonal
2 128 255 128 vertical
3 128 255 255 vert diag
4 255 128 128 horizonta
5 255 128 255 hor diag
6 255 255 128 hor vert
7 255 255 255 all lines
8 128 128 128 waiting for edge-adjacent cells
@ICONS
XPM
/* width height num_colors chars_per_pixel */
"31 248 2 1"
/* colors */
". c #000000"
"4 c #FFFFFF"
/* icon for state 1 */
"444............................"
"4444..........................."
"44444.........................."
".44444........................."
"..44444........................"
"...44444......................."
"....44444......................"
".....44444....................."
"......44444...................."
".......44444..................."
"........44444.................."
".........44444................."
"..........44444................"
"...........44444..............."
"............44444.............."
".............44444............."
"..............44444............"
"...............44444..........."
"................44444.........."
".................44444........."
"..................44444........"
"...................44444......."
"....................44444......"
".....................44444....."
"......................44444...."
".......................44444..."
"........................44444.."
".........................44444."
"..........................44444"
"...........................4444"
"............................444"
/* icon for state 2 */
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
/* icon for state 3 */
"444............................"
"4444..........................."
"44444.........................."
"444444........................."
"4444444........................"
"44444444......................."
"444.44444......................"
"444..44444....................."
"444...44444...................."
"444....44444..................."
"444.....44444.................."
"444......44444................."
"444.......44444................"
"444........44444..............."
"444.........44444.............."
"444..........44444............."
"444...........44444............"
"444............44444..........."
"444.............44444.........."
"444..............44444........."
"444...............44444........"
"444................44444......."
"444.................44444......"
"444..................44444....."
"444...................44444...."
"444....................44444..."
"444.....................44444.."
"444......................44444."
"444.......................44444"
"444........................4444"
"444.........................444"
/* icon for state 4 */
"4444444444444444444444444444444"
"4444444444444444444444444444444"
"4444444444444444444444444444444"
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
/* icon for state 5 */
"4444444444444444444444444444444"
"4444444444444444444444444444444"
"4444444444444444444444444444444"
".44444........................."
"..44444........................"
"...44444......................."
"....44444......................"
".....44444....................."
"......44444...................."
".......44444..................."
"........44444.................."
".........44444................."
"..........44444................"
"...........44444..............."
"............44444.............."
".............44444............."
"..............44444............"
"...............44444..........."
"................44444.........."
".................44444........."
"..................44444........"
"...................44444......."
"....................44444......"
".....................44444....."
"......................44444...."
".......................44444..."
"........................44444.."
".........................44444."
"..........................44444"
"...........................4444"
"............................444"
/* icon for state 6 */
"4444444444444444444444444444444"
"4444444444444444444444444444444"
"4444444444444444444444444444444"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
"444............................"
/* icon for state 7 */
"4444444444444444444444444444444"
"4444444444444444444444444444444"
"4444444444444444444444444444444"
"444444........................."
"4444444........................"
"44444444......................."
"444.44444......................"
"444..44444....................."
"444...44444...................."
"444....44444..................."
"444.....44444.................."
"444......44444................."
"444.......44444................"
"444........44444..............."
"444.........44444.............."
"444..........44444............."
"444...........44444............"
"444............44444..........."
"444.............44444.........."
"444..............44444........."
"444...............44444........"
"444................44444......."
"444.................44444......"
"444..................44444....."
"444...................44444...."
"444....................44444..."
"444.....................44444.."
"444......................44444."
"444.......................44444"
"444........................4444"
"444.........................444"
/* icon for state 8 */
"4.............................."
".4............................."
"..4............................"
"...4..........................."
"....4.........................."
".....4........................."
"......4........................"
".......4......................."
"........4......................"
".........4....................."
"..........4...................."
"...........4...4..............."
"............4..4..............."
".............4.4..............."
"..............44..............."
"...........44444..............."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
"..............................."
XPM
/* width height num_colors chars_per_pixel */
"15 120 2 1"
/* colors */
". c #000000"
"4 c #FFFFFF"
/* icon for state 1 */
"44............."
"444............"
".444..........."
"..444.........."
"...444........."
"....444........"
".....444......."
"......444......"
".......444....."
"........444...."
".........444..."
"..........444.."
"...........444."
"............444"
".............44"
/* icon for state 2 */
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
/* icon for state 3 */
"44............."
"444............"
"4444..........."
"44444.........."
"44.444........."
"44..444........"
"44...444......."
"44....444......"
"44.....444....."
"44......444...."
"44.......444..."
"44........444.."
"44.........444."
"44..........444"
"44...........44"
/* icon for state 4 */
"444444444444444"
"444444444444444"
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
/* icon for state 5 */
"444444444444444"
"444444444444444"
".444..........."
"..444.........."
"...444........."
"....444........"
".....444......."
"......444......"
".......444....."
"........444...."
".........444..."
"..........444.."
"...........444."
"............444"
".............44"
/* icon for state 6 */
"444444444444444"
"444444444444444"
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
"44............."
/* icon for state 7 */
"444444444444444"
"444444444444444"
"4444..........."
"44444.........."
"44.444........."
"44..444........"
"44...444......."
"44....444......"
"44.....444....."
"44......444...."
"44.......444..."
"44........444.."
"44.........444."
"44..........444"
"44...........44"
/* icon for state 8 */
"4.............."
".4............."
"..4............"
"...4..........."
"....4..4......."
".....4.4......."
"......44......."
"....4444......."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
"..............."
XPM
/* width height num_colors chars_per_pixel */
"7 56 2 1"
/* colors */
". c #000000"
"4 c #FFFFFF"
/* icon for state 1 */
"4......"
".4....."
"..4...."
"...4..."
"....4.."
".....4."
"......4"
/* icon for state 2 */
"4......"
"4......"
"4......"
"4......"
"4......"
"4......"
"4......"
/* icon for state 3 */
"4......"
"44....."
"4.4...."
"4..4..."
"4...4.."
"4....4."
"4.....4"
/* icon for state 4 */
"4444444"
"......."
"......."
"......."
"......."
"......."
"......."
/* icon for state 5 */
"4444444"
".4....."
"..4...."
"...4..."
"....4.."
".....4."
"......4"
/* icon for state 6 */
"4444444"
"4......"
"4......"
"4......"
"4......"
"4......"
"4......"
/* icon for state 7 */
"4444444"
"44....."
"4.4...."
"4..4..."
"4...4.."
"4....4."
"4.....4"
/* icon for state 8 */
"4......"
".4.4..."
"..44..."
".444..."
"......."
"......."
"......."