ConwayLife.com - A community for Conway's Game of Life and related cellular automata
Home  •  LifeWiki  •  Forums  •  Download Golly

3-state life-based rules with mobile birth forcers

For discussion of other cellular automata.

3-state life-based rules with mobile birth forcers

Postby shouldsee » April 10th, 2016, 6:38 am

Dear all,

There are two rules I want to present: 'flashbf7a' and 'lifebf7', with the former one later discovered but appear much more interesting.

rule table of 'lifebf7':
@RULE lifebf7
@TABLE
# rules: 69
#
# Golly rule-table format.
# Each rule: C,N,NE,E,SE,S,SW,W,NW,C'
# N.B. Where the same variable appears multiple times in a transition,
# it takes the same value each time.
#
# Default for transitions not listed: no change
#
n_states:4
neighborhood:Moore
symmetries:rotate8
var a={0,1,2,3}
var b={0,1,2,3}
var c={0,1,2,3}
var d={0,2,3}
var e={0,1,2,3}
var f={0,1,2,3}
var g={0,1,2,3}
var h={0,3}
var i={0,2,3}
var j={0,2,3}
var k={0,3}
var l={0,1,3}
var m={0,3}
var n={0,3}
var o={0,3}
var p={1,2}
var q={0,1,3}
var r={0,1,3}
var s={1,3}
var t={0,1}
var u={0,1}
var v={0,2,3}
var w={0,2,3}
var x={0,2,3}
var y={0,2,3}
var z={0,1,2}
var A={0,1,2}
var B={0,1,2}
var C={0,1,2}
var D={0,2}
var E={1,2}
var F={0,3}
var G={0,3}
var H={1,2}
var I={1,2}
0,a,b,c,d,e,f,g,2,1
0,h,d,i,j,k,1,1,1,1
0,d,h,i,j,1,k,1,1,1
0,d,i,h,j,1,1,k,1,1
0,d,a,b,1,l,c,e,2,1
0,h,k,d,1,m,n,1,1,1
0,h,k,m,1,n,1,o,1,1
0,h,k,m,p,1,n,o,1,1
0,l,d,q,2,1,r,a,1,1
0,h,d,1,k,m,1,i,1,1
0,l,d,1,q,s,r,2,1,1
0,0,0,1,1,0,1,2,1,1
0,h,t,1,l,1,q,2,1,1
0,h,t,l,2,1,u,1,1,1
0,0,0,1,2,1,1,0,1,1
0,0,0,2,1,0,1,1,1,1
0,0,0,2,1,1,0,1,1,1
0,t,1,u,1,h,2,1,l,1
0,0,1,0,2,1,0,1,1,1
t,d,1,1,1,1,1,1,1,2
1,d,i,j,v,w,x,y,a,0
1,a,b,c,d,e,f,g,3,0
1,d,a,t,b,z,c,3,e,0
1,z,t,A,B,d,3,a,C,0
1,D,t,a,u,A,B,C,3,0
1,0,0,0,0,1,0,3,1,0
1,0,0,0,t,1,p,0,3,0
p,d,i,a,b,1,1,1,1,0
1,0,0,0,0,1,3,0,1,0
1,t,0,0,0,3,0,p,E,0
1,t,0,0,0,3,E,0,p,0
1,0,0,0,1,0,A,E,3,0
1,0,0,0,1,0,1,0,3,0
E,d,a,b,1,i,1,1,1,0
1,0,0,0,1,1,0,0,3,0
E,d,a,b,1,1,i,1,1,0
1,d,A,B,s,1,1,D,1,0
1,0,0,0,3,0,0,1,1,0
1,0,0,0,3,0,1,0,1,0
1,0,0,0,3,1,0,0,1,0
E,a,d,1,i,b,1,1,1,0
E,d,i,1,j,1,v,1,1,0
E,d,i,1,j,1,1,v,1,0
E,d,i,1,1,j,v,1,1,0
E,d,i,1,1,j,1,v,1,0
E,d,1,i,1,j,1,v,1,0
E,1,1,1,1,1,1,1,1,0
2,h,k,m,n,o,F,G,a,0
2,a,b,c,e,E,p,H,I,0
2,0,0,0,0,1,1,2,1,0
2,0,0,0,0,1,2,1,1,0
2,F,a,b,E,G,H,I,p,0
2,0,0,0,1,0,1,2,1,0
2,0,0,0,1,0,2,1,1,0
2,F,a,b,E,H,G,I,p,0
2,0,0,0,1,1,0,2,1,0
2,F,G,h,E,H,I,k,p,0
2,F,G,E,h,k,H,I,p,0
2,0,0,1,0,0,1,2,1,0
2,0,0,1,0,0,2,1,1,0
2,F,G,E,h,H,k,I,p,0
2,0,0,1,0,1,0,2,1,0
2,F,G,E,h,H,I,k,p,0
2,0,0,1,0,1,2,0,1,0
2,F,G,E,H,h,k,I,p,0
2,0,0,1,1,0,0,2,1,0
2,F,G,E,H,h,I,k,p,0
2,0,0,1,1,0,2,0,1,0
2,F,E,G,H,h,I,k,p,0


rule table of 'flashbf7a':
@RULE flashbf7a
@TABLE
# rules: 61
#
# Golly rule-table format.
# Each rule: C,N,NE,E,SE,S,SW,W,NW,C'
# N.B. Where the same variable appears multiple times in a transition,
# it takes the same value each time.
#
# Default for transitions not listed: no change
#
n_states:4
neighborhood:Moore
symmetries:rotate8
var a={0,2}
var b={0,1,2,3}
var c={0,1,2,3}
var d={0,1,2,3}
var e={0,2,3}
var f={0,1,2,3}
var g={0,1,2,3}
var h={0,1,2,3}
var i={0,3}
var j={0,2,3}
var k={0,2,3}
var l={0,3}
var m={0,1,3}
var n={0,3}
var o={0,3}
var p={0,3}
var q={1,2}
var r={0,1,3}
var s={0,1,3}
var t={1,3}
var u={0,1}
var v={0,1}
var w={0,2,3}
var x={0,2,3}
var y={0,2,3}
var z={0,2,3}
var A={0,1,2}
var B={0,1,2}
var C={0,1,2}
var D={0,1,2}
var E={0,2}
var F={1,2}
var G={0,2}
var H={0,2}
var I={0,3}
a,b,c,d,e,f,g,h,2,1
a,i,e,j,k,l,1,1,1,1
a,e,i,j,k,1,l,1,1,1
a,e,j,i,k,1,1,l,1,1
a,e,b,c,1,m,d,f,2,1
a,i,l,e,1,n,o,1,1,1
a,i,l,n,1,o,1,p,1,1
a,i,l,n,q,1,o,p,1,1
a,m,e,r,2,1,s,b,1,1
a,i,e,1,l,n,1,j,1,1
a,m,e,1,r,t,s,2,1,1
0,0,0,1,1,0,1,2,1,1
a,i,u,1,m,1,r,2,1,1
a,i,u,m,2,1,v,1,1,1
0,0,0,1,2,1,1,0,1,1
0,0,0,2,1,0,1,1,1,1
0,0,0,2,1,1,0,1,1,1
a,u,1,v,1,i,2,1,m,1
0,0,1,0,2,1,0,1,1,1
u,e,1,1,1,1,1,1,1,2
1,e,j,k,w,x,y,z,b,0
1,b,c,d,e,f,g,h,3,0
1,e,b,u,c,A,d,3,f,0
1,A,u,B,C,e,3,b,D,0
1,a,u,b,v,A,B,C,3,0
q,i,l,n,o,m,p,3,r,0
1,0,0,0,u,1,q,0,3,0
1,a,E,A,b,1,1,1,1,0
q,i,l,n,o,m,3,0,r,0
1,u,0,0,0,3,0,q,F,0
1,u,0,0,0,3,F,0,q,0
1,0,0,0,1,0,A,F,3,0
F,i,l,n,1,o,u,p,3,0
1,E,A,B,1,a,1,1,1,0
F,i,l,n,u,1,o,p,3,0
1,e,A,b,1,1,j,1,1,0
1,e,A,B,t,1,1,E,1,0
F,i,l,0,3,n,o,1,u,0
F,i,0,l,3,n,1,o,1,0
F,i,l,n,3,1,0,0,1,0
1,E,a,1,G,H,1,1,1,0
1,E,G,1,H,1,a,1,1,0
1,E,G,1,H,1,1,a,1,0
1,E,G,1,1,H,a,1,1,0
1,E,G,1,1,H,1,a,1,0
1,E,1,G,1,H,1,a,1,0
F,1,1,1,1,1,1,1,1,0
2,i,l,n,o,p,I,m,r,0
2,I,0,i,0,l,1,n,1,0
2,I,i,l,0,1,0,0,1,0
2,I,i,m,r,1,1,1,1,0
2,I,i,l,1,n,o,p,1,0
2,I,m,r,1,i,1,1,1,0
2,I,m,r,1,1,i,1,1,0
2,I,m,r,1,1,1,i,1,0
2,I,i,1,l,n,1,1,1,0
2,I,i,1,l,1,n,1,1,0
2,I,i,1,l,1,1,n,1,0
2,I,i,1,1,l,n,1,1,0
2,I,i,1,1,l,1,n,1,0
2,I,1,i,1,l,1,n,1,0


State3 are auxiliary states that force state1 cells around it to die.

These rules are based on the idea of birth-forcers (bf state) , namely an additional state that triggers whatever cell in its Moore neigborhood to become a live cell immediately. I picked up this idea from 'extended life' rule as posted by extrementhusiast.

To fully exploit bf state, I tried to define their spontaneous generation from state1 cells. In lifebf7, state0 transits to state2 only if surrounded by 7 state1 cells. 7 turns out essential for a chaotic growing pattern other number causes overgrowth/quick death. When I first define lifebf7, the idea is bf state (or state2) is born differently but survive samely as state1, which means a state2 cell needs to have 2/3 state1/state2 neighbors to survive. However, state2 cells does not contribute to the survival of state1 cells in lifebf7. Here are more details on the transition function.
@TRANSIFUNC
switch (c)
{
case 0:
if (state1 neighbors==7)
return 2;
else if ((state1 neighbors + state6 neighbors ==3 )||(state2 neighbors + state4 neighbors >=1))
return 1;
else
return 0;
case 1 :
if (state1 neighbors==7)
return 2;
else if (
!(
( ( state1 neighbors + state6 neighbors ) | 1 )
==3)
||
(state3 neighbors + state4 neighbors>=1 ) 
)
return 0;
else
return 1;
case 2:
if ( ( ( state1 neighbors + state2 neighbors) | 1 )==3 )
return 2;
else

return 0;
case 3: return 3;
case 4: return 4;
case 5: return 5;
case 6: return 6;
default:
        return 0 ; // should throw an error here
   }


As a life-based rule, lifebf7 inherits features such as oscillators, spaceships, puffers and methuselahs.
x = 540, y = 376, rule = lifebf7
390.C$540C$C88.2C88.2C88.2C88.2C88.2C39.C48.C$C88.2C88.2C88.2C88.2C
88.2C39.C48.C$C88.2C88.2C88.2C88.2C88.2C39.C48.C$C88.2C88.2C88.2C88.
2C88.2C39.C48.C$C88.2C88.2C88.2C88.2C88.2C39.C48.C$C88.2C88.2C88.2C
88.2C88.2C39.C48.C$C88.2C88.2C88.2C88.2C88.2C39.C48.C$C88.2C88.2C88.
2C88.2C88.2C39.C48.C$C88.2C88.2C88.2C88.2C88.2C39.C48.C$C88.2C88.2C
88.2C88.2C88.2C39.C48.C$C88.2C88.2C88.2C88.2C88.2C39.C14.2A32.C$C88.
2C88.2C88.2C88.2C88.2C39.C14.A2.A30.C$C88.2C88.2C88.2C88.2C88.2C39.C
10.4A2.B.A3.2A24.C$C88.2C88.2C88.2C88.2C88.2C39.C3.5A2.A7.2A.A2.A23.C
$C88.2C88.2C88.2C88.2C88.2C39.C3.AB.3A2.2A5.2A.AB.A23.C$C88.2C88.2C
88.2C88.2C88.2C39.C3.6A4.2A.A7.A23.C$C88.2C88.2C88.2C88.2C88.2C39.C2.
2A.A12.2A.A.A24.C$C88.2C88.2C88.2C88.2C88.2C39.C2.AB2A42.C$C88.2C88.
2C88.2C88.2C88.2C39.C3.3A4.3A35.C$C88.2C88.2C88.2C88.2C88.2C39.C3.3A
7.A6.A27.C$C88.2C88.2C88.2C88.2C88.2C39.C3.A5.2A.2A5.A.A26.C$C88.2C
88.2C88.2C88.2C88.2C39.C6.A7.A4.A.A26.C$C88.2C88.2C88.2C88.2C88.2C39.
C8.7A5.A27.C$C88.2C88.2C88.2C88.2C88.2C39.C5.2A6.2A33.C$C88.2C88.2C
88.2C88.2C88.2C39.C9.2A4.2A31.C$C88.2C88.2C88.2C88.2C88.2C39.C11.B2.A
.A31.C$C88.2C88.2C88.2C88.2C88.2C39.C.3A7.2A.A33.C$C88.2C88.2C88.2C
88.2C88.2C39.C3.BA.A41.C$C88.2C88.2C88.2C88.2C88.2C39.C4.A.A3.A2.2A2.
2A.2A26.C$C88.2C88.2C88.2C88.2C88.2C39.C.A2.A2.A2.A3.2A3.A2.A25.C$C
88.2C88.2C88.2C88.2C88.2C39.C3A.A5.A6.A2.2A26.C$C88.2C88.2C45.B42.2C
88.2C88.2C39.C.A2.A5.A4.2A31.C$C88.2C88.2C42.B45.2C88.2C41.3A7.3A34.
2C39.C.A2.2A8.5A29.C$C88.2C88.2C88.2C88.2C42.A.A5.A.A35.2C39.C3.B2A2.
A2.B6.2A28.C$C88.2C88.2C44.B43.2C88.2C36.2A.3A11.3A.2A29.2C39.C.A2.A
3.A2.B.A3.3A28.C$C88.2C44.B43.2C41.B46.2C88.2C36.A3.2A2.BA3.AB2.2A3.A
29.2C39.C3.B4.A3.A35.C$C88.2C88.2C88.2C88.2C37.A7.A3.A7.A30.2C39.C4.A
4.3A3.A32.C$C88.2C88.2C88.2C88.2C40.A13.A33.2C39.C2.3A43.C$C88.2C88.
2C88.2C47.B40.2C40.A.2A7.2A.A33.2C39.C48.C$C42.B3.B41.2C45.B42.2C88.
2C88.2C41.A11.A34.2C39.C2.3A43.C$C88.2C88.2C88.2C88.2C88.2C39.C4.A4.
3A3.A32.C$C88.2C88.2C88.2C88.2C88.2C39.C3.B4.A3.A35.C$C88.2C88.2C88.
2C88.2C88.2C39.C.A2.A3.A2.B.A3.3A28.C$C88.2C88.2C88.2C41.B46.2C88.2C
39.C3.B2A2.A2.B6.2A28.C$C88.2C88.2C88.2C88.2C88.2C39.C.A2.2A8.5A29.C$
C88.2C88.2C88.2C88.2C88.2C39.C.A2.A5.A4.2A31.C$C88.2C88.2C88.2C88.2C
88.2C39.C3A.A5.A6.A2.2A26.C$C88.2C88.2C88.2C88.2C88.2C39.C.A2.A2.A2.A
3.2A3.A2.A25.C$C88.2C88.2C88.2C88.2C88.2C39.C4.A.A3.A2.2A2.2A.2A26.C$
C88.2C88.2C88.2C88.2C88.2C39.C3.BA.A41.C$C88.2C88.2C88.2C88.2C88.2C
39.C.3A7.2A.A33.C$C88.2C88.2C88.2C88.2C88.2C39.C11.B2.A.A31.C$C88.2C
88.2C88.2C88.2C88.2C39.C9.2A4.2A31.C$C88.2C88.2C88.2C88.2C88.2C39.C5.
2A6.2A33.C$C88.2C88.2C88.2C88.2C88.2C39.C8.7A5.A27.C$C88.2C88.2C88.2C
88.2C88.2C39.C6.A7.A4.A.A26.C$C88.2C88.2C88.2C88.2C88.2C39.C3.A5.2A.
2A5.A.A26.C$C88.2C88.2C88.2C88.2C88.2C39.C3.3A7.A6.A27.C$C88.2C88.2C
88.2C88.2C88.2C39.C3.3A4.3A35.C$C88.2C88.2C88.2C88.2C88.2C39.C2.AB2A
42.C$C88.2C88.2C88.2C88.2C88.2C39.C2.2A.A12.2A.A.A24.C$C88.2C88.2C88.
2C88.2C88.2C39.C3.6A4.2A.A7.A23.C$C88.2C88.2C88.2C88.2C88.2C39.C3.AB.
3A2.2A5.2A.AB.A23.C$C88.2C88.2C88.2C88.2C88.2C39.C3.5A2.A7.2A.A2.A23.
C$C88.2C88.2C88.2C88.2C88.2C39.C10.4A2.B.A3.2A24.C$C88.2C88.2C88.2C
88.2C88.2C39.C14.A2.A30.C$C88.2C88.2C88.2C88.2C88.2C39.C14.2A32.C$C
88.2C88.2C88.2C88.2C88.2C39.C48.C$C88.2C88.2C88.2C88.2C88.2C39.C48.C$
C88.2C88.2C88.2C88.2C88.2C39.C48.C$C88.2C88.2C88.2C88.2C88.2C39.C48.C
$C88.2C88.2C88.2C88.2C88.2C39.C48.C$C88.2C88.2C88.2C88.2C88.2C39.C48.
C$C88.2C88.2C88.2C88.2C88.2C39.C48.C$C88.2C88.2C88.2C88.2C88.2C39.C
48.C$540C$540C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C
88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C
88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C
88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C
88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C
88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C
88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C
88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C
88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C
88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C
88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C
88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C
88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C
88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C
88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C
88.2C88.2C88.2C88.2C88.2C88.C$C41.2A45.2C88.2C88.2C88.2C88.2C88.C$C
30.2A8.A2.2A43.2C88.2C88.2C88.2C88.2C88.C$C30.2A7.3A2.A43.2C88.2C88.
2C88.2C88.2C88.C$C31.A.A5.A4.A43.2C29.A58.2C44.2A42.2C88.2C88.2C88.C$
C33.A5.5A44.2C26.5A57.2C42.A3.A41.2C88.2C88.2C88.C$C88.2C25.2AB.3A56.
2C41.A2.B.A41.2C88.2C88.2C88.C$C33.A5.5A44.2C25.6A57.2C42.A3.A41.2C
46.A41.2C88.2C88.C$C31.A.A5.A4.A43.2C26.2A.A58.2C44.2A42.2C45.2A41.2C
88.2C88.C$C30.2A7.3A2.A43.2C88.2C88.2C44.4A40.2C88.2C88.C$C30.2A8.A2.
2A43.2C88.2C88.2C43.3A.A40.2C88.2C88.C$C41.2A45.2C88.2C88.2C44.4A40.
2C88.2C88.C$C88.2C88.2C88.2C46.A41.2C88.2C88.C$C88.2C88.2C88.2C46.A
41.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C
88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C
88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C
88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C
88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C
88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C
88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C
88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C
88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C
88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C
88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C
88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C
88.2C88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$C88.2C88.2C88.2C88.2C
88.2C88.C$C88.2C88.2C88.2C88.2C88.2C88.C$540C$361C$C88.2C88.2C88.2C
88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.
2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$
C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C
88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.
2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C
88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.
2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C
88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.
2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C
88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.
2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C28.B59.2C88.2C88.2C
88.2C$C36.B51.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.
2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C
88.2C$C88.2C38.B8.B40.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C
88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.
2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C
88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.
2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$
C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C
88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.
2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C
88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.
2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C
88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.2C88.2C$C88.2C88.2C88.
2C88.2C$361C35$38.A$35.5A$35.A2.3A$35.5A$38.A101$40.A$37.5A$38.B.3A$
37.5A$40.A!


Though it's exciting that new spaceships could escape from random soups in this new rule, the behaviors of state2 cells is rather different from chaotic ones typical of state1 cell, (such as forming spaceships and oscillators). Nevertheless this additional state2 truly improves the survival of random patterns (in a non-exploding manner) and adds diversity to the ordered patterns. Since they flash quite often, I figure it unnecessary to constrain them to survive as state1. Instead, I define their transition identical to state0, i.e. capable to be converted to state 1,2 or decay to 0. This new rule is named 'flashbf7a'.

Transition function of flashbf7a:
@TRANSIFUNC
switch (c)
{
case 0:
if (state1 neighbors==7)
return 2;
else if ((state1 neighbors + state6 neighbors ==3 )||(state2 neighbors + state4 neighbors >=1))
return 1;
else
return 0;
case 1 :
if (state1 neighbors==7)
return 2;
else if (
!(
( ( state1 neighbors + state6 neighbors ) | 1 )
==3)
||
(state3 neighbors + state4 neighbors>=1 ) 
)
return 0;
else
return 1;
case 2:
if (state1 neighbors==7)
return 2;
else if ((state1 neighbors + state6 neighbors ==3 )||(state2 neighbors + state4 neighbors >=1))
return 1;
else
return 0;
case 3: return 3;
case 4: return 4;
case 5: return 5;
case 6: return 6;
default:
        return 0 ; // should throw an error here
   }


It's really amazing to observe higher-order structures spontaneously to emerge form chaos in flashbf7a, namely stationary state2 arrays that separate chaos from each other. You can observe it in any methuselah. As to traditional ordered patterns, it's surprising to see spaceships including guns and spacefiller escaped from random soups. Taken together, 'flashbf7a' is potentiated to simulate self-organisation from chaos.

Methuselahs and Spacefillers (updated:12/04/2016):
x = 180, y = 80, rule = flashbf7a
162.3A3.3A$57.3A101.A3.A.A3.A$57.A2.A100.A.B.A.A.B.A$57.2A.A$59.A102.
A2.A.A2.A$161.A.B5.B.A$161.A.2B3.2B.A$155.2A2.2A.A.A.A.A.A.2A2.2A$
154.A3.A2.A.B5.B.A2.A3.A$154.A.B2.2B.B7.B.2B2.B.A$154.A5.BA2.A3.A2.AB
5.A$47.3A17.3A85.2A.A15.A.2A$47.A2.A16.A2.A90.A9.A$47.2A.A16.2A.A84.
2A.A15.A.2A$49.A19.A84.A5.BA2.A3.A2.AB5.A$154.A.B2.2B.B7.B.2B2.B.A$
154.A3.A2.A.B5.B.A2.A3.A$155.2A2.2A.A.A.A.A.A.2A2.2A$161.A.2B3.2B.A$
161.A.B5.B.A$162.A2.A.A2.A$57.3A$57.A2.A100.A.B.A.A.B.A$57.2A.A100.A
3.A.A3.A$59.A102.3A3.3A31$55.3A$55.A2.A$55.2A.A$57.A7$172.A$175.A.2A$
169.A2.AB5.A$171.B.2B2.B.A$170.B.A2.A3.A$167.A.A.A.2A2.2A$169.2B.A$
170.B.A$34.A22.A23.A86.A2.A$33.3A20.3A21.3A$2.3A27.2A.2A18.2A.2A19.5A
84.A.B.A$.A3.A25.3A.3A16.3A.3A17.3A.3A83.A3.A$2A3.2A25.5A18.2A.2A19.
5A85.3A$.A3.A27.3A20.3A21.3A$2.3A29.A22.A23.A!

Spaceships, including puffers and guns (last updated 12/04/2016):
x = 1435, y = 58, rule = flashbf7a
1197C$C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C$C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.
2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C$C50.2C50.2C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.
2C50.2C50.2C50.2C$C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C$C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.
2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C$C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.
2C50.2C50.2C50.2C50.2C50.2C$C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C21.2A3.2A22.2C50.2C
50.2C50.2C50.2C$C50.2C50.2C50.2C50.2C50.2C50.2C18.6A26.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C16.A3.3A3.3A3.A17.2C50.
2C50.2C50.2C50.2C$C50.2C50.2C50.2C50.2C50.2C50.2C17.A7.A24.2C50.2C23.
B26.2C50.2C50.2C50.2C50.2C13.A36.2C50.2C26.3A21.2C50.2C50.2C17.A5.A.A
5.A18.2C50.2C50.2C50.2C50.2C$C50.2C50.2C50.2C50.2C50.2C19.A2.B2.A24.
2C24.B.A23.2C50.2C19.A7.A22.2C50.2C8.2A.A.2A35.2C50.2C50.2C12.A.A35.
2C50.2C11.A15.A22.2C50.2C50.2C16.A.2B3.A.A3.2B.A17.2C50.2C50.2C50.2C
50.2C$C50.2C50.2C50.2C50.2C22.A2.2B23.2C19.A.2B2.A24.2C17.A7.B24.2C
19.A4.B25.2C19.A7.A22.2C22.A5.A21.2C27.3A20.2C50.2C23.B.B24.2C11.A3.A
34.2C50.2C14.A35.2C50.2C50.2C16.A.B11.B.A17.2C50.2C50.2C50.2C50.2C$C
50.2C24.A2.A22.2C34.A3.A11.2C9.A3.A7.A3.A11.2A11.2C23.A.B24.2C20.A.B
2.A24.2C17.A.B4.B25.2C19.A30.2C22.B.B25.2C23.A3.A22.2C8.A5.A11.A3.A
19.2C50.2C21.A5.A22.2C13.B36.2C50.2C9.A2.B.A12.A22.2C10.A.A37.2C50.2C
50.2C50.2C50.2C50.2C50.2C$C19.3A5.3A20.2C31.2A2.2A13.2C50.2C35.A3.A
10.2C24.A2.A22.2C23.B26.2C17.A32.2C19.A2.B.A25.2C20.A5.A23.2C22.A5.A
21.2C10.B.B12.A5.A18.2C14.3A33.2C23.B.B24.2C11.A3.A34.2C41.A8.2C8.A5.
A8.2A5.2A18.2C50.2C50.2C16.A15.A17.2C50.2C50.2C50.2C50.2C$C19.A2.2A.
2A2.A20.2C25.B.A22.2C32.A2.A.A2.A9.2C7.A2.A.A2.A3.A2.A.A2.A7.A14.2C
50.2C20.A.B27.2C18.A6.A24.2C21.2B.A25.2C22.B.B25.2C22.7A21.2C11.B15.B
.B20.2C14.A.A33.2C24.B25.2C10.A5.A33.2C12.A10.A.A.A.A10.A.A7.2C10.B.B
10.A2.B.B2.A18.2C9.A3.A36.2C50.2C18.B3.B3.B3.B19.2C50.2C50.2C50.2C50.
2C$C20.3A3.3A21.2C22.A8.A4.A13.2C35.A.A12.2C10.A.A9.A.A13.B11.2C23.A.
B.A22.2C50.2C18.A.B.2B26.2C23.A26.2C23.B26.2C23.A3.A22.2C28.B21.2C14.
3A33.2C50.2C10.A.B.B.A33.2C9.A40.2C11.B38.2C11.B38.2C50.2C16.A2.B.B5.
B.B2.A17.2C50.2C50.2C32.B17.2C50.2C$C21.A5.A22.2C24.2B.A5.2B15.2C33.B
.A.A.B10.2C8.B.A.A.B5.B.A.A.B9.A4.A8.2C23.A3.A22.2C20.A.B.A25.2C19.A.
B3.A24.2C50.2C50.2C22.A5.A21.2C9.A.B.A36.2C50.2C22.A.B.A23.2C10.A5.A
33.2C9.A.B2.A6.A2.B3.B2.A9.B8.2C9.A3.A9.A7.A18.2C50.2C50.2C23.A.A24.
2C50.2C25.3A22.2C29.A5.A14.2C50.2C$C50.2C25.B.A6.B15.2C30.A4.A.A4.A7.
2C5.A4.A.A9.A.A4.A8.2B10.2C24.3A23.2C20.A3.A25.2C20.A.2B26.2C20.A.B.A
25.2C21.A.B.A24.2C24.B.B23.2C9.A3.A12.A.B.A19.2C50.2C22.A3.A23.2C12.B
.B35.2C9.A5.A4.A11.A5.A5.A5.2C11.B13.B3.B20.2C50.2C50.2C19.B.B5.B.B
20.2C50.2C50.2C31.B.B16.2C50.2C$C50.2C23.A2.A5.A2.A14.2C32.2B5.2B9.2C
7.2B5.2B3.2B5.2B10.B11.2C50.2C21.3A26.2C20.A.B27.2C20.A3.A25.2C21.A3.
A24.2C25.B24.2C10.3A13.A3.A19.2C50.2C23.3A24.2C13.B36.2C11.B.B8.B.B3.
B.B9.B.B7.2C7.A7.A7.A2.B.B2.A18.2C50.2C50.2C17.A5.A.A5.A18.2C20.A9.A
19.2C50.2C32.B17.2C50.2C128.2A99.4A$C50.2C50.2C33.B5.B10.2C8.B5.B5.B
5.B10.A2.A9.2C50.2C50.2C21.A2.A25.2C21.3A26.2C22.3A25.2C50.2C27.3A20.
2C50.2C50.2C50.2C12.B10.B5.B11.B8.2C7.A7.A34.2C50.2C50.2C19.B.B5.B.B
20.2C20.A9.A19.2C50.2C50.2C50.2C127.A2.A98.2A2.A$C50.2C23.A.B.A4.A.B.
A13.2C31.A2.A3.A2.A8.2C6.A2.A3.A2.A.A2.A3.A2.A21.2C50.2C50.2C50.2C50.
2C50.2C23.A.B.A22.2C50.2C50.2C50.2C11.A.B.A34.2C50.2C10.B.B13.B.B21.
2C50.2C50.2C17.A2.B7.B2.A18.2C50.2C50.2C32.B17.2C50.2C127.A3.A98.A3.A
$C50.2C23.A3.A4.A3.A13.2C50.2C36.A.B.A9.2C50.2C50.2C20.A.B.A25.2C50.
2C50.2C23.A3.A22.2C50.2C50.2C50.2C11.A3.A34.2C10.A.B.A6.A.B.A.A.B.A7.
A.B.A6.2C8.A5.A9.A5.A19.2C10.A.A20.A.A14.2C50.2C22.A3.A23.2C24.3A23.
2C50.2C29.A5.A14.2C50.2C58.3A23.A17.2A23.2A.A.A97.2A.A.A$C50.2C24.3A
6.3A14.2C31.A.B.A.A.B.A8.2C6.A.B.A.A.B.A.A.B.A.A.B.A7.A3.A9.2C50.2C
50.2C20.A3.A25.2C50.2C50.2C24.3A23.2C50.2C14.3A33.2C50.2C12.3A35.2C
10.A3.A6.A3.A.A3.A7.A3.A6.2C10.B.B13.B.B21.2C9.A3.A18.A3.A13.2C50.2C
20.B7.B21.2C50.2C50.2C31.B.B16.2C10.B.B37.2C43.A3.A11.B2.A17.A2.B.A
15.A3.A28.A95.A6.A$C50.2C50.2C31.A3.A.A3.A8.2C6.A3.A.A3.A.A3.A.A3.A8.
3A10.2C50.2C50.2C21.3A26.2C50.2C50.2C50.2C50.2C13.A3.A32.2C50.2C50.2C
11.3A8.3A3.3A9.3A7.2C11.B15.B22.2C50.2C50.2C18.A3.A3.A3.A19.2C23.A3.A
22.2C25.3A22.2C32.B17.2C8.A5.A13.A.A19.2C42.A2.B.A11.2B.A22.A15.A5.A
23.B2.A99.B2.A$C50.2C50.2C32.3A3.3A9.2C7.3A3.3A3.3A3.3A22.2C50.2C50.
2C50.2C50.2C50.2C50.2C50.2C12.A2.B2.A31.2C50.2C50.2C50.2C50.2C9.B3.B
18.B3.B13.2C50.2C20.2B5.2B21.2C23.AB.BA22.2C24.A.A.A21.2C50.2C10.B.B
14.A3.A18.2C43.A3.A8.A3.B.A16.A.B.B.A18.B2.A25.A102.A$C50.2C50.2C50.
2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C9.A.B.A
11.A.B.A20.2C7.A7.A14.A7.A11.2C50.2C22.A3.A23.2C22.A.B.B.A21.2C50.2C
5.A5.A20.B17.2C11.B38.2C46.A10.A3.A16.A3.B.A21.A23.3A100.3A$C50.2C50.
2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C9.
A3.A11.A3.A20.2C7.A7.A14.A7.A11.2C50.2C50.2C22.A5.A21.2C25.B.B22.2C7.
B.B19.A5.A14.2C27.B3.B18.2C44.2A13.2A18.A3.A19.3A$C50.2C50.2C50.2C50.
2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C13.A.B.A32.2C50.2C50.2C50.2C10.
3A13.3A21.2C9.B3.B18.B3.B13.2C50.2C19.A.B.A.A.B.A20.2C22.A5.A21.2C23.
A5.A20.2C8.B22.B.B16.2C50.2C81.2A$C50.2C50.2C50.2C50.2C50.2C50.2C50.
2C50.2C50.2C50.2C50.2C13.A3.A32.2C50.2C50.2C50.2C50.2C7.A2.B.B2.A14.A
2.B.B2.A11.2C50.2C19.A3.A.A3.A20.2C24.B.B23.2C25.B.B22.2C32.B17.2C25.
A7.A16.2C$C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C14.
3A33.2C50.2C50.2C50.2C50.2C50.2C50.2C20.3A3.3A21.2C25.B24.2C26.B23.2C
6.A.B.A39.2C25.A.B3.B.A16.2C$C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.
2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C10.B.B20.B.B14.2C50.2C50.2C
50.2C50.2C6.A3.A21.B17.2C25.A2.B.B2.A16.2C$C50.2C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C21.2A7.2A18.2C50.2C8.A5.
A16.A5.A12.2C50.2C50.2C25.B24.2C26.B23.2C7.3A19.A5.A14.2C29.B20.2C$C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.
2C24.A3.A21.2C50.2C10.B.B20.B.B14.2C50.2C50.2C22.A5.A21.2C23.A5.A20.
2C31.B.B16.2C50.2C$C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.
2C50.2C50.2C50.2C50.2C21.A3.A.A3.A18.2C50.2C11.B22.B15.2C50.2C50.2C
24.B.B23.2C25.B.B22.2C32.B17.2C27.A.B.A18.2C$C50.2C50.2C50.2C50.2C50.
2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C23.B5.B20.2C50.2C50.2C
50.2C50.2C25.B24.2C26.B23.2C50.2C27.A3.A18.2C$C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C21.A3.A.A3.A18.2C
50.2C9.A.B.A18.A.B.A13.2C50.2C50.2C50.2C50.2C32.B17.2C28.3A19.2C$C50.
2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C
20.A11.A17.2C50.2C9.A3.A18.A3.A13.2C50.2C50.2C23.A.B.A22.2C24.A.B.A
21.2C29.A5.A14.2C50.2C$C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C20.A.B.B3.B.B.A17.2C50.2C10.3A20.3A14.2C50.
2C50.2C23.A3.A22.2C24.A3.A21.2C31.B.B16.2C50.2C$C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C20.A11.A17.2C50.2C
50.2C50.2C50.2C24.3A23.2C25.3A22.2C32.B17.2C50.2C$C50.2C50.2C50.2C50.
2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C22.B.B3.B.B19.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C$C50.2C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C23.B5.B20.2C50.2C50.2C
50.2C50.2C50.2C50.2C30.A.B.A15.2C50.2C$C50.2C50.2C50.2C50.2C50.2C50.
2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C
50.2C50.2C30.A3.A15.2C50.2C$C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C35.3A12.2C50.2C50.2C21.A.B.A.A.B.A18.2C50.2C50.2C50.2C
50.2C50.2C50.2C31.3A16.2C50.2C$C50.2C50.2C50.2C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C34.A3.A11.2C50.2C50.2C21.A3.A.A3.A18.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C$C50.2C50.2C50.2C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C33.A2.B2.A10.2C50.2C50.2C22.3A3.3A19.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C$C50.2C50.2C50.2C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C42.2A.2A3.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C$C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.
2C$C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C34.A.B.A3.
A.B.A3.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C$C50.
2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C34.A3.A3.A3.A3.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C$C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C35.3A5.3A4.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C$C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.
2C50.2C50.2C50.2C50.2C50.2C$C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.
2C50.2C$C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C$C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.
2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C$C50.2C50.2C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.
2C50.2C50.2C50.2C$C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C$C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.
2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C$C50.2C50.2C50.2C50.2C
50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.2C50.
2C50.2C50.2C50.2C50.2C50.2C!


I hope you find them interesting.

Kind regards
Feng

Fairs of interest:
1. I used make-ruletable.cpp from Golly to calculate rule table from transition function. As a beginner in c-programming I am unable to fully automate the script to. Instead I combined batch replacer and .bat to semi-automate the process. I would really appreciate if anyone can incorporate a gui to allow specifying parameters and transition function. (ATM I am interested only in totalistic rules)
2. I haven't been able to find any automated scripts for 3-state totalistic rules. Please do advise since I know little about coding.

Future:
1.flashbf[4/5/6/8]a

I am omitting 'a' since it was only for historical reasons.

flashbf6 is an exploding pattern but exhibits self-organisation similar to flashbf7
flashbf8 stabilises rather quickly, forming oscillators with a core of state2 cells.

flashbf5 and flashbf9 awaits examination.

flashbf6.table
# rules: 79
#
# Golly rule-table format.
# Each rule: C,N,NE,E,SE,S,SW,W,NW,C'
# N.B. Where the same variable appears multiple times in a transition,
# it takes the same value each time.
#
# Default for transitions not listed: no change
#
n_states:4
neighborhood:Moore
symmetries:rotate8
var a={0,2}
var b={0,1,2,3}
var c={0,1,2,3}
var d={0,2,3}
var e={0,2,3}
var f={0,1,2,3}
var g={0,1,2,3}
var h={0,1,2,3}
var i={0,3}
var j={0,2,3}
var k={0,2,3}
var l={1,2}
var m={0,1,3}
var n={0,1,3}
var o={0,3}
var p={0,3}
var q={0,3}
var r={1,2}
var s={0,1,3}
var t={0,1,3}
var u={0,1}
var v={1,3}
var w={1,3}
var x={0,2,3}
var y={0,2,3}
var z={0,2,3}
var A={0,1,2}
var B={0,1,2}
var C={0,1,2}
var D={0,1,2}
var E={0,3}
var F={0,1}
var G={0,1}
var H={0,2}
var I={0,2}
var J={0,2}
var K={0,3}
a,b,c,d,e,f,g,h,2,1
a,i,d,e,j,k,1,1,1,1
a,d,e,j,k,l,i,1,1,1
a,d,e,j,k,l,1,i,1,1
a,b,d,e,c,2,f,m,g,1
a,b,d,e,1,m,c,n,2,1
a,d,i,o,1,p,q,1,1,1
a,d,e,j,1,i,1,o,1,1
a,i,d,o,1,1,p,q,1,1
a,i,o,l,p,d,1,q,r,1
a,d,e,1,m,n,s,t,2,1
a,d,e,1,m,2,n,s,1,1
a,u,d,1,1,e,1,b,2,1
a,u,d,1,b,1,e,c,2,1
a,u,i,1,m,v,w,d,2,1
u,d,e,1,1,1,1,1,1,2
a,i,u,m,n,2,d,1,1,1
a,d,u,m,b,2,1,e,1,1
a,i,d,2,m,n,s,t,1,1
0,0,0,2,1,0,1,1,1,1
a,i,u,2,m,1,d,1,1,1
a,i,u,2,b,1,1,o,1,1
a,i,1,o,1,m,n,s,2,1
0,0,1,0,1,0,1,2,1,1
a,i,1,o,1,m,2,1,1,1
a,d,1,u,1,1,i,1,2,1
a,u,1,i,1,1,d,2,1,1
a,u,1,i,1,1,1,o,2,1
u,d,1,e,1,1,1,1,1,2
0,0,1,0,1,2,0,1,1,1
a,i,1,o,2,m,n,1,1,1
0,0,1,0,2,1,0,1,1,1
a,i,1,1,u,1,1,o,2,1
u,d,1,1,e,1,1,1,1,2
u,d,1,1,1,e,1,1,1,2
a,i,1,1,1,o,1,1,2,1
a,1,1,1,1,1,1,1,2,1
1,d,e,j,k,x,y,z,b,0
1,b,c,d,e,f,g,h,3,0
1,A,b,c,d,e,f,3,g,0
1,b,A,d,u,e,3,c,B,0
1,d,e,A,B,C,D,b,3,0
l,i,o,p,q,m,E,3,n,0
1,u,d,a,F,A,b,B,3,0
1,a,d,e,A,1,1,1,1,0
1,F,d,e,u,l,3,A,B,0
1,A,F,a,d,3,B,C,D,0
1,b,F,d,u,3,1,e,1,0
1,F,0,0,1,u,A,l,3,0
l,E,i,o,1,p,F,q,3,0
1,A,d,e,1,a,1,1,1,0
1,A,F,d,1,1,e,u,3,0
1,A,d,e,1,1,a,1,1,0
1,A,d,e,1,1,1,a,1,0
1,d,F,u,b,3,G,a,1,0
l,E,i,o,3,p,q,1,m,0
l,E,0,i,3,o,1,p,F,0
1,A,a,1,d,H,1,1,1,0
1,b,d,1,H,1,e,1,1,0
1,H,A,v,d,1,1,e,1,0
1,H,a,1,1,I,J,1,1,0
1,H,I,1,1,J,1,a,1,0
1,H,1,I,1,J,1,a,1,0
1,b,1,1,1,1,1,1,1,0
2,E,i,o,p,q,K,m,n,0
2,E,0,K,0,i,1,o,1,0
2,E,K,i,o,1,p,0,1,0
2,E,K,i,m,1,1,1,1,0
2,E,K,i,1,o,p,q,1,0
2,m,E,K,1,i,1,1,1,0
2,m,E,K,1,1,i,1,1,0
2,m,E,K,1,1,1,i,1,0
2,m,E,1,K,i,1,1,1,0
2,m,E,1,K,1,i,1,1,0
2,E,m,1,K,1,1,i,1,0
2,E,K,1,1,i,o,1,1,0
2,E,K,1,1,i,1,o,1,0
2,E,1,K,1,i,1,o,1,0
2,m,1,1,1,1,1,1,1,0


flashbf8.table
# rules: 43
#
# Golly rule-table format.
# Each rule: C,N,NE,E,SE,S,SW,W,NW,C'
# N.B. Where the same variable appears multiple times in a transition,
# it takes the same value each time.
#
# Default for transitions not listed: no change
#
n_states:4
neighborhood:Moore
symmetries:rotate8
var a={0,2}
var b={0,1,2,3}
var c={0,1,2,3}
var d={0,1,2,3}
var e={0,1,2,3}
var f={0,1,2,3}
var g={0,1,2,3}
var h={0,1,2,3}
var i={0,3}
var j={0,3}
var k={0,3}
var l={0,3}
var m={0,3}
var n={0,1}
var o={0,2,3}
var p={0,2,3}
var q={0,2,3}
var r={0,2,3}
var s={0,2,3}
var t={0,2,3}
var u={0,2,3}
var v={1,2}
var w={0,1,3}
var x={0,1,3}
var y={0,1,2}
var z={0,1,2}
var A={0,1,2}
var B={0,2}
var C={0,2}
var D={0,2}
var E={0,3}
var F={0,1,3}
a,b,c,d,e,f,g,h,2,1
a,i,j,k,l,m,1,1,1,1
a,i,j,k,l,1,m,1,1,1
a,i,j,k,l,1,1,m,1,1
a,i,j,k,1,l,m,1,1,1
a,i,j,k,1,l,1,m,1,1
a,i,j,k,1,1,l,m,1,1
a,i,j,1,k,l,1,m,1,1
n,1,1,1,1,1,1,1,1,2
1,o,p,q,r,s,t,u,b,0
1,b,c,d,e,f,g,h,3,0
v,i,j,k,l,m,w,3,x,0
v,i,j,k,l,m,3,n,1,0
v,i,j,k,l,1,0,w,3,0
v,i,j,k,l,1,m,3,n,0
v,i,j,k,0,1,1,l,3,0
1,a,y,z,A,1,1,1,1,0
v,i,j,k,l,1,3,0,1,0
v,i,0,j,k,3,0,n,1,0
v,0,i,j,k,3,1,0,1,0
1,a,A,y,1,B,1,1,1,0
1,B,A,y,1,1,a,1,1,0
1,B,a,C,1,1,1,D,1,0
1,B,C,1,D,a,1,1,1,0
1,B,C,1,D,1,a,1,1,0
1,B,C,1,D,1,1,a,1,0
1,B,C,1,1,D,a,1,1,0
1,B,C,1,1,D,1,a,1,0
1,B,1,C,1,D,1,a,1,0
2,i,j,k,l,m,E,w,x,0
2,0,E,i,j,0,1,0,1,0
2,E,i,j,k,1,0,0,1,0
2,E,w,x,F,1,1,1,1,0
2,E,i,j,1,k,l,m,1,0
2,E,F,w,1,i,1,1,1,0
2,E,F,w,1,1,i,1,1,0
2,E,i,j,1,1,1,k,1,0
2,E,i,1,j,k,1,1,1,0
2,E,i,1,j,1,k,1,1,0
2,E,i,1,j,1,1,k,1,0
2,E,i,1,1,j,k,1,1,0
2,E,i,1,1,j,1,k,1,0
2,E,1,i,1,j,1,k,1,0


Though exploding, spaceships still escape in this pattern at around gen 2,000.
x = 30, y = 7, rule = flashbf6
3.A22.A$2.3A20.3A$.2A.2A18.2A.2A$3A.3A16.3A.3A$.2A.2A18.2A.2A$2.3A20.
3A$3.A22.A!


2. I will examine bf states that dies only when surrounded by 7 state1 cells.
Last edited by shouldsee on April 12th, 2016, 3:38 am, edited 4 times in total.
shouldsee
 
Posts: 406
Joined: April 8th, 2016, 8:29 am

Re: 3-state life-based rules with mobile birth forcers

Postby shouldsee » April 10th, 2016, 11:49 pm

A pseudo linear propagator?

x = 21, y = 18, rule = flashbf7a
4$13.A$11.A.A$5.2A.A4.A$4.A5.B$4.A.B2.2B$4.A5.B$5.2A.A4.A$11.A.A$13.A
!


Some collisions
x = 267, y = 106, rule = flashbf7a
16$19.3A2$17.A5.A$17.A5.A$17.A5.A2$19.3A4$28.A$27.A$19.3A5.3A$78.3A$
17.A5.A$17.A5.A$17.A5.A2$19.3A$78.3A4$73.2A$19.3A50.A.A$74.A3.3A$17.A
5.A$17.A5.A$17.A5.A2$19.3A$78.3A34$16.A$14.2A127.A$15.2A51.A.A73.2A$
68.2A73.2A$23.2A44.A$22.A3.A53.2A$22.A.B54.A3.A126.A15.A$22.A3.A52.A.
B2.A60.2A61.4A13.4A$23.2A54.A3.A61.A.A58.3A.3A11.3A.3A$80.2A63.A62.4A
13.4A$210.A15.A!
shouldsee
 
Posts: 406
Joined: April 8th, 2016, 8:29 am

Re: 3-state life-based rules with mobile birth forcers

Postby shouldsee » April 11th, 2016, 4:04 am

Any chance improving these pseudo diagonal puffers?
x = 229, y = 11, rule = flashbf7a
220.4A$86.2A22.4A20.4A22.4A23.4A29.2A2.A$85.A2.A21.2A2.A19.2A2.A21.2A
2.A22.2A2.A29.A3.A$85.A3.A21.A3.A19.A3.A21.A3.A22.A3.A28.2A.A.A$16.3A
23.A17.2A23.2A.A.A20.2A.A.A18.2A.A.A20.2A.A.A21.2A.A.A27.A6.A$.A3.A
11.B2.A17.A2.B.A15.A3.A28.A18.A6.A16.A6.A18.A6.A19.A6.A29.B2.A$A2.B.A
11.2B.A22.A15.A5.A23.B2.A22.B2.A20.B2.A22.B2.A23.B2.A31.A$.A3.A8.A3.B
.A16.A.B.B.A18.B2.A25.A25.A23.A25.A26.A29.3A$4.A10.A3.A16.A3.B.A21.A
23.3A23.3A21.3A23.3A24.3A$2.2A13.2A18.A3.A19.3A$39.2A!
shouldsee
 
Posts: 406
Joined: April 8th, 2016, 8:29 am

Re: 3-state life-based rules with mobile birth forcers

Postby Bullet51 » April 11th, 2016, 6:42 am

Just a 6c/12 spaceship:
x = 6, y = 13, rule = flashbf7a
.A2.A$2.2B2$2.2B2$A4.A$2.2B$3.B$.A2.A2$.A.B.A$.A3.A$2.3A!
Still drifting.
Bullet51
 
Posts: 530
Joined: July 21st, 2014, 4:35 am

Re: 3-state life-based rules with mobile birth forcers

Postby shouldsee » April 11th, 2016, 11:50 pm

An engineered train.
x = 18, y = 28, rule = flashbf7a
14.B$11.A5.A$13.B.B$14.B2$14.B$11.A5.A$13.B.B$14.B2$A5.A7.B$2.B.B6.A
5.A$3.B9.B.B$14.B$.A.B.A$.A3.A8.B$2.3A6.A5.A$13.B.B$14.B2$14.B$11.A5.
A$13.B.B$14.B2$12.A.B.A$12.A3.A$13.3A!
shouldsee
 
Posts: 406
Joined: April 8th, 2016, 8:29 am

Re: 3-state life-based rules with mobile birth forcers

Postby shouldsee » April 12th, 2016, 2:57 am

This torus oscillates at a period of 761,544.

x = 31, y = 31, rule = flashbf7a:T31,31
.7A2.5A.2B.5A.3A.2B$B.13A.B.B.5A2.A$2.14A.B.B.7A.B$.B.6A.7A.B.B.7A.B$
B.B.5A.8A.B.B.7A$.2B.7A4.4A.B.B.7A$A2.12A.4A.B.B.6A$7A2.6A2.4A.2B.2A.
3A$6A.2B.5A3.4A2.4A.2A$2.4A.2B.5A4.10A$7A2.6A5.11A$12A13.6A$4A.18A.4A
2.A$4A2.15A.A.3A.2B$.4A.7A2.8A.2A.B2.B$B.10A.2B.7A.2A.B$.B.8A.B2.B.6A
.3A.B$2.B.6A.B4.B.10A.B$3.B.5A.B5.B3.8A.B$B3.B.5A4.B4.B.8A$.B3.B.8A.B
4.B.8A$A.B3.B.8A.B3.B.8A$2A.B2.B.9A.B.B.9A$3A.2B.11A3.5A2.3A$4A2.19A.
2B.2A$19A.5A.2B.2A$19A4.3A2.3A$19A3.9A$8A2.13A.7A$7A.2B.20A$7A.2B.5A
2.5A.A.3A!


The seed pattern is
x = 31, y = 31, rule = flashbf7a:T31,31
12$14.A.A$14.2A$15.A$26.2A$25.A3.A$25.A.B2.A$25.A3.A$26.2A!


There is another 70*61 torus that has evolved for 77M but hasn't repeated itself yet.

Gen 0
x = 70, y = 61, rule = flashb7a:T70,61
26$34.2A$33.A2.2A$32.3A2.A$32.A4.A$32.5A2$32.5A$32.A4.A$32.3A2.A$33.A
2.2A$34.2A!


Gen 77,497,512
x = 70, y = 61, rule = flashb7a:T70,61
A4.B.2A.B.B.5A2.5A2.4A.2A4.4A8.6A.B3.8A$A4.B.2A.B.B.5A2.5A2.4A.2A4.4A
8.6A.B3.8A$.B2.B.4A3.5A.2B.3A.2B.3A.2A3.4A.B.B3.2B.6A.B.B.7A$B2.B.12A
.B2.B3.B.B.3A2.7A.B.B.2A.B.B.6A.B.B.4A$2.B.7A.4A.2B4.2B.B.3A.A.6A.B3.
4A3.B.6A.B.B.2A.B$.B.6A.A.3A.B3.2A2.2B.4A3.5A.B4.4A4.B.6A3.B2.B$B.5A
3.A.3A.B2.A2.A.B.4A4.4A.B4.B.2A.B4.B.5A.B4.B$.6A5.4A.B.A2.A2.5A.6A.B
6.B2.B7.4A.B2.A2.B.B$8A4.5A2.A2.A2.5A2.4A.B11.B2.B2.B.2A.2B3.A.2B$9A
3.5A2.A2.A.B.9A.B16.B2.B2.2B.A.A.2B.A$4A2.4A.5A.B.A4.2B.7A.B7.B2.B6.B
.B5.A.A.2B.2A$3A.2B.8A.B2.A6.B.5A.B7.B.2A.B.B3.B.2B7.2B.3A$2A.B3.7A.B
3.A6.B.4A.4B4.B.4A.B6.B7.2B.4A$A.B2.B.6A.B5.A3.2B.4A.2B6.B.6A4.B2.B7.
B.5A$.B2.B.6A.B.4B3.2B2.4A.B.B3.B.B.7A3.B.2A.B5.B.6A$3.B.6A.B2.B.B4.B
.5A.B.B2.A2.B.8A2.B.4A5.B.4A2.A$.2B.6A.B9.B.5A.B2.B6.8A.B2.5A4.B.4A2.
2A$A2.6A.2B5.B2.B.5A.B3.2B3.B.7A.B3.4A.B2.B.4A3.2A$8A.B.2B.B3.2B.5A.B
3.B2.B.2B.6A.5B.2A.B4.4A4.2A$7A.B2.B8.5A.B3.B.2A.B2.B.4A.B.B.B.B2.B5.
3A6.A$6A.B3.B2.2B4.4A.B5.4A4.B.2A.B2.3B10.4A4.2A$6A4.B.2A.5B.2A.B.3B
2.4A5.B2.B3.B2.B8.B.9A$5A.B2.B.4A.B3.B2.3B.B.2B.2A.B10.B.2A.B3.B3.2B.
4A.3A$4A.B2.B.6A.B3.B6.2B.B2.B10.B.4A.B2.2B.2B.B.5A.A$3A.B2.B.8A.B2.B
5.3B2.B2.B8.B.6A.B.B3.B.B.4A.2A$2A.B2.B.4A2.4A.B.B.A3.B3.B.2A.B6.B.8A
.B5.B.8A$A.B2.B.12A.B.B4.B2.B.4A.B4.B.4A.5A.B3.B.9A$.B2.B.4A.2A.6A.B.
B3.B.B.6A.B2.B.5A.6A.B.B.10A$B4.10A.5A.B.B.B.B.8A.B2.6A.7A3.10A$5.5A
4.8A7.4A2.4A.B.4A5.5A3.5A.3A.B$5.A2.2A7.6A2.A2.5A2.5A.A10.3A.4A3.2A2.
A2$5.A2.2A7.6A2.A2.5A2.5A.A10.3A.4A3.2A2.A$5.5A4.8A7.4A2.4A.B.4A5.5A
3.5A.3A.B$B4.10A.5A.B.B.B.B.8A.B2.6A.7A3.10A$.B2.B.4A.2A.6A.B.B3.B.B.
6A.B2.B.5A.6A.B.B.10A$A.B2.B.12A.B.B4.B2.B.4A.B4.B.4A.5A.B3.B.9A$2A.B
2.B.4A2.4A.B.B.A3.B3.B.2A.B6.B.8A.B5.B.8A$3A.B2.B.8A.B2.B5.3B2.B2.B8.
B.6A.B.B3.B.B.4A.2A$4A.B2.B.6A.B3.B6.2B.B2.B10.B.4A.B2.2B.2B.B.5A.A$
5A.B2.B.4A.B3.B2.3B.B.2B.2A.B10.B.2A.B3.B3.2B.4A.3A$6A4.B.2A.5B.2A.B.
3B2.4A5.B2.B3.B2.B8.B.9A$6A.B3.B2.2B4.4A.B5.4A4.B.2A.B2.3B10.4A4.2A$
7A.B2.B8.5A.B3.B.2A.B2.B.4A.B.B.B.B2.B5.3A6.A$8A.B.2B.B3.2B.5A.B3.B2.
B.2B.6A.5B.2A.B4.4A4.2A$A2.6A.2B5.B2.B.5A.B3.2B3.B.7A.B3.4A.B2.B.4A3.
2A$.2B.6A.B9.B.5A.B2.B6.8A.B2.5A4.B.4A2.2A$3.B.6A.B2.B.B4.B.5A.B.B2.A
2.B.8A2.B.4A5.B.4A2.A$.B2.B.6A.B.4B3.2B2.4A.B.B3.B.B.7A3.B.2A.B5.B.6A
$A.B2.B.6A.B5.A3.2B.4A.2B6.B.6A4.B2.B7.B.5A$2A.B3.7A.B3.A6.B.4A.4B4.B
.4A.B6.B7.2B.4A$3A.2B.8A.B2.A6.B.5A.B7.B.2A.B.B3.B.2B7.2B.3A$4A2.4A.
5A.B.A4.2B.7A.B7.B2.B6.B.B5.A.A.2B.2A$9A3.5A2.A2.A.B.9A.B16.B2.B2.2B.
A.A.2B.A$8A4.5A2.A2.A2.5A2.4A.B11.B2.B2.B.2A.2B3.A.2B$.6A5.4A.B.A2.A
2.5A.6A.B6.B2.B7.4A.B2.A2.B.B$B.5A3.A.3A.B2.A2.A.B.4A4.4A.B4.B.2A.B4.
B.5A.B4.B$.B.6A.A.3A.B3.2A2.2B.4A3.5A.B4.4A4.B.6A3.B2.B$2.B.7A.4A.2B
4.2B.B.3A.A.6A.B3.4A3.B.6A.B.B.2A.B$B2.B.12A.B2.B3.B.B.3A2.7A.B.B.2A.
B.B.6A.B.B.4A$.B2.B.4A3.5A.2B.3A.2B.3A.2A3.4A.B.B3.2B.6A.B.B.7A!
shouldsee
 
Posts: 406
Joined: April 8th, 2016, 8:29 am

Re: 3-state life-based rules with mobile birth forcers

Postby shouldsee » April 12th, 2016, 4:58 am

"Access Denied"

This is a torus.

x = 81, y = 62, rule = flashbf7a:T81,62
10$46.C$45.C$44.C3.C$22.A20.C3.C$21.3A18.C3.C$20.2A.2A16.C3.C5.C$19.
3A.3A14.C3.C5.C$20.2A.2A14.C3.C5.C$21.3A3.A10.C3.C5.C7.C$22.A3.3A8.C
3.C5.C7.C$26.A.2A6.C3.C5.C7.C$26.A.3A4.C3.C5.C7.C$26.A.2A4.C3.C5.C7.C
$26.3A4.C3.C5.C7.C$27.A4.C3.C5.C7.C11.C$31.C3.C5.C7.C11.C$30.C3.C5.C
7.C11.C$29.C3.C5.C7.C11.C$28.C3.C5.C7.C11.C$27.C3.C5.C7.C11.C$26.C3.C
5.C7.C11.C$25.C3.C5.C7.C11.C$24.C3.C5.C7.C11.C$23.C3.C5.C7.C11.C17.C$
26.C5.C7.C11.C17.C$25.C5.C7.C11.C17.C$30.C7.C11.C17.C$29.C7.C11.C17.C
$28.C7.C11.C17.C$35.C11.C17.C$34.C11.C17.C$33.C11.C17.C$32.C11.C17.C$
43.C17.C$42.C17.C$41.C17.C$40.C17.C$39.C17.C$38.C17.C$55.C$54.C$53.C$
52.C$51.C$50.C$49.C$48.C$47.C!
shouldsee
 
Posts: 406
Joined: April 8th, 2016, 8:29 am

Re: 3-state life-based rules with mobile birth forcers

Postby shouldsee » April 12th, 2016, 9:19 pm

A tube capable of screening for orthongonally moving objects. (Though it's sometimes jammed, and require manual removal of patterns near the opening) This is a torus. A script to automate spaceship/puffer recognition would be helpful.
x = 81, y = 62, rule = flashbf7a:T81,62
14$67.A$66.3A$65.2A.2A$64.3A.3A$65.2A.2A$66.3A$67.A18$30C20.31C10$30C
20.31C!


Multiple long tubes (2 different widths)

x = 552, y = 64, rule = flashbf7a:T552,64
C28.C$C28.C$C28.C$C28.C$C28.C$C27.524C$C$C$C$C$C$C$C$C$C$C27.524C$C
28.C$C28.C$C28.C$C28.C$C28.C$C28.C$C28.C$C28.C$C28.C$C28.C$C27.524C$C
$C$C$C$C$C$C14.A$C13.3A$C12.2A.2A$C11.3A.3A9.524C$C12.2A.2A11.C$C13.
3A12.C$C14.A13.C$C28.C$C28.C$C28.C$C28.C$C28.C$C28.C$C28.C$C27.524C$C
$C$C$C$C$C$C$C$C$C27.524C$C28.C$C28.C$C28.C$C28.C$C28.C$C28.C!


A tube puffer
x = 52, y = 11, rule = flashbf7a:T552,64
52C2$5.A$3.A2.A.3A$4.B.A4.A$2.A.B.2A3.A$3.3A.A$5.2A3.A$7.2A$7.A$52C!


A tube methuselah
x = 53, y = 11, rule = flashbf7a
52C3$21.A$20.A.A$19.A2.A$20.A.A$21.A3$52C!


Some tube jamming on the right

x = 22, y = 64, rule = flashbf7a:T552,64
A.7A2.C$A.5A4.C$6A.2B2.C$5A.B4.C$4A.5B.C$3A.2B3.B12C$2A.2B.A2.B2.A$2.
2B.A2.A.2B.A$2.2B2.3A2.2B$2.2B4.A5.A$2.2B2.2B6.A$3B.2A.2B2.2B$.B.4A.B
2.B.A$B.6A4.A$.10A$9A.12C$7A.A2.C$9A2.C$6A5.C$.8A2.C$B.5A.A2.C$.B.7A.
C$2.B.6A.C$2.B.6A.C$.B.6A2.C$2.9AC$B.4A2.2A12C$2B.11A3.A$B.B.9A.3B2.
2A$3.B.7A.B.2B.4A$4.B.6A6.4A$4.B.5A.B4.B.3A$3.B.5A.B6.B.A$2.B.6A.B6.B
$.B.8A.2B2.2B.A$B.10A6.A$.7A2.12C$.6A.2B.C$B.4A.B3.C$.B.2A.B2.B.C$2.B
2.B5.C$3.3B4.AC$3.B.B.B2.AC$3.4B.2A.C$5.B.3A.C$2B2.B.4A.C$.B.B.5A.C$
3B.6A.11C$.B.7A$2.8A$2.4A.2A$.B.5A$2.B.3A$4B.2A$B.B2.A$4B.2A$2.B.4A$.
B.6A.12C$B.7A2.C$.8A2.C$4A.4A2.C$4A.4A2.C$4A.3A3.C$8A3.C!


Diagonal tube:

Signal like behavior
x = 56, y = 42, rule = flashbf7a:T56,42
4A.B6.5A.2B3.B2.AC2A3.4AC7A.4A5.A$3A.B2.3B2.6A.2B2.2B.C3A2.4AC12A.B2.
A.A$2A.B.B2.2B.B.6A.B2.B.C.3A.4AC12A.B.B.3A$A.B2.2B2.B2.B.6A.2B.C2.7A
C12A.B.B.4A$.B3.B2.B4.B.6A2.C4.5AC12A.B.B.5A$B10.4B.5A.C6.3AC11AC.B.B
.5A$5.B2.B5.2B.4AC9.C5A.5ACA2.B.5A.B$4.B.2A.B5.2B.2AC9.C11AC5.5A.B$3.
B.4A.2B3.B2.AC9.C5A.5AC3.7A.B$2.B.6A.2B2.2B.C9.C5A.5AC6.4A.B$.B.8A.B
2.B.C9.C5A.5AC7.2ACA$B.10A4.C9.C5A.5AC9.C$.14AC9.C5A.5AC9.C7.B$13A.C
9.C5A.5AC9.C3.A.B.B$12A.C9.C5A.5AC9.C9.A$11A.C9.C5A.5AC9.C8.A.C$10A.C
9.C5A.5AC9.C10.CA$9A.C9.C5A.5AC9.C5.3A2.C2A$6A3.C9.C5A.5AC9.C10.C3A$
5A.2BC9.C5A.5AC9.C10.C4A$4A.B.B9.C5A.5AC9.C10.C5A$3A.2B10.C5A.5AC9.C
10.C6A$2A.2B3.B3.A2.C5A.5AC9.C10.C.6A$A.2B4.2B.2A.C5A.5AC9.C10.C2.6A$
.B5.2B.3AC5A.5AC9.C10.C4.5A$6.2B.15AC9.C10.C6.4A$3.4B.15AC9.C10.C10.C
$5.B.4A2.9AC9.C10.C10.C$.B2.B.4A2.9AC9.C10.C10.C$.B3.4A3.8AC9.C10.C
10.C.A$2B3.4A3.7AC9.C10.C10.C$B3.B.4A2.10A6.C10.C10.C3.A$.B3.B.4A.11A
4.C10.C10.C3.3A$A.B3.B.4A4.8A2.C10.C10.C4.3A$2A.B3.B.4A3.3A.4A.C4A6.C
10.C5.3A$3A.B3.B.4A2.A.6AC6A4.C10.C7.2A$4A.B3.B.4A.16A2.C10.C9.A$5A.
5B.8A2.10A.C10.C10.C$6A4.2B.6A.2B.9AC4A6.C2A8.CA$2A.3A4.B.B.4A.B2.B.
11A.A5.C5A5.C.A$6A4.B.B.3A.2B2.2B.13A3.C7A3.C2.A$5A.B4.B.4A2.B3.2B.5A
3.4A.AC10AC3.A!
shouldsee
 
Posts: 406
Joined: April 8th, 2016, 8:29 am

Re: 3-state life-based rules with mobile birth forcers

Postby shouldsee » April 15th, 2016, 5:23 am

Since there seem not to be a screening script I can use in this rule, I made up this "LeftSearchv01" based on the movement of the left line in a rectangular torus. For I am a rookie in programming and in python, this code contains lots of IF's and probably require further optimisation. Nevertheless it's capable of detecting line oscillation with p2 or p1.

Possible improvements:
1.Downstream canonising can be added in the future.
2.detection of p3,p4 oscillation and bigger periods.
3. storage of original soup

LeftSearch.py
import golly as g
from glife import rect, pattern,validint
import time
import math
import random
from time import time

debug=0

#For some reason this function always returns a warning. Thus I have to expand it in full every time.
def savepattern(cellist,ptn,attr):
   filename=g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+ attr
   filename=g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+'_p2'+'_medium'
   try:
      g.store(celllist,filename)
   except:
      g.warn('can\'t write pattern file to file:\n' + filename)
   
def randfill(rectcoords, amt):
   newstate = g.getoption("drawingstate")
   for i in range(rectcoords[0],rectcoords[0]+rectcoords[2]):
      for j in range(rectcoords[1],rectcoords[1]+rectcoords[3]):
         if(100*random.random()<amt):
            g.setcell(i, j, newstate)
         else:
            g.setcell(i, j, 0)
         
def savegen(filename, gen):
    try:
        f = open(filename, 'w')
        f.write(gen)
        f.close()
    except:
        g.warn("Unable to save given gen in file:\n" + filename)
      
def fit_if_not_visible():
    try:
        r = rect(g.getrect())
        if (not r.empty) and (not r.visible()): g.fit()
    except:
        # getrect failed because pattern is too big
        g.fit()

layername = "LeftSearch"
poplayer = -1
newlayer=g.getstring("Avoid overwritting layer with same name? (y/n)",'y',)=='y'
if newlayer:
   poplayer = -1
else:
   for i in xrange(g.numlayers()):
      if g.getname(i) == layername:
         poplayer = i
         break
if poplayer == -1 and g.numlayers() == g.maxlayers():
   g.show('You need to delete a layer')
   g.exit()
if poplayer == -1:
   poplayer = g.addlayer()
else:
   g.setlayer(poplayer)

g.new(layername)

#load a torus with rightside sealed
wd=int(g.getstring('width of the torus?','200'))
ht=int(g.getstring('height of the torus?','100'))
g.setrule('flashbf7a'+':T'+str(wd)+','+str(ht))
left = -int(wd/2)
top = -int(ht/2)   
right=left+wd-1
g.update()
for j in range(top,top+ht):
   g.setcell(right,j,3)

soupnum=int(g.getstring('How many soups to screen?','100'))
swd=int(g.getstring('Soup width','20'))
sht=int(g.getstring('Soup weight','20'))
sgap=int(g.getstring('Gap between soup and seal','10'))
amt=int(g.getstring('Random fill density in pecentage','40',))
thres=int(g.getstring('Threshold Period?','20'))
trimwidth=5
trimthres=100

soupsel=[right-swd-sgap,-int(sht/2),swd,sht]
#read pattern number from last time
try:
   INIFileName = g.getdir("data") + "ptn.ini"
   f = open(INIFileName, 'r')
   ptn = f.readline()
   f.close()
   if not validint(ptn):
      ptn = 0
   else:
      ptn = int(ptn)
except:
# should only happen 1st time (ptn.ini doesn't exist)
   pass

#initiate first soup
randfill(soupsel,amt)
i=0
scount=1
active=int(0)
if debug:
   g.note(g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+'_p2'+'_medium')
leftlist = [int(g.getrect()[0]) ] # should be leftlist
genlist = [ int(g.getgen()) ]
p1=[int(0)]
p2=[int(0),0]
p3=[int(0),0,0]
p4=[int(0),0,0,0]
p5=[int(0),0,0,0,0]
Ileftlist=[int(0)]
poplist=[int(g.getpop())]
oldsecs = 0
helpmsg='press q to quit'
while scount<=soupnum:
   i=i+1 # We are adding the (i+1)th elements to lists
   g.step()
   left=int(g.getrect()[0])
   Ileft=left-leftlist[i-1]
   Ileftlist.append(Ileft)
   leftlist.append( left )
   genlist.append( int(g.getgen()) )
   poplist.append(int(g.getpop()))
   
   newsecs = time()
   if newsecs - oldsecs >= 1.0: # show pattern every second
      oldsecs = newsecs
      fit_if_not_visible()
      g.update()   
      g.show("Step %i of %i. Next pattern will be number %i, press q to quit" % (scount, soupnum,ptn))
   
   if i==0:
      continue
   p1temp = (Ileft == Ileftlist[i-1])
   p1.append((p1[i-1]+int(p1temp))*int(p1temp))
   if i==1:
      continue
   p2temp = (Ileft == Ileftlist[i-2])
   p2.append((p2[i-2]+int(p2temp and not p1temp))*int(p2temp))
   if i==2:
      continue
   p3temp= (Ileft == Ileftlist[i-3])
   p3.append((p3[i-3]+int(p3temp and not p1temp))*int(p3temp))
   #   p3.append(p3[i-3]+1)
   #else:
   #   p3.append(0)
   if i==3:
      continue
   p4temp= (Ileft == Ileftlist[i-4])
   p4.append((p4[i-4]+int(p4temp and not (p1temp or p2temp) ) )*int(p4temp))
   #   p4.append(p4[i-4]+1)
   #else:
   #   p4.append(0)
   if i==5:
      continue
   p5temp= Ileft == Ileftlist[i-5]
   p5.append((p5[i-5]+int(p5temp and not p1temp)* int(p5temp)))
   #   p5.append(p5[i-5]+1)
   #else:
   #   p5.append(0)
   
   # Pre-save primitive pattern
   if active == 0:
      if p1[i] == 10:
         pttemp=g.getcells(g.getrect())
         active = 1
      if p2[i] == 10:
         pttemp=g.getcells(g.getrect())
         active = 2

   # if p3>=10 && active=!3':
      # dpl.append(str(ptn)+' '+str(max(dp2,dp3)))
      # savepattern(ptn)
      # ptn=ptn+1
      # active=3
   if active == 2:
      if p2[i] == 0:
         active=0
      elif p2[i]==thres:
         active=20
   if active == 20:
      if p2[i]==0:
         if (Ileftlist[i-3]+Ileftlist[i-2])==0:
            cat='_still'
         else:
            cat='_move'
         g.store(pttemp,g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+'_p2'+cat)
         #savepattern(pttemp,ptn,'_p2'+cat)
         ptn=ptn+1
         active=0
      if p2[i]==200:
         if (Ileftlist[i-3]+Ileftlist[i-2])==0:
            cat='_still'
         else:
            cat='_move'      
         trimsel=g.getrect()
         trimsel[2]=trimwidth
         g.store(g.getcells(trimsel),g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+'_p2'+cat+'Trim')
         #savepattern(trimsel,ptn,'_p2'+cat+'_trim')
         g.select(trimsel)
         g.clear(0)
         ptn=ptn+1
         active=0

   if active == 1:
      if p1[i] == 0:
         active=0
      elif p1[i]==thres:
         active=10
   if active == 10:
      if p1[i]==0:
         if (Ileftlist[i-3]+Ileftlist[i-2])==0:
            cat='_still'
         else:
            cat='_move'
         g.store(pttemp,g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+'_p1'+cat)
         #savepattern(pttemp,ptn,'_p1'+cat)
         ptn=ptn+1
         active=0
      if p1[i]==200:
         if (Ileftlist[i-3]+Ileftlist[i-2])==0:
            cat='_still'
         else:
            cat='_move'      
         trimsel=g.getrect()
         trimsel[2]=trimwidth
         g.store(g.getcells(trimsel),g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+'_p1'+cat+'Trim')
         #savepattern(trimsel,ptn,'_p1'+cat+'_trim')
         g.select(trimsel)
         g.clear(0)
         ptn=ptn+1
         active=0
   

   if  left==1:
      scount=scount+1
      g.reset()
      randfill(soupsel,amt)
      leftlist = [int(g.getrect()[0]) ] # should be leftlist
      genlist = [ int(g.getgen()) ]
      p1=[int(0)]
      p2=[int(0),0]
      p3=[int(0),0,0]
      p4=[int(0),0,0,0]
      p5=[int(0),0,0,0,0]
      Ileftlist=[int(0)]
      poplist=[int(g.getpop())]
      i=0
   
   event = g.getevent()
   if event.startswith("key"):
      evt, ch, mods = event.split()
      if ch == "q":
         break


try:
   f = open(g.getdir('data')+'ptn.ini','w')
   f.write(str(ptn))
   f.close()
except:
   g.warn('bug')
#gen=5
#GotoINIFileName = g.getdir("data") + "goto.ini"
#savegen(GotoINIFileName, gen)


Before I generate this script, I hacked pop-plot.py to visualise the line movement called 'left-plot.py'

left-plot.py
# Run the current pattern for a given number of steps (using current
# step size) and create a plot of population vs time in separate layer.
# Author: Andrew Trevorrow (andrew@trevorrow.com), May 2007.
#!/usr/bin/python
import golly as g
from glife import getminbox, rect, rccw
from glife.text import make_text
from time import time

# --------------------------------------------------------------------

# size of plot
xlen = 500        # length of x axis
ylen = 500        # length of y axis

# --------------------------------------------------------------------

# draw a line of cells from x1,y1 to x2,y2 using Bresenham's algorithm
def draw_line(x1, y1, x2, y2):
    g.setcell(x1, y1, 1)
    if x1 == x2 and y1 == y2: return

    dx = x2 - x1
    ax = abs(dx) * 2
    sx = 1
    if dx < 0: sx = -1
    dy = y2 - y1
    ay = abs(dy) * 2
    sy = 1
    if dy < 0: sy = -1

    if ax > ay:
        d = ay - (ax / 2)
        while x1 != x2:
            g.setcell(x1, y1, 1)
            if d >= 0:
                y1 += sy
                d -= ax
            x1 += sx
            d += ay
    else:
        d = ax - (ay / 2)
        while y1 != y2:
            g.setcell(x1, y1, 1)
            if d >= 0:
                x1 += sx
                d -= ay
            y1 += sy
            d += ax

    g.setcell(x2, y2, 1)

# --------------------------------------------------------------------

# fit pattern in viewport if not empty and not completely visible
def fit_if_not_visible():
    try:
        r = rect(g.getrect())
        if (not r.empty) and (not r.visible()): g.fit()
    except:
        # getrect failed because pattern is too big
        g.fit()

# --------------------------------------------------------------------

if g.empty(): g.exit("There is no pattern.")

# Define a replacement for switch()
class switch(object):
    value = None
    def __new__(class_, value):
        class_.value = value
        return True

def case(*args):
    return any((arg == switch.value for arg in args))
# check that a layer is available for population plot
layername = "population plot"
poplayer = -1
newlayer=(g.getstring("Create a new layer? (1 for True)",'1',)=='1')
if newlayer:
   poplayer = -1
else:
   for i in xrange(g.numlayers()):
      if g.getname(i) == layername:
         poplayer = i
         break
if poplayer == -1 and g.numlayers() == g.maxlayers():
    g.exit("You need to delete a layer.")

   
   
# prompt user for number of steps
numsteps = xlen
s = g.getstring("Enter the number of steps:",
                str(numsteps), "Population plotter")
if len(s) > 0: numsteps = int(s)
if numsteps <= 0: g.exit()
plotnum=int(g.getstring('How many plots?','1',))
# generate pattern for given number of steps
leftlist = [int(g.getrect()[0]) ] # should be leftlist
genlist = [ int(g.getgen()) ]
p1=[int(0)]
p2=[int(0),0]
p3=[int(0),0,0]
p4=[int(0),0,0,0]
p5=[int(0),0,0,0,0]
Ileftlist=[int(0)]
poplist=[int(g.getpop())]
oldsecs = time()
for i in xrange(numsteps):
   i=i+1 # We are adding the (i+1)th elements to lists
   g.step()
   left=int(g.getrect()[0])
   Ileft=left-leftlist[i-1]
   Ileftlist.append(Ileft)
   leftlist.append( left )
   genlist.append( int(g.getgen()) )
   poplist.append(int(g.getpop()))

   newsecs = time()
   if newsecs - oldsecs >= 1.0: # show pattern every second
      oldsecs = newsecs
      fit_if_not_visible()
      g.update()   
      g.show("Step %i of %i" % (i+1, numsteps))
   
   if i==0:
      continue
   p1temp = (Ileft == Ileftlist[i-1])
   p1.append((p1[i-1]+int(p1temp))*int(p1temp))
   if i==1:
      continue
   p2temp = (Ileft == Ileftlist[i-2])
   p2.append((p2[i-2]+int(p2temp and not p1temp))*int(p2temp))
   if i==2:
      continue
   p3temp= (Ileft == Ileftlist[i-3])
   p3.append((p3[i-3]+int(p3temp and not p1temp))*int(p3temp))
   #   p3.append(p3[i-3]+1)
   #else:
   #   p3.append(0)
   if i==3:
      continue
   p4temp= (Ileft == Ileftlist[i-4])
   p4.append((p4[i-4]+int(p4temp and not (p1temp or p2temp) ) )*int(p4temp))
   #   p4.append(p4[i-4]+1)
   #else:
   #   p4.append(0)
   if i==5:
      continue
   p5temp= Ileft == Ileftlist[i-5]
   p5.append((p5[i-5]+int(p5temp and not p1temp)* int(p5temp)))   #   p5.append(p5[i-5]+1)
   #else:
   #   p5.append(0)
   dp2=p2[i-1]-p2[i]
   if dp2>=10:
      g.save
   
   
   
for i in xrange(len(p1)):
   p2[i]=p2[i]-p1[1]

   
# ylist=genlist
# x=as.name
n=1
while n<=plotnum:
   yname=g.getstring("Plot No."+str(n)+", What list to plot? e.g.: leftlist(position of the leftmost), Ileftlist(increment to the left), p1(up to p4)","Ileftlist",)
   # dict={'Ileftlist':Ileftlist}
   if yname=='Ileftlist':
      ylist=Ileftlist
   elif yname=='leftlist':
      ylist=leftlist
   elif yname=='p1':
      ylist=p1
   elif yname=='p2':
      ylist=p2
   elif yname=='p3':
      ylist=p3
   elif yname=='p4':
      ylist=p4
   elif yname=='p5':
      ylist=p5
   else:
      ylist=poplist
      
   # Ileftlist=[j-i for i, j in zip(leftlist[:-1], leftlist[1:])]
   # Ileftlist.append(0)
   fit_if_not_visible()
   # save some info before we switch layers
   stepsize = "%i^%i" % (g.getbase(), g.getstep())
   pattname = g.getname()
   # create population plot in separate layer
   g.setoption("stacklayers", 0)
   g.setoption("tilelayers", 0)
   g.setoption("showlayerbar", 1)
   # debug use g.note(str(poplayer))
   
   if poplayer == -1:
      poplayer = g.addlayer()
   else:
      g.setlayer(poplayer)
   layername=yname+' plot'
   g.new(layername)

   # use same rule but without any suffix (we don't want a bounded grid)
   g.setrule(g.getrule().split(":")[0])

   deadr, deadg, deadb = g.getcolor("deadcells")
   if (deadr + deadg + deadb) / 3 > 128:
      # use black if light background
      g.setcolors([1,0,0,0])
   else:
      # use white if dark background
      g.setcolors([1,255,255,255])

   minpop = min(ylist)
   maxpop = max(ylist)
   if minpop == maxpop:
      # avoid division by zero
      minpop -= 1
   popscale = float(maxpop - minpop) / float(ylen)

   mingen = min(genlist)
   maxgen = max(genlist)
   genscale = float(maxgen - mingen) / float(xlen)

   # draw axes with origin at 0,0
   draw_line(0, 0, xlen, 0)
   draw_line(0, 0, 0, -ylen)

   # add annotation using mono-spaced ASCII font
   t = make_text(pattname.upper(), "mono")
   bbox = getminbox(t)
   t.put((xlen - bbox.wd) / 2, -ylen - 10 - bbox.ht)

   t = make_text(yname, "mono")
   bbox = getminbox(t)
   t.put(-10 - bbox.ht, -(ylen - bbox.wd) / 2, rccw)

   t = make_text(str(minpop), "mono")
   bbox = getminbox(t)
   t.put(-bbox.wd - 10, -bbox.ht / 2)

   t = make_text(str(maxpop), "mono")
   bbox = getminbox(t)
   t.put(-bbox.wd - 10, -ylen - bbox.ht / 2)

   t = make_text("GENERATION (step=%s)" % stepsize, "mono")
   bbox = getminbox(t)
   t.put((xlen - bbox.wd) / 2, 10)

   t = make_text(str(mingen), "mono")
   bbox = getminbox(t)
   t.put(-bbox.wd / 2, 10)

   t = make_text(str(maxgen), "mono")
   bbox = getminbox(t)
   t.put(xlen - bbox.wd / 2, 10)

   # display result at scale 1:1
   g.fit()
   g.setmag(0)
   g.show("")

   # plot the data (do last because it could take a while if numsteps is huge)
   x = int(float(genlist[0] - mingen) / genscale)
   y = int(float(ylist[0] - minpop) / popscale)
   oldsecs = time()
   for i in xrange(numsteps):
      newx = int(float(genlist[i+1] - mingen) / genscale)
      newy = int(float(ylist[i+1] - minpop) / popscale)
      draw_line(x, -y, newx, -newy)
      x = newx
      y = newy
      newsecs = time()
      if newsecs - oldsecs >= 1.0:     # update plot every second
         oldsecs = newsecs
         g.update()
   
   # for unknown reason poplayer change value in the loop, so reset
   if newlayer: poplayer=-1
   n=n+1


Any advice is welcome.

PS: I am not sure which post is the best to share this script.
shouldsee
 
Posts: 406
Joined: April 8th, 2016, 8:29 am

Re: 3-state life-based rules with mobile birth forcers

Postby shouldsee » April 15th, 2016, 11:32 pm

Updated to detect more periods (1,2,4)

LifeSearchv02.py
import golly as g
from glife import rect, pattern,validint
import time
import math
import random
from time import time

debug=0

#For some reason this function always returns a warning. Thus I have to expand it in full every time.
def savepattern(cellist,ptn,attr):
   filename=g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+ attr
   filename=g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+'_p2'+'_medium'
   try:
      g.store(celllist,filename)
   except:
      g.warn('can\'t write pattern file to file:\n' + filename)
   
def randfill(rectcoords, amt):
   newstate = g.getoption("drawingstate")
   for i in range(rectcoords[0],rectcoords[0]+rectcoords[2]):
      for j in range(rectcoords[1],rectcoords[1]+rectcoords[3]):
         if(100*random.random()<amt):
            g.setcell(i, j, newstate)
         else:
            g.setcell(i, j, 0)
         
def savegen(filename, gen):
    try:
        f = open(filename, 'w')
        f.write(gen)
        f.close()
    except:
        g.warn("Unable to save given gen in file:\n" + filename)
      
def fit_if_not_visible():
    try:
        r = rect(g.getrect())
        if (not r.empty) and (not r.visible()): g.fit()
    except:
        # getrect failed because pattern is too big
        g.fit()

layername = "LeftSearch"
poplayer = -1
newlayer=g.getstring("Avoid overwritting layer with same name? (y/n)",'y',)=='y'
if newlayer:
   poplayer = -1
else:
   for i in xrange(g.numlayers()):
      if g.getname(i) == layername:
         poplayer = i
         break
if poplayer == -1 and g.numlayers() == g.maxlayers():
   g.show('You need to delete a layer')
   g.exit()
if poplayer == -1:
   poplayer = g.addlayer()
else:
   g.setlayer(poplayer)

g.new(layername)

#load a torus with rightside sealed
wd=int(g.getstring('width of the torus?','200'))
ht=int(g.getstring('height of the torus?','100'))
g.setrule('flashbf7a'+':T'+str(wd)+','+str(ht))
left = -int(wd/2)
top = -int(ht/2)   
right=left+wd-1
g.update()
for j in range(top,top+ht):
   g.setcell(right,j,3)

soupnum=int(g.getstring('How many soups to screen?','100'))
pnum=int(g.getstring('Upper limit for period?','16'))
thres=int(g.getstring('Threshold Period?','50'))
abandon=int(g.getstring('Longest time before a stable leftline is trimmed','75'))

amt=int(g.getstring('Random fill density in pecentage','40',))
swd=int(g.getstring('Soup width','20'))
sht=int(g.getstring('Soup weight','20'))
sgap=int(g.getstring('Gap between soup and seal','10'))
trimwidth=10
trimthres=100

soupsel=[right-swd-sgap,-int(sht/2),swd,sht]
#read pattern number from last time
try:
   INIFileName = g.getdir("data") + "ptn.ini"
   f = open(INIFileName, 'r')
   ptn = f.readline()
   f.close()
   if not validint(ptn):
      ptn = 0
   else:
      ptn = int(ptn)
except:
# should only happen 1st time (ptn.ini doesn't exist)
   pass

#initiate first soup
randfill(soupsel,amt)



if debug:
   g.note(g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+'_p2'+'_medium')
leftlist = [int(g.getrect()[0]) ] # should be leftlist
genlist = [ int(g.getgen()) ]
Ileftlist=[int(0)]
poplist=[int(g.getpop())]
oldsecs = 0
helpmsg='press q to quit'
llim=left
left=g.getrect()[0]
souptemp=g.getcells(soupsel)
pj=[0 for j in xrange(pnum+1)]
pjold=[0 for j in xrange(pnum+1)]

period=0
save=0
i=0
scount=1
while scount<=soupnum:
   i=i+1 # We are adding the (i+1)th elements to lists
   g.run(1)
   poplist.append(int(g.getpop()))

   left=int(g.getrect()[0])
   leftlist.append( left )
   Ileft=left-leftlist[i-1]
   Ileftlist.append(Ileft)
   genlist.append( int(g.getgen()) )
   pjold=pj[:]   
   newsecs = time()
   if newsecs - oldsecs >= 1.0: # show pattern every second
      oldsecs = newsecs
      fit_if_not_visible()
      g.update()   
      g.show("Soup %i of %i. Next pattern will be number %i, press q to quit,period = %i" % (scount, soupnum,ptn,period))

   for j in range(pnum):
      j=j+1
      if i>=j:
         pjtemp=(Ileftlist[i]==Ileftlist[i-j])
      else:
         pjtemp=0
      pj[j]=(pj[j]+int(pjtemp))*int(pjtemp)
      
   threstemp=6
   # threstemp=thres
   for j in range(pnum+1):
      j=pnum-(j+1)
      if pj[j]!=0:
         threstemp=max(j,6)
         # threstemp=30
         break   
   if period==0:
      if max(pj)>=threstemp:
         pttemp=g.getcells(g.getrect())
         period=pj.index(max(pj))
      

   else:
      if pj[period]==0:
         if save==1 :
            if sum(Ileftlist[(i-1-period):(i-1)])==0:
               cat='_still'
            else:
               cat='_move'
            g.store(pttemp,g.getdir('patterns')+ 'LeftSearch\ptn%i_p%i_r%i'%(ptn,period,pjold[period])+cat)
            g.store(souptemp,g.getdir('patterns')+ 'LeftSearch\soup%i_p%i_r%i'%(ptn,period,pjold[period])+cat)
            ptn=ptn+1
            try:
               f = open(g.getdir('data')+'ptn.ini','w')
               f.write(str(ptn))
               f.close()
            except:
               g.warn('bug')            
            save=0
         period=0      
      elif pj[period]==thres:
         save=1
      elif pj[period]==abandon:
         if sum(Ileftlist[(i-period):i])==0:
            cat='_still'
         else:
            cat='_move'
         trimsel=g.getrect()
         trimsel[2]=min(trimsel[2],trimwidth)
         g.store(g.getcells(trimsel),g.getdir('patterns')+ 'LeftSearch\ptn%i_p%i_r%i'%(ptn,period,abandon)+cat+'Trim')
         g.store(souptemp,g.getdir('patterns')+ 'LeftSearch\soup%i_p%i_r%i'%(ptn,period,abandon)+cat)
         g.store(pttemp,g.getdir('patterns')+ 'LeftSearch\ptn%i_p%i_r%i'%(ptn,period,pjold[period])+cat+'Untrim')
         
         ptn=ptn+1
         try:
            f = open(g.getdir('data')+'ptn.ini','w')
            f.write(str(ptn))
            f.close()
         except:
            g.warn('bug')            
         #savepattern(trimsel,ptn,'_p2'+cat+'_trim')
         g.select(trimsel)
         g.clear(0)
         period=0
         save=0

         

   #reset if finished   
   if poplist[i]==ht or left==llim:
      scount=scount+1
      g.reset()
      randfill(soupsel,amt)
      souptemp=g.getcells(soupsel)
      leftlist = [int(g.getrect()[0]) ] # should be leftlist
      genlist = [ int(g.getgen()) ]
      Ileftlist=[int(0)]
      poplist=[int(g.getpop())]
      i=0
      continue
   event = g.getevent()
   if event.startswith("key"):
      evt, ch, mods = event.split()
      if ch == "q":
         break


#check whether finish

#gen=5
#GotoINIFileName = g.getdir("data") + "goto.ini"
#savegen(GotoINIFileName, gen)


Samples detected:

1.primitive diagonal spaceships
x = 277, y = 21, rule = flashbf7a
270.A$233.A35.2A$232.2A34.4A$99.A131.4A32.3A.A$98.2A130.3A.A33.5A$97.
4A130.5A35.4A$39.2A55.3A.A85.A46.2A36.3A.A$38.A34.A23.5A83.3A45.A37.
3A2.A$3.A33.A3.A30.3A24.2A37.A45.4A50.2A35.2A$2.3A32.A.B2.A28.4A24.4A
34.3A43.3A.3A48.3A31.4A$.5A31.A32.3A.A.A23.4A32.4A45.6A.A44.A.3A30.2A
$6A40.A25.3A.A24.4A30.3A.A.A45.A.5A44.3A$2.4A2.A31.A5.A30.2A21.5A32.
3A49.6A$5.A2.A31.A35.A24.4A85.5A$6.3A32.A.B33.3A22.4A33.A2.A49.3A$7.
3A31.2A.2A31.A.A24.2A33.4A$7.3A33.A33.4A23.A35.2A$9.A67.3A164.2A$78.A
113.2A50.2A$192.2A$192.2A!


2. primitive orthogonal spaceships (some manually symmetrisied)
x = 141, y = 1449, rule = flashbf7a
18$44.A$43.2A$42.3A$41.4A$40.5A$41.4A$42.3A$43.2A$44.A15$44.2A$43.A2.
A$43.3A16$49.3A$48.A4.A$47.A.B.B2.A$46.A.B3.B$45.A.B4.2B2.A$44.A.B8.B
2.A$43.A.B10.B$42.A.B5.B2.B3.B$41.A.B6.B4.B$40.A.B6.B.A5.A$39.A.B5.2B
4.B3.A$39.A7.B2.2A3.B$39.A.B5.2B4.B.2B$40.A.B6.B5.B$41.A.B6.B2.B$42.A
.B5.3B2.B$43.A.B8.3B$44.A.B$45.A.B4.3B.B$46.A.B3.B5.A$47.A.B.B2.A$48.
A4.A$49.3A19$48.2A$47.A$46.A.B$45.A.B.B$44.A.B.B$43.A.B.B.B$42.A.B2.
2B$41.A.B3.2B$40.A.B5.B$40.A7.2B$40.A.B5.B$41.A.B3.2B$42.A.B2.2B$43.A
.B.B.B$44.A.B.B$45.A.B.B$46.A.B$47.A$48.2A22$46.2A$45.A$44.A.B$43.A.B
.B$42.A.B.B$41.A.B.B$40.A.B2.B$39.A.B3.B$38.A.B$38.A$38.A.B$39.A.B3.B
$40.A.B2.B$41.A.B.B$42.A.B.B$43.A.B.B$44.A.B$45.A$46.2A22$46.3A$45.A
3.A$44.A.B.B.A$43.A.B3.B.A$42.A.B6.A$41.A.B6.B$40.A.B7.B$39.A.B10.A$
38.A.B11.A$37.A.B4.B2.B4.A$36.A.B4.B5.B.A$35.A.B9.A$34.A.B8.A3.A$34.A
8.B5.A$34.A.B11.B$35.A.B12.A$36.A2.2B2.3B2.B$37.2A5.B2.B$41.A.A$47.A$
44.3A$45.2A.A$47.2A15$49.2A$48.A$47.A.B2.2A.A$46.A.B.B3.A.A$45.A.B.B
2.A$44.A.B.B6.B3.A$43.A.B2.B3.A.B.B2.A$42.A.B3.B2.A6.A$41.A.B6.2A$41.
A8.2A4.B$41.A.B6.A.A2.B.B.A$42.A.B3.B6.B.B.A$43.A.B2.B5.A$44.A.B.B2.
2A$45.A.B.B6.A$46.A.B.B.3B.A$47.A.B4.A$48.A3.2A$49.2A12$54.2A$48.2A2.
2A.B$47.A3.A2.B$47.A.B2.2B$47.A4.B3.B$48.2A$53.A3.B$55.2A7$60.A$60.2A
$55.A.2A2.A$50.2A8.3A$49.A4.B3.A$49.A.B.B4.A3.A$49.A5.2B5.2A$50.2A.A
3.B.A2.3A$55.A3.A$56.2A15$57.2A$54.2A4.2A$50.2A2.A2.A$49.A6.A$49.A.B
3.2A4.A$49.A3.A5.B$50.2A2.A5.A$58.A$55.A.A23$56.2A6.A$54.A7.A3.A$49.
2A8.A4.B$48.A4.B.B5.B4.B$48.A.B.B5.B.B$48.A4.B.B5.B4.B$49.2A8.A4.B$
54.A7.A3.A$56.2A6.A29$71.A.A$72.B.A$70.A2.A$60.A10.A$59.13A$58.3A.8A.
A$59.13A$60.A2.7A$66.A$66.A18$59.2A4.5A$58.A3.A8.A$58.A.B2.2B2.B.2B$
58.A4.B2.B$59.2A9.2A$64.2A.A.A12$68.A7.A$59.A8.5A2.A.A$58.4A.10A3.2A$
57.3A.12A$58.15A$59.A2.5A.A.A$65.2A.3A$65.2A3.2A$70.2A$71.A16$66.A$
65.4A.3A$64.3A.6A$65.9A$66.A2.4A18$79.A$65.A2.3A4.5A$64.8A3.3A.A$63.
3A.6A2.A.A$64.9A$65.A5.3A$71.3A27$70.A4.A$69.8A$68.3A.2A.3A$69.8A$70.
A4.A31$78.3A$73.3A$68.2A7.B3.3B$67.A4.B.B.B$67.A.B.B$67.A4.B.B.B6.B$
68.2A7.B.2B.B$73.3A$78.A.2A2.A27$90.2A.2A.A$89.A7.A$88.A2.B3.A.A.A$
83.A4.A.B2.A5.2A$78.2A4.A4.A3.A7.A$77.A4.B2.A5.A.2A5.BA$77.A.B.B3.A4.
2A7.A.2A$77.A4.B2.A5.A.2A5.BA$78.2A4.A4.A3.A7.A$83.A4.A.B2.A5.2A$88.A
2.B3.A.A.A$89.A7.A$90.2A.2A.A65$88.3A$87.A3.A$86.A.B.B$85.A.B$84.A.B
4.B$83.A.B.3B$82.A.B.B.2B.B.A$81.A.B2.2B.B.B.A$80.A.B3.3B.B.A$79.A.B
8.B$79.A13.A$79.A.B5.B$80.A.B3.B5.2A.A$81.A.B2.B2.A3.A.A$82.A.B.B.A2.
B2.2A$83.A.B.B4.B.A$84.A.B.3B3.A$85.A.B6.A$86.A.B3.B$87.A.B$88.A3.A$
89.2A23$91.A$91.A$84.A3.6A$83.8A.3A$82.3A.5A.3A$83.4A.6A$84.A6.A$91.A
23$90.A.A.A$85.2A5.A$84.A4.B5.B$84.A.B.B3.A3.B$84.A4.B5.B$85.2A5.A$
90.A.A.A23$83.A2.7A$82.7A.A.A$81.3A.8A$82.7A.A.A$83.A2.7A21$82.3A$77.
2A6.A.A7.A$76.A4.B.B4.A.A.A$76.A.B.B5.B2.B4.B3.A$76.A4.B.B5.B.B.B2.B$
77.2A6.A.A6.B3.A$82.3A5.3A$95.A49$57.A2.7A$56.7A.A.A$55.3A.8A$56.7A.A
.A$57.A2.7A39$98.2A$98.2A$95.6A$87.A2.11A$86.7A.6A$85.3A.11A$86.7A.6A
$87.A2.11A$95.6A$98.2A$98.2A42$85.A4.2A$84.4A.A.2A$83.3A.3A.A$84.4A.A
.2A$85.A4.2A29$96.A3.A$93.A5.B$88.2A6.2B2.B$87.A4.B9.A$87.A.B.B10.A$
87.A7.B3.B.A$88.2A.3A2.B$95.A3.A$97.2A34$98.A$94.A3.5A$94.4A.A.2A$86.
A2.15A$85.12A.6A$84.3A.9A.5A$85.8A.7A$86.A5.8A$92.2A.5A43$95.3A$90.2A
6.A$89.A4.B.B$89.A.B.B$89.A4.B.B$90.2A6.A$95.3A24$93.A2.3A$92.8A$91.
3A.5A$92.8A$93.A2.3A48$97.4A$91.A2.4A.4A$90.14A$89.3A.12A$90.14A$91.A
2.4A.4A$97.4A33$96.A2.3A$95.7A$94.3A.4A$95.7A$96.A2.3A39$94.A$90.A.4A
$88.2A.A.4A$82.A2.4A2.5A$81.9A.5A$80.3A.12A$81.15A$82.A5.A.5A$88.A.4A
117$99.A$98.3A$97.4A$96.8A$95.11A$94.12A$93.13A$92.5A.5A.2A$91.5A4.6A
$90.5A5.6A$89.5A6.6A$88.5A7.4A.A$89.5A6.6A$90.5A5.6A$91.5A4.6A$92.5A.
5A.2A$93.13A$94.12A$95.11A$96.8A$97.4A$98.3A$99.A!


3. Oscillators
x = 39, y = 75, rule = flashbf7a
x = 104, y = 99, rule = flashbf7a
2$91.2A$90.4A$89.6A$88.7A$66.2A20.7A$48.2A15.5A19.5A$47.4A14.5A20.3A$
46.5A15.4A$46.5A16.2A$46.4A$47.2A6$13.A81.3A$13.2A79.4A$10.3A.2A50.2A
25.7A$9.5A12.2A18.4A15.4A24.3A.3A$8.6A11.5A15.4A16.4A24.7A$8.6A10.4A.
A15.4A17.2A26.5A$9.4A11.6A16.2A47.3A$10.2A12.6A$25.4A$26.2A6$14.A$15.
A$10.3A$9.5A$7.7A37.3A$10.4A37.4A17.4A$6.A2.B.2A36.6A16.4A$8.B2.A37.
5A17.4A$7.A3.A38.4A18.2A$9.A40.2A12$25.2A46.3A$11.2A11.4A22.A21.5A$
10.4A9.6A20.2A20.4A$9.5A9.6A19.2A.3A17.4A$9.5A9.6A21.5A16.2A$9.5A9.6A
21.5A17.A$9.5A10.4A22.4A$10.4A11.2A24.2A$11.2A6$59.2A$15.A42.4A$15.2A
41.5A$13.5A8.3A16.3A8.3A.3A8.4A6.3A$12.3A.3A6.4A15.4A10.5A7.6A4.5A$
11.6A7.5A15.4A10.4A8.6A4.5A$11.6A7.4A16.3A12.2A10.4A6.3A$10.2A.3A8.3A
$11.4A$12.A7$13.4A$12.5A$11.5A.2A7.4A$11.8A6.5A$11.8A6.6A$11.2A.5A7.
6A$13.5A9.5A$13.4A10.4A!


4.Patterns that dies/stabilises
x = 91, y = 172, rule = flashbf7a
17$20.2A$18.4A$17.2A.2A$18.4A23$21.2A$21.A.A$22.2A$20.2A$20.A.A$20.2A
$22.2A$21.A.A$21.2A30$25.2A$24.5A$24.6A$24.2A.A$25.A19$32.2A$31.4A$
31.4A$30.5A$31.3A$31.A.A18$24.2A$23.4A$22.5A$23.5A$24.3A$25.2A!


5.Methuselahs
x = 179, y = 150, rule = flashbf7a
2.2A$.A2.A$A.B.A$.A2.A$.3A2$161.3A3$110.3A$66.2A36.2A4.4A39.4A$64.2A
2.A34.A2.A3.4A38.7A$64.A2.3A33.A2.A3.4A38.8A$64.A4.A33.2A.2A2.4A37.6A
.A.A3.A$65.5A35.2A3.3A38.3A4.A6.A$67.2A83.2A9.B$158.A8.A$157.A7.B2.A$
157.A2.A2.A2.B$158.A.A6.A4$3.2A$2.A2.A$.A.B.A$2.A2.A$2.3A$29.A$28.A2.
A$28.A.A$28.3A12$65.A$70.2A36.2A$68.2A.2A34.A.A6.A$68.A2.A34.2A.A2.A$
68.A2.A35.2A3.A3.A$69.2A37.A4.A.A$114.A18$7.A$6.A155.2A$5.2A158.A.A$
6.2A152.A6.A$7.A151.A5.A2.A$165.3A3.A$158.A5.A2.A4.2A$172.2A$165.A5.A
$159.B4.B.A$157.2A.2A2.B$116.2A41.A.A3.B.A$115.A2.A40.2A.A3.A$116.A.A
40.2A.A.2A$105.2A10.A41.2A$104.A.A4.A$104.A5.2A.A$104.3A3.3A$110.A.A
58.2A$65.2A44.2A57.4A$64.A46.2A57.4A$63.A2.B45.A58.2A$64.2A21$3.A$2.A
.A3.A$.A6.A$2.A.A.A.A$3.A13$118.A$117.A.A$112.A3.2A2.2A$110.4A3.2A.2A
$109.A.6A.A.2A$108.2A2.A3.2A.A$109.4A.B2.A$110.2A4.A5.A$114.2A6.A.A$
122.2A5$176.2A$174.5A$6.A166.A4.A$5.2A166.A2.3A$4.2A61.A105.2A2.A$5.
2A59.2A107.2A$65.A.A$65.A.A$66.A!


6.glider reactions
x = 8, y = 145, rule = flashbf7a
2.A.A$2.2A$3.A16$2A$A.A$A55$3.A$2.A$2.3A5$6.A$5.2A$5.A.A51$.A$.A.A$.
2A5$3.2A$3.A.A$3.A!
Last edited by shouldsee on April 17th, 2016, 11:22 pm, edited 1 time in total.
shouldsee
 
Posts: 406
Joined: April 8th, 2016, 8:29 am

Re: 3-state life-based rules with mobile birth forcers

Postby shouldsee » April 17th, 2016, 11:18 pm

This version pre-screen a soup to discard explosive ones to save calculation power.
But it seemingly rarely discovers any moving object.

To compensate, I modified v02 to identify clean spaceships.

Oscillators in last post updated.

LeftSearchv05.py
from glife import rect, pattern,validint
from collections import Counter
import golly as g
import random
from glife import getminbox, rect, rccw
from time import time
import math as m
import csv
import os
debug=0

#output as  category:power:save
def powerlyse(stepsize, numsteps,delaythres=0.2):
   g.setalgo("RuleLoader")
   g.setbase(2)
   g.setstep(stepsize)
   poplist = [0]*numsteps
   poplist[0] = int(g.getpop())
   pointlist = []
   save=1
      

   for i in xrange(1, numsteps, 1):
      oldsecs=time()
      g.step()
      newsecs=time()
      poplist[i] = int(g.getpop()) + poplist[i-1]
      if  (newsecs-oldsecs)> delaythres:
         save=False
         break      
      if (i % 50 == 0):
         g.fit()
         g.update()

      if (i > numsteps/2):
         pointlist.append((m.log(i),m.log(poplist[i]+1.0)))
      oldsecs=newsecs
   if pointlist!=[]:
      power=regress(pointlist)
      if (power < 0.55):
         cat='unidentified'
      elif (power < 0.82):
         cat='REPLICATOR'
      elif (power < 1.02):
         cat='LINEAR'
      elif (power < 1.4 ):
         cat='EXPLOSIVE'
         save=0
      else:
         cat='QUADRATIC'
         save=0
      return "%s:%f:%i"%(cat,power,save)
   else:
      return'unidentified:0:0'

def leftlyse(stepsize,stepnum,thres=20,pnum=20,orient=2):
   if g.empty():
      return '0:0:0:0'
   left=g.getrect()[orient]
   pj=[0 for j in xrange(pnum+1)]
   pjold=[0 for j in xrange(pnum+1)]
   g.setbase(2)
   g.setstep(stepsize)
   leftlist=[]
   Ileftlist=[]
   period=0
   oldsecs=time()
   for i in range(stepnum):
      g.run(1)
      left=int(g.getrect()[orient])
      leftlist.append( left )
      if i ==0:
         Ileft=0
      else:
         Ileft=left-leftlist[i-1]
      Ileftlist.append(Ileft)
      
      for j in range(pnum):
         j=j+1
         if i>=j:
            pjtemp=(Ileftlist[i]==Ileftlist[i-j])
         else:
            pjtemp=0
         pj[j]=(pj[j]+int(pjtemp))*int(pjtemp)
   
      threstemp=6
      for j in range(pnum):
         if pj[-(j+1)]!=0:
            threstemp=max(pnum-j,6)
            # threstemp=30
            break   

      if period==0:
         if max(pj)>=threstemp:
            pttemp=g.getcells(g.getrect())
            period=pj.index(max(pj))
      else:
         if (pj[period]==0 and pjold>=thres):
            if sum(Ileftlist[(i-1-period):(i-1)])==0:
               cat='_still'
            else:
               cat='_move'
            return '%s:%i:%i:%i'%(cat,period,pjold[period],1)
      pjold=pj[:]
      event = g.getevent()   
      if event.startswith("key"):
         evt, ch, mods = event.split()
         if ch == "q":
            break
      newsecs=time()
      if newsecs-oldsecs>=1.0:
         g.update()
      oldsecs=newsecs
   return '0:0:0:0'

def regress(pairlist):

    cumx = 0.0
    cumy = 0.0
    cumvar = 0.0
    cumcov = 0.0

    for x,y in pairlist:

        cumx += x
        cumy += y

    cumx = cumx / len(pairlist)
    cumy = cumy / len(pairlist)

    for x,y in pairlist:

        cumvar += (x - cumx)*(x - cumx)
        cumcov += (x - cumx)*(y - cumy)
   try:
      return (cumcov / cumvar)
   except:
      return 100

def randfill(rectcoords, amt):
   newstate = g.getoption("drawingstate")
   for i in range(rectcoords[0],rectcoords[0]+rectcoords[2]):
      for j in range(rectcoords[1],rectcoords[1]+rectcoords[3]):
         if(100*random.random()<amt):
            g.setcell(i, j, newstate)
         else:
            g.setcell(i, j, 0)

def draw_line(x1, y1, x2, y2):
    g.setcell(x1, y1, 1)
    if x1 == x2 and y1 == y2: return

    dx = x2 - x1
    ax = abs(dx) * 2
    sx = 1
    if dx < 0: sx = -1
    dy = y2 - y1
    ay = abs(dy) * 2
    sy = 1
    if dy < 0: sy = -1

    if ax > ay:
        d = ay - (ax / 2)
        while x1 != x2:
            g.setcell(x1, y1, 1)
            if d >= 0:
                y1 += sy
                d -= ax
            x1 += sx
            d += ay
    else:
        d = ax - (ay / 2)
        while y1 != y2:
            g.setcell(x1, y1, 1)
            if d >= 0:
                x1 += sx
                d -= ay
            y1 += sy
            d += ax

    g.setcell(x2, y2, 1)

def fit_if_not_visible():
    try:
        r = rect(g.getrect())
        if (not r.empty) and (not r.visible()): g.fit()
    except:
        # getrect failed because pattern is too big
        g.fit()

#For some reason this function always returns a warning. Thus I have to expand it in full every time.
def savepattern(cellist,ptn,attr):
   filename=g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+ attr
   filename=g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+'_p2'+'_medium'
   try:
      g.store(celllist,filename)
   except:
      g.warn('can\'t write pattern file to file:\n' + filename)

def oscillating():
    # return True if the pattern is empty, stable or oscillating

    # first get current pattern's bounding box
    prect = g.getrect()
    pbox = rect(prect)
    if pbox.empty:
        g.show("The pattern is empty.")
        return '1:0'

    # get current pattern and create hash of "normalized" version -- ie. shift
    # its top left corner to 0,0 -- so we can detect spaceships and knightships
    ## currpatt = pattern( g.getcells(prect) )
    ## h = hash( tuple( currpatt(-pbox.left, -pbox.top) ) )

    # use Golly's hash command (3 times faster than above code)
    h = g.hash(prect)

    # check if outer-totalistic rule has B0 but not S8
    rule = g.getrule().split(":")[0]
    hasB0notS8 = rule.startswith("B0") and (rule.find("/") > 1) and not rule.endswith("8")

    # determine where to insert h into hashlist
    pos = 0
    listlen = len(hashlist)
    while pos < listlen:
        if h > hashlist[pos]:
            pos += 1
        elif h < hashlist[pos]:
            # shorten lists and append info below
            del hashlist[pos : listlen]
            del genlist[pos : listlen]
            del poplist[pos : listlen]
            del boxlist[pos : listlen]
            break
        else:
            # h == hashlist[pos] so pattern is probably oscillating, but just in
            # case this is a hash collision we also compare pop count and box size
            if (int(g.getpop()) == poplist[pos]) and \
               (pbox.wd == boxlist[pos].wd) and \
               (pbox.ht == boxlist[pos].ht):
                period = int(g.getgen()) - genlist[pos]

                if hasB0notS8 and (period % 2 > 0) and (pbox == boxlist[pos]):
                    # ignore this hash value because B0-and-not-S8 rules are
                    # emulated by using different rules for odd and even gens,
                    # so it's possible to have identical patterns at gen G and
                    # gen G+p if p is odd
                    return '0:0'

                if period == 1:
                    if pbox == boxlist[pos]:
                        g.show("The pattern is stable.")
                    else:
                        show_spaceship_speed(1, 0, 0)
                elif pbox == boxlist[pos]:
                    g.show("Oscillator detected (period = " + str(period) + ")")
                else:
                    deltax = abs(boxlist[pos].x - pbox.x)
                    deltay = abs(boxlist[pos].y - pbox.y)
                    #show_spaceship_speed(period, deltax, deltay)
                return '1:'+str(period)
            else:
                # look at next matching hash value or insert if no more
                pos += 1

    # store hash/gen/pop/box info at same position in various lists
    hashlist.insert(pos, h)
    genlist.insert(pos, int(g.getgen()))
    poplist.insert(pos, int(g.getpop()))
    boxlist.insert(pos, pbox)

    return '0:0'      
try:
   os.mkdir(g.getdir('patterns')+'LeftSearch')
except:
   pass
layername = "LeftSearch"
poplayer = -1
newlayer=g.getstring("Avoid overwritting layer with same name? (y/n)",'y',)=='y'
if newlayer:
   poplayer = -1
else:
   for i in xrange(g.numlayers()):
      if g.getname(i) == layername:
         poplayer = i
         break
if poplayer == -1 and g.numlayers() == g.maxlayers():
   g.show('You need to delete a layer')
   g.exit()
if poplayer == -1:
   poplayer = g.addlayer()
else:
   g.setlayer(poplayer)

g.new(layername)

# #load a torus with rightside sealed
# if powerlyse==0:
   # wd=int(g.getstring('width of the torus?','200'))
   # ht=int(g.getstring('height of the torus?','100'))
   # g.setrule('flashbf7a'+':T'+str(wd)+','+str(ht))
   # left = -int(wd/2)
   # top = -int(ht/2)   
   # right=left+wd-1
   # g.update()

   # for j in range(top,top+ht):
      # g.setcell(right,j,3)

   
   # soupnum=int(g.getstring('How many soups to screen?','100'))
   # pnum=int(g.getstring('Upper limit for period?','16'))
   # thres=int(g.getstring('Threshold Period?','50'))
   # abandon=int(g.getstring('Longest time before a stable leftline is trimmed','75'))

   # amt=int(g.getstring('Random fill density in pecentage','40',))
   # swd=int(g.getstring('Soup width','20'))
   # sht=int(g.getstring('Soup height','20'))

   # sgap=int(g.getstring('Gap between soup and seal','10'))
   # trimwidth=10
   # trimthres=100



# else:
input=g.getstring('soupwidth/soupheight/soupdensity/period/threshold to detect oscillation/threshold to stop oscillation monitoring/pattern number wish to detect','20/10/60/16/50/75/5000/Y')   
swd=int(input.split('/')[0])
sht=int(input.split('/')[1])
amt=int(input.split('/')[2])
pnum=int(input.split('/')[3])
thres=int(input.split('/')[4])
abandon=int(input.split('/')[5])
soupnum=int(input.split('/')[6])
soupsel=[-int(swd/2),-int(sht/2),swd,sht]

prescreen=g.getstring('Prescreen-powrelyse parameters: stepnum/delay/stepsize, increase delay if you only see soup pattern flashing','200/0.05/1')
stepnum=int(prescreen.split('/')[0])
delaythres=float(prescreen.split('/')[1])
stepsize=int(prescreen.split('/')[2])

#read pattern number from last time
try:
   INIFileName = g.getdir("data") + "ptn.ini"
   f = open(INIFileName, 'r')
   ptn = f.readline()
   f.close()
   if not validint(ptn):
      ptn = 0
   else:
      ptn = int(ptn)
except:
# should only happen 1st time (ptn.ini doesn't exist)
   pass
ptnnew=soupnum+ptn

if debug:
   g.note(g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+'_p2'+'_medium')


while ptn<=ptnnew:
   
   #reset to a soup and save souptemp
   
   g.reset()
   randfill(soupsel,amt)
   souptemp=g.getcells(soupsel)
   g.show('The next pattern will be number %i, press q to quit and save pattern number'%ptn)   
   #screen soups for linear or replicator category
   descriptor1=powerlyse(stepsize,stepnum,delaythres)
   
   if descriptor1.split(':')[2]=='1' and g.empty()==0:
      wdold=g.getrect()[2]
      htold=g.getrect()[3]
      g.run(10)
      wdnew=g.getrect()[2]
      htnew=g.getrect()[3]
      w=wdnew!=wdold
      h=htnew!=htold
      if (w+h)==1:
         if w:
            descriptor2=leftlyse(0,abandon,thres,orient=2)
         if h:
            descriptor2==leftlyse(0,abandon,thres,orient=3)
      if (w+h)==2:
            descriptor2=leftlyse(0,abandon,thres,orient=2)
      if (w+h)==0:
         descriptor2='_still:n:n:1'
   else:
      descriptor2='0:0:0:0'
   if descriptor2.split(':')[3]=='1' :
      if powerlyse(stepsize,200,delaythres).split(':')[2]=='1' :
         cat=descriptor2.split(':')[0]
         round=descriptor2.split(':')[2]
         if cat=='_still'    and round=='n':
            hashlist = []        # for pattern hash values
            genlist = []         # corresponding generation counts
            poplist = []         # corresponding population counts
            boxlist = []         # corresponding bounding boxes
            for i in range(1,100):
               g.run(1)
               osci=oscillating()
               if int(osci.split(':')[0]):
                  period=osci.split(':')[1]
                  break

         else:
            period=descriptor2.split(':')[1]
         pttemp=g.getcells(g.getrect())
         g.store(pttemp,g.getdir('patterns')+ 'LeftSearch\ptn%i_p%s_r%s'%(ptn,period,round)+cat+descriptor1.split(':')[0])
         g.store(souptemp,g.getdir('patterns')+ 'LeftSearch\soup%i_p%s_r%s'%(ptn,period,round)+cat+descriptor1.split(':')[0])
         ptn=ptn+1
   event=g.getevent()
   if event.startswith("key"):
      evt, ch, mods = event.split()
      if ch == "q":
         break      
      if debug:
         g.note('%i %i %i'%(poplist[i],left,llim))

      continue
# We are adding the (i+1)th elements to lists
   


# return '%s:%i:%i:%i'%(cat,period,pjold[period],save)

try:
   f = open(g.getdir('data')+'ptn.ini','w')
   f.write(str(ptn))
   f.close()
except:
   g.warn('bug')

#check whether finish

#gen=5
#GotoINIFileName = g.getdir("data") + "goto.ini"
#savegen(GotoINIFileName, gen)


LeftSearchv02a.py
import golly as g
from glife import rect, pattern,validint
import time
import math as m
import random
from time import time

debug=0

#For some reason this function always returns a warning. Thus I have to expand it in full every time.
def powerlyse(stepsize, numsteps,delaythres=0.2):
   g.setalgo("RuleLoader")
   g.setbase(2)
   g.setstep(stepsize)
   poplist = [0]*numsteps
   poplist[0] = int(g.getpop())
   pointlist = []
   save=1
      

   for i in xrange(1, numsteps, 1):
      oldsecs=time()
      g.step()
      newsecs=time()
      poplist[i] = int(g.getpop()) + poplist[i-1]
      if  (newsecs-oldsecs)> delaythres:
         save=False
         break      
      if (i % 50 == 0):
         g.fit()
         g.update()

      if (i > numsteps/2):
         pointlist.append((m.log(i),m.log(poplist[i]+1.0)))
      oldsecs=newsecs
   if pointlist!=[]:
      power=regress(pointlist)
      if (power < 0.55):
         cat='unidentified'
      elif (power < 0.82):
         cat='REPLICATOR'
      elif (power < 1.02):
         cat='LINEAR'
      elif (power < 1.4 ):
         cat='EXPLOSIVE'
         save=0
      else:
         cat='QUADRATIC'
         save=0
      return "%s:%f:%i"%(cat,power,save)
   else:
      return'unidentified:0:0'

def regress(pairlist):

    cumx = 0.0
    cumy = 0.0
    cumvar = 0.0
    cumcov = 0.0

    for x,y in pairlist:

        cumx += x
        cumy += y

    cumx = cumx / len(pairlist)
    cumy = cumy / len(pairlist)

    for x,y in pairlist:

        cumvar += (x - cumx)*(x - cumx)
        cumcov += (x - cumx)*(y - cumy)
   try:
      return (cumcov / cumvar)
   except:
      return 100

def savepattern(cellist,ptn,attr):
   filename=g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+ attr
   filename=g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+'_p2'+'_medium'
   try:
      g.store(celllist,filename)
   except:
      g.warn('can\'t write pattern file to file:\n' + filename)
   
def randfill(rectcoords, amt):
   newstate = g.getoption("drawingstate")
   for i in range(rectcoords[0],rectcoords[0]+rectcoords[2]):
      for j in range(rectcoords[1],rectcoords[1]+rectcoords[3]):
         if(100*random.random()<amt):
            g.setcell(i, j, newstate)
         else:
            g.setcell(i, j, 0)
         
def savegen(filename, gen):
    try:
        f = open(filename, 'w')
        f.write(gen)
        f.close()
    except:
        g.warn("Unable to save given gen in file:\n" + filename)
      
def fit_if_not_visible():
    try:
        r = rect(g.getrect())
        if (not r.empty) and (not r.visible()): g.fit()
    except:
        # getrect failed because pattern is too big
        g.fit()

layername = "LeftSearch"
poplayer = -1
newlayer=g.getstring("Avoid overwritting layer with same name? (y/n)",'y',)=='y'
if newlayer:
   poplayer = -1
else:
   for i in xrange(g.numlayers()):
      if g.getname(i) == layername:
         poplayer = i
         break
if poplayer == -1 and g.numlayers() == g.maxlayers():
   g.show('You need to delete a layer')
   g.exit()
if poplayer == -1:
   poplayer = g.addlayer()
else:
   g.setlayer(poplayer)

g.new(layername)

#load a torus with rightside sealed
wd=int(g.getstring('width of the torus?','200'))
ht=int(g.getstring('height of the torus?','100'))
g.setrule('flashbf7a'+':T'+str(wd)+','+str(ht))
left = -int(wd/2)
top = -int(ht/2)   
right=left+wd-1
g.update()
for j in range(top,top+ht):
   g.setcell(right,j,3)

sgap=int(g.getstring('Gap between soup and seal','10'))

input=g.getstring('soupwidth/soupheight/soupdensity/period/threshold to detect oscillation/threshold to stop oscillation monitoring/pattern number wish to detect'
               ,'20/10/60/16/50/75/5000/0.1')   
swd=int(input.split('/')[0])
sht=int(input.split('/')[1])
amt=int(input.split('/')[2])
pnum=int(input.split('/')[3])
thres=int(input.split('/')[4])
abandon=int(input.split('/')[5])
soupnum=int(input.split('/')[6])
delay=float(input.split('/')[7])

trimwidth=10
trimthres=100

soupsel=[right-swd-sgap,-int(sht/2),swd,sht]
#read pattern number from last time
try:
   INIFileName = g.getdir("data") + "ptn2a.ini"
   f = open(INIFileName, 'r')
   ptn = f.readline()
   f.close()
   if not validint(ptn):
      ptn = 0
   else:
      ptn = int(ptn)
except:
# should only happen 1st time (ptn2a.ini doesn't exist)
   pass

#initiate first soup

llim=left
randfill(soupsel,amt)



if debug:
   g.note(g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+'_p2'+'_medium')
leftlist = [int(g.getrect()[0]) ] # should be leftlist
genlist = [ int(g.getgen()) ]
Ileftlist=[int(0)]
poplist=[int(g.getpop())]
oldsecs = 0
helpmsg='press q to quit'

left=g.getrect()[0]
souptemp=g.getcells(soupsel)
pj=[0 for j in xrange(pnum+1)]
pjold=[0 for j in xrange(pnum+1)]
period=0
save=0
i=0
scount=1
while scount<=soupnum:
   #reset if finished   
   before=time()
   g.run(2)
   after=time()
   if (poplist[i] in [ht,0]) or leftlist[i]==llim or g.getrect()==[] or (after-before)>=delay:
      scount=scount+1
      g.reset()
      randfill(soupsel,amt)
      souptemp=g.getcells(soupsel)
      leftlist = [int(g.getrect()[0]) ] # should be leftlist
      genlist = [ int(g.getgen()) ]
      Ileftlist=[int(0)]
      poplist=[int(g.getpop())]
      i=0
      if debug:
         g.note('%i %i %i'%(poplist[i],left,llim))

      continue
   i=i+1 # We are adding the (i+1)th elements to lists

   
   poplist.append(int(g.getpop()))
   left=int(g.getrect()[0])
   leftlist.append( left )
   Ileft=left-leftlist[i-1]
   Ileftlist.append(Ileft)
   genlist.append( int(g.getgen()) )
   pjold=pj[:]   
   newsecs = time()
   if newsecs - oldsecs >= 1.0: # show pattern every second
      oldsecs = newsecs
      fit_if_not_visible()
      g.update()   
      g.show("Soup %i of %i. Next pattern will be number %i, press q to quit,period = %i" % (scount, soupnum,ptn,period))

   for j in range(pnum):
      j=j+1
      if i>=j:
         pjtemp=(Ileftlist[i]==Ileftlist[i-j])
      else:
         pjtemp=0
      pj[j]=(pj[j]+int(pjtemp))*int(pjtemp)
      
   threstemp=6
   # threstemp=thres
   for j in range(pnum+1):
      j=pnum-(j+1)
      if pj[j]!=0:
         threstemp=max(j,6)
         # threstemp=30
         break   
   if period==0:
      if max(pj)>=threstemp:
         pttemp=g.getcells(g.getrect())
         period=pj.index(max(pj))
      

   else:
      if pj[period]==0:
         if save==1 :
            if sum(Ileftlist[(i-1-period):(i-1)])==0:
               cat='_still'
            else:
               cat='_move'
            g.store(pttemp,g.getdir('patterns')+ 'LeftSearch\ptn%i_p%i_r%i'%(ptn,period,pjold[period])+cat)
            g.store(souptemp,g.getdir('patterns')+ 'LeftSearch\soup%i_p%i_r%i'%(ptn,period,pjold[period])+cat)
            ptn=ptn+1
            try:
               f = open(g.getdir('data')+'ptn2a.ini','w')
               f.write(str(ptn))
               f.close()
            except:
               g.warn('bug')            
            save=0
         period=0      
      elif pj[period]==thres:
         save=1
      elif pj[period]==abandon:
         if sum(Ileftlist[(i-period):i])==0:
            cat='_still'
         else:
            cat='_move'
         trimsel=g.getrect()
         trimtemp=g.getcells(trimsel)
         g.store(trimtemp,g.getdir('data')+'lsv2temp')
         
         trimsel[2]=min(trimsel[2],trimwidth)
         g.select(trimsel)
         g.clear(1)
         descriptor=powerlyse(1,100,delay)
         if descriptor.split(':')[2]=='1':
            g.store(g.getcells(g.getrect()),g.getdir('patterns')+ 'LeftSearch\ptn%i_p%i_r%i'%(ptn,period,abandon)+cat+'Trim')
            g.store(souptemp,g.getdir('patterns')+ 'LeftSearch\soup%i_p%i_r%i'%(ptn,period,abandon)+cat)
            g.store(pttemp,g.getdir('patterns')+ 'LeftSearch\ptn%i_p%i_r%i'%(ptn,period,pjold[period])+cat+'Untrim')
            ptn=ptn+1
         g.load(g.getdir('data')+'lsv2temp')
         g.select(trimsel)
         g.clear(0)

         try:
            f = open(g.getdir('data')+'ptn2a.ini','w')
            f.write(str(ptn))
            f.close()
         except:
            g.warn('bug')            
         #savepattern(trimsel,ptn,'_p2'+cat+'_trim')
         
         g.select(trimsel)
         g.clear(0)
         period=0
         save=0

         


   event = g.getevent()
   if event.startswith("key"):
      evt, ch, mods = event.split()
      if ch == "q":
         break


#check whether finish

#gen=5
#GotoINIFileName = g.getdir("data") + "goto.ini"
#savegen(GotoINIFileName, gen)
shouldsee
 
Posts: 406
Joined: April 8th, 2016, 8:29 am

Re: 3-state life-based rules with mobile birth forcers

Postby shouldsee » April 18th, 2016, 11:45 pm

LeftSearchv05_sym is modified to search soups with C2 symmetries.

This leads to more oscillators: (Last updated:22/04/2016)

Tip: If you view them at a step of 2^1, they appear to be state2 structures shelled with state1 exterior.
x = 336, y = 1054, rule = flashbf7a
169.2A.A$169.A.2A$173.2A$173.A$174.A$173.2A$169.2A.A16.3A$169.A.2A16.
4A16.3A19.4A$167.2A20.4A15.5A17.6A$167.A22.3A15.5A16.8A$168.A40.3A17.
8A$167.2A61.6A$169.2A.A58.4A$169.A.2A4$209.4A$190.3A15.6A$190.4A14.6A
$190.5A14.4A$191.4A$192.3A12$291.3A$290.5A$191.2A58.2A18.3A15.7A$191.
4A55.4A16.5A14.3A.3A$191.4A55.5A14.6A14.7A$191.2A57.5A14.5A16.5A$167.
2A3.2A78.2A16.3A18.3A$167.2A3.2A2$167.2A3.2A$150.A16.A.A.A.A$148.A3.A
16.A.A59.2A$147.A.B2.A15.2A.A18.A40.2A18.2A38.3A$148.B.B.2A18.2A16.3A
17.A18.6A14.4A37.5A$146.A2.B.4A18.A16.4A16.3A16.6A14.6A16.3A15.7A$
150.5A17.A17.4A16.4A15.6A15.5A15.5A14.3A.3A$147.8A17.2A17.3A16.4A15.
6A15.5A14.7A13.3A.3A$149.5A19.A37.2A18.2A19.2A15.3A.3A13.7A$150.3A19.
A58.2A37.5A15.5A$150.A21.2A98.A18.3A$272.A$231.2A$190.3A37.4A16.3A$
190.4A35.6A14.4A17.4A$190.4A33.3A.2A.3A11.7A14.6A16.4A$192.2A33.10A
11.7A13.8A14.6A$192.A34.10A11.6A14.3A2.3A13.8A$227.3A.2A.3A13.4A15.6A
14.3A2.3A$229.6A15.2A19.2A16.3A2.3A$230.4A37.2A16.8A$231.2A57.6A$291.
4A$170.A2.A$169.A.2A.A85.4A6.4A$170.A2.A76.4A6.4A5.6A$170.A2.A76.4A5.
6A3.8A$169.A.2A.A73.7A4.6A3.8A$170.A2.A74.7A5.4A4.2A4.2A$250.4A7.2A6.
A4.A$250.3A7$169.2A.A$151.2A16.A.2A$131.2A17.A2.A13.2A42.3A$130.A2.A
33.A43.4A$127.3A.2B.3A31.A42.4A13.2A4.2A15.2A$126.5A2.5A12.4A13.2A22.
3A18.2A13.10A13.4A$125.14A9.8A13.2A.A18.4A15.2A15.10A13.4A$125.14A8.
10A12.A.2A16.7A13.3A16.8A12.8A$125.6A2.6A9.8A11.2A4.2A14.3A.3A13.3A
16.3A2.3A11.4A2.4A$126.5A2.5A10.8A11.A5.A15.7A14.2A16.3A2.3A11.4A2.4A
$127.2A6.2A12.6A13.A5.A15.5A17.2A14.8A12.8A$150.4A13.2A4.2A16.3A17.4A
12.10A13.4A$169.2A.A38.4A12.10A13.4A$169.A.2A38.3A14.2A4.2A15.2A3$
192.2A$190.5A$190.6A$189.7A$189.7A$190.5A$191.3A2$150.A2.A$149.A.2B.A
$150.B2.B2$148.A.B2.B.A$146.4A.2B.4A$91.2A55.3A2.3A$89.A3.A53.10A$88.
A.B56.10A$89.B2.B53.12A$87.A3.B.2A51.4A.2A.4A$87.A2.B.3A54.6A$88.A2.
4A55.4A$91.3A57.2A3$169.2A.A$169.A.2A$167.2A4.2A$91.A75.A5.A$72.A16.A
3.A36.2A19.2A15.A5.A$71.A.A14.A.B2.A17.A17.A3.A16.A2.A13.2A4.2A$72.B
16.B.B.2A14.A2.A15.A2.2B.A34.2A.A57.A40.A39.3A$69.3A.3A11.A2.B.4A12.A
.2B.2A15.2B.B14.A.B2.B.A13.A.2A16.A20.3A17.3A19.3A14.3A21.A17.4A$68.
4A.4A14.6A12.2B.5A12.B3.B.A11.2A.B2.B.2A10.2A4.2A14.3A17.4A16.5A17.4A
13.5A18.3A15.8A13.5A$68.4A.4A11.9A14.5A13.B2.B.3A9.4A.2B.4A9.A5.A14.
5A14.8A13.7A14.8A11.6A16.5A14.7A12.8A$69.3A.3A14.7A11.8A12.A.2B.4A9.
5A2.5A10.A5.A12.7A14.7A13.7A15.6A13.6A14.7A13.7A13.5A$72.B18.5A14.5A
14.A2.5A10.4A2.4A10.2A4.2A12.7A14.7A14.6A15.6A14.5A14.8A13.5A$71.A.A
18.4A15.3A17.5A14.A2.A15.2A.A15.5A16.5A16.3A.A16.4A16.3A16.7A14.3A$
72.A21.A37.3A16.2A16.A.2A16.3A18.3A19.2A18.2A17.A21.3A15.A$293.A3$91.
A$89.A3.A56.A2.A$88.A.B2.A55.A.2B.A115.4A$89.B.B.2A55.B2.B115.5A$87.A
2.B.4A172.5A.2A$88.A2.5A52.A.B2.B.A112.8A$89.A.6A50.3A.2B.3A111.8A$
91.4A.2A50.3A2.3A112.2A.5A$91.8A49.8A114.5A$92.7A49.8A114.4A$92.6A51.
6A$94.3A53.4A$94.A28.2A15.2A$108.2A12.A2.A13.A2.A$107.A2.A8.3A.2B.3A
7.3A.2B.3A$104.3A.2B.3A4.5A2.5A5.5A2.5A123.4A$103.5A2.5A2.14A4.12A
122.3A.A$103.5A2.5A2.14A4.12A121.8A$104.3A.2B.3A4.5A2.5A5.5A2.5A121.
4A.A.A$107.A2.A8.3A.2B.3A7.3A.2B.3A122.8A$108.2A12.A2.A13.A2.A125.8A$
123.2A15.2A128.5A$270.4A$168.2A5.2A.A$111.2A19.2A35.A5.A.2A23.A37.2A$
83.4A23.A2.A17.A2.A33.A4.2A4.2A21.A18.2A16.4A$82.6A80.2A3.A5.A20.5A
15.4A15.4A$81.8A21.B2.B17.B2.B39.A5.A18.3A.3A13.6A13.5A$81.8A60.A.2B.
A13.2A3.2A4.2A17.4A.4A12.6A14.5A$66.2A11.12A17.A6.A13.A6.A13.B2.B15.A
3.A5.A18.4A.4A10.A.6A.A13.3A$64.A4.A9.A2.2A2.2A2.A15.3A.B2.B.3A8.4A.B
2.B.4A8.A.B2.B.A12.A5.A5.A17.4A.4A9.A4.2A4.A13.A$65.B2.B12.B2.2B2.B
16.5A.2B.5A6.6A.2B.6A5.3A.B2.B.3A10.2A3.2A4.2A17.4A.4A9.A4.2A4.A13.A$
63.A6.A10.B2.2B2.B15.7A2.7A4.8A2.8A4.4A.2B.4A15.A5.A19.3A.3A11.A.6A.A
13.3A$63.A.B2.B.A8.A2.2A2.2A2.A13.7A2.7A4.8A2.8A6.3A2.3A12.2A4.A5.A
19.5A14.6A14.5A$63.2A.2B.2A8.12A14.5A.2B.5A6.6A.2B.6A7.8A13.A3.2A4.2A
21.A16.6A13.5A$63.3A2.3A10.8A17.3A.B2.B.3A8.4A.B2.B.4A9.6A13.A6.2A.A
23.A17.4A15.4A$63.8A10.8A19.A6.A13.A6.A13.4A14.2A5.A.2A42.2A16.4A$64.
6A12.6A152.2A$65.4A14.4A23.B2.B17.B2.B2$110.A2.A17.A2.A$111.2A19.2A$
151.A$80.2A6.2A59.A2.2A$79.A2.A4.A2.A59.2B.3A$76.3A.B3.2A3.B.3A11.5A
4.5A29.A.B.4A$75.5A.2B4.2B.5A9.4A.A4.A.4A31.5A$74.7A.B4.B.7A5.A3.6A2.
6A3.A27.5A$74.8A.B2.B.8A4.A.B.B.4A4.4A.B.B.A27.3A$75.8A.2B.8A6.B3.B.
2A.B2.B.2A.B3.B$75.9A2.9A6.B3.B.2A.B2.B.2A.B3.B$77.7A2.7A7.A.B.B.4A4.
4A.B.B.A$77.7A2.7A8.A3.6A2.6A3.A$75.9A2.9A9.4A.A4.A.4A$75.8A.2B.8A10.
5A4.5A$74.8A.B2.B.8A$74.7A.B4.B.7A$75.5A.2B4.2B.5A$76.3A.B3.2A3.B.3A$
79.A2.A4.A2.A$80.2A6.2A3$168.2A5.2A.A$169.A5.A.2A$150.A2.A14.A10.2A$
149.A.2B.A13.2A9.A$79.2A8.2A15.2A43.2B27.A$78.4A6.4A14.2A39.A3.2B3.A
11.2A9.2A$77.7A2.7A12.4A40.6B14.A5.2A.A23.2A$77.16A12.4A36.A.2B2.2B2.
2B.A9.A6.A.2A21.6A$75.A.16A.A7.10A13.2A8.2A9.2B.2A2.2A.2B10.2A3.2A25.
6A$36.2A19.10A8.A2.6A2.6A2.A6.12A11.5A4.5A10.8A17.A25.7A$34.A4.A14.A
3.8A3.A7.B.4A.2B.4A.B8.12A10.6A.2A.6A7.12A10.2A4.A24.7A$33.A.B2.B.A
12.A.B.B.6A.B.B.A6.2B.2A.B2.B.2A.2B7.6A2.6A9.7A2.7A8.4A2.4A12.A3.2A
25.4A$34.B4.B14.B3.B.4A.B3.B9.B2.B4.B2.B8.2A.3A.2B.3A.2A8.7A2.7A8.4A
2.4A11.A6.2A.A21.4A$54.B3.B.4A.B3.B6.A16.A4.6A.B2.B.6A7.6A.2A.6A29.2A
5.A.2A$32.A.B4.B.A11.A.B.B.6A.B.B.A5.A16.A4.6A.B2.B.6A8.5A4.5A$30.4A.
B2.B.4A10.A3.8A3.A9.B2.B4.B2.B8.2A.3A.2B.3A.2A10.2A8.2A$29.6A4.6A12.
10A10.2B.2A.B2.B.2A.2B7.6A2.6A$29.7A2.7A32.B.4A.2B.4A.B8.12A$30.5A4.
5A31.A2.6A2.6A2.A6.12A$31.2A8.2A32.A.16A.A7.10A$77.16A12.4A$77.7A2.7A
12.4A$78.4A6.4A14.2A42.4A$79.2A8.2A15.2A15.2A12.2A11.4A$122.5A8.5A8.
8A$121.8A4.8A7.A.A2.A.A$121.20A4.14A$121.20A5.12A$121.8A4.8A4.6A2.6A$
56.10A56.5A8.5A5.5A.2B.5A$53.A3.8A3.A54.2A12.2A7.4A4.4A$52.A.B.B.6A.B
.B.A77.4A2.4A$53.B3.B.4A.B3.B80.A4.A$51.A6.B4.B6.A$51.A6.B4.B6.A$53.B
3.B.4A.B3.B$52.A.B.B.6A.B.B.A$53.A3.8A3.A$56.10A2$168.2A3.2A3.2A$169.
A3.2A3.2A$126.2A8.2A30.A$125.4A6.4A29.2A3.2A3.2A61.2A$40.2A40.4A38.7A
2.7A11.2A20.A.A.A.A21.4A35.A2.A$39.A2.A38.6A19.4A14.7A2.7A9.A4.A13.2A
5.A.A22.6A14.4A15.A4.A$36.4A2.4A34.8A17.6A14.14A11.B2.B15.A4.2A.A21.
8A12.6A13.A6.A15.2A$35.5A2.5A33.8A16.8A14.12A10.A.B2.B.A12.A9.2A19.8A
11.8A11.A8.A12.5A$33.6A.2B.6A28.5A4.5A13.3A2.3A14.5A2.5A9.3A.2B.3A11.
2A9.A20.A.2A.A12.8A10.A4.2A4.A11.6A$31.A4.2A.B2.B.2A4.A7.3A2.3A11.3A
2.B2.B2.3A13.2A.2B.2A16.2A.2B.2A11.4A2.4A21.A21.6A12.7A11.A4.2A4.A11.
6A$32.B2.B2.B4.B2.B2.B7.4A2.4A10.3A2.B2.B2.3A15.B2.B18.2A.2B.2A12.8A
12.2A8.2A38.5A14.A8.A13.5A$32.B2.B2.B4.B2.B2.B7.3A.2B.3A10.5A4.5A15.B
2.B16.5A2.5A12.4A15.A9.A19.2A4.2A12.4A15.A6.A15.4A$31.A4.2A.B2.B.2A4.
A7.A.B2.B.A14.8A16.2A.2B.2A14.12A12.4A14.A9.A20.2A4.2A13.2A17.A4.A$
33.6A.2B.6A31.8A16.3A2.3A13.14A11.A2.A14.2A8.2A60.A2.A$35.5A2.5A34.6A
17.8A12.7A2.7A101.2A$36.4A2.4A36.4A19.6A13.7A2.7A$39.A2.A63.4A15.4A6.
4A$40.2A84.2A8.2A21$150.2A$149.4A$130.2A16.6A14.2A5.2A.A$146.3A.2A.3A
13.A5.A.2A$128.A.2B.A12.10A12.A4.2A$146.10A12.2A3.A$126.A2.B2.B2.A10.
3A.2A.3A18.A26.A$126.3A.2B.3A12.6A14.2A3.2A26.A$126.4A2.4A33.A5.2A.A
21.3A$126.10A32.A6.A.2A21.4A$123.2A.10A.2A8.2A4.2A13.2A3.2A4.2A17.6A$
123.2A.10A.2A8.2A4.2A18.A5.A19.5A$126.10A32.2A4.A5.A18.5A$126.4A2.4A
33.A3.2A4.2A19.4A$126.3A.2B.3A12.6A14.A6.2A.A22.3A$126.A2.B2.B2.A10.
3A.2A.3A12.2A5.A.2A$146.10A$128.A.2B.A12.10A$146.3A.2A.3A$130.2A16.6A
$149.4A$150.2A21$168.2A5.2A.A$126.2A8.2A31.A5.A.2A$125.5A4.5A29.A4.2A
4.2A$124.7A2.7A11.A16.2A3.A5.A$124.16A9.A3.A20.A5.A$125.14A9.A.B2.A
14.2A3.2A4.2A$125.6A2.6A10.B.B.2A14.A5.2A.A24.2A$126.4A.2B.4A9.A2.B.
4A12.A6.A.2A25.2A$126.3A.B2.B.3A13.6A11.2A3.2A4.2A22.2A$126.3A.B2.B.
3A10.9A16.A5.A18.2A$126.4A.2B.4A12.6A12.2A4.A5.A16.2A$125.6A2.6A11.6A
13.A3.2A4.2A17.2A$125.14A12.4A13.A6.2A.A$124.16A12.3A13.2A5.A.2A$124.
7A2.7A$125.5A4.5A$126.2A8.2A2$111.2A$110.A2.A2$110.B2.B$86.2A$85.A2.A
19.A6.A$106.3A.B2.B.3A$85.B2.B16.5A.2B.5A$104.7A2.7A$83.A.B2.B.A13.7A
2.7A$82.3A.2B.3A12.7A2.7A$82.4A2.4A12.7A2.7A$80.14A11.5A.2B.5A$80.14A
12.3A.B2.B.3A$82.4A2.4A16.A6.A$82.3A.2B.3A$83.A.B2.B.A19.B2.B2$85.B2.
B21.A2.A$111.2A$85.A2.A$86.2A$111.2A56.2A.A6.2A.A$110.A2.A55.A.2A6.A.
2A$173.2A2.2A4.2A$86.2A22.B2.B59.A3.A5.A$85.A2.A85.A3.A5.A$108.A6.A
17.A39.2A2.2A4.2A77.A$85.B2.B16.4A.B2.B.4A12.A3.A33.2A.A4.A5.A76.3A$
3.4A18.2A13.2A17.4A41.6A.2B.6A12.B2.A33.A.2A5.A5.A74.4A$2.6A16.A2.A
11.4A15.6A16.A2.A6.A2.A9.8A2.8A9.A2.B.2A30.2A8.2A4.2A37.2A34.7A$.8A
29.6A13.8A15.4A.B2.B.4A9.18A13.4A29.A9.A5.A37.4A33.8A$.8A15.B2.B10.6A
13.3A2.3A13.7A.2B.7A7.18A10.7A30.A9.A5.A35.5A33.8A$10A27.8A12.2A.2B.
2A11.10A2.10A5.8A2.8A12.7A27.2A8.2A4.2A35.3A.A34.6A$A2.4A2.A12.A.B2.B
.A7.A2.2A2.A14.B2.B13.10A2.10A6.6A.2B.6A14.3A2.A29.2A.A6.2A.A38.4A35.
4A$2.B.2A.B13.3A.2B.3A6.A.B2.B.A7.2A3.A6.A3.2A8.7A.2B.7A9.4A.B2.B.4A
17.A.A30.A.2A6.A.2A43.A$2.B.2A.B13.4A2.4A6.A.B2.B.A7.2A3.A6.A3.2A10.
4A.B2.B.4A14.A6.A20.2A87.A$A2.4A2.A11.10A6.A2.2A2.A14.B2.B17.A2.A6.A
2.A105.A$10A13.6A8.8A12.2A.2B.2A45.B2.B84.2A$.8A14.6A9.6A13.3A2.3A20.
B2.B108.6A$.8A16.2A11.6A13.8A45.A2.A85.A.3A18.2A16.2A18.2A$2.6A17.2A
12.4A15.6A21.A2.A22.2A86.6A16.4A13.5A16.5A$3.4A33.2A17.4A23.2A111.6A
15.6A12.6A14.8A$200.3A.A15.6A12.6A14.8A$201.4A16.3A.A13.5A14.8A$86.2A
118.A15.4A14.4A15.6A$85.A2.A22.2A92.A21.A32.4A$110.A2.A112.A$85.B2.B$
110.B2.B$80.A2.A6.A2.A127.3A$80.4A.B2.B.4A14.A6.A105.4A$77.8A.2B.8A9.
3A.B2.B.3A102.6A$76.10A2.10A7.5A4.5A101.6A$76.10A2.10A7.5A4.5A102.3A.
A$77.8A.2B.8A9.3A.B2.B.3A104.6A$80.4A.B2.B.4A14.A6.A109.2A$80.A2.A6.A
2.A131.A$110.B2.B$85.B2.B$110.A2.A$85.A2.A22.2A$86.2A59.4A18.2A.A6.2A
.A$141.4A.6A.4A12.A.2A6.A.2A$140.18A15.2A8.2A$139.5A3.4A3.5A14.A9.A$
139.4A.B.B.2A.B.B.4A15.A9.A$140.2A.B3.B2.B3.B.2A15.2A8.2A$142.B12.B
13.2A.A6.2A.A$138.3A.B2.B6.B2.B.3A9.A.2A6.A.2A$137.3A7.4A7.3A6.2A8.2A
$137.3A7.4A7.3A6.A9.A$138.3A.B2.B6.B2.B.3A8.A9.A$142.B12.B11.2A8.2A$
140.2A.B3.B2.B3.B.2A11.2A.A6.2A.A$139.4A.B.B.2A.B.B.4A10.A.2A6.A.2A$
139.5A3.4A3.5A$140.18A$141.4A.6A.4A$147.4A16$150.2A$149.4A$148.6A$
148.6A$148.6A$146.10A$128.2A16.A2.4A2.A$127.4A16.2B.2A.2B14.2A.A4.2A
3.2A$125.8A14.B.B2.B.B14.A.2A4.2A3.2A$123.12A10.A.B6.B.A16.2A$123.12A
10.2A.B4.B.2A16.A3.2A3.2A$122.14A8.4A.B2.B.4A16.A2.A.A.A.A$122.6A2.6A
8.5A.2B.5A15.2A4.A.A$122.5A.2B.5A10.4A2.4A13.2A.A5.2A.A$121.5A.B2.B.
5A9.10A13.A.2A9.2A$121.4A.B4.B.4A11.6A13.2A14.A$121.4A.B4.B.4A11.6A
13.A14.A$121.5A.B2.B.5A9.10A12.A13.2A$122.5A.2B.5A10.4A2.4A11.2A14.A$
122.6A2.6A8.5A.2B.5A11.2A.A9.A$122.14A8.4A.B2.B.4A11.A.2A9.2A$123.12A
10.2A.B4.B.2A$123.12A10.A.B6.B.A$125.8A14.B.B2.B.B$127.4A16.2B.2A.2B$
128.2A16.A2.4A2.A$146.10A$148.6A$148.6A$148.6A$149.4A$150.2A16$169.2A
.A6.2A.A$169.A.2A6.A.2A$173.2A2.2A$173.A3.A$174.A3.A$173.2A2.2A$169.
2A.A6.2A.A$169.A.2A6.A.2A$167.2A8.2A4.2A$167.A9.A5.A$168.A9.A5.A$167.
2A8.2A4.2A$169.2A.A6.2A.A$169.A.2A6.A.2A25$92.4A$92.A2.A56.2A$90.3A2.
3A52.A4.A13.2A.A6.2A.A$89.4A2.4A31.A2.A15.A.B2.B.A12.A.2A6.A.2A$89.3A
.2B.3A32.2B17.2B2.2B17.2A2.2A4.2A$90.A.B2.B.A53.4B18.A3.A5.A$127.3A.
2B.3A11.A2.B2.B2.A16.A3.A5.A$92.4A31.4A2.4A10.2A.B4.B.2A14.2A2.2A4.2A
15.2A$92.4A31.10A9.4A6.4A9.2A.A6.2A.A16.4A$127.10A9.6A2.6A9.A.2A6.A.
2A15.6A$90.A.B2.B.A30.8A10.5A4.5A7.2A8.2A4.2A13.6A$89.3A.2B.3A30.6A
12.4A4.4A8.A9.A5.A15.6A$89.4A2.4A49.2A6.2A10.A9.A5.A14.7A$90.3A2.3A
69.2A8.2A4.2A14.7A$92.A2.A73.2A.A6.2A.A18.4A$92.4A73.A.2A6.A.2A19.2A
17$121.2A$119.A4.A$118.A.B2.B.A$119.B4.B$119.B4.B$118.A6.A2$121.2A$
121.2A$151.2A$149.A4.A12.2A.A6.2A.A$150.B2.B13.A.2A6.A.2A$120.4A47.2A
2.2A4.2A$119.6A46.A3.A5.A$119.6A21.3A.B2.B.3A14.A3.A5.A$120.4A22.4A.
2B.4A13.2A2.2A4.2A$146.5A2.5A9.2A.A4.A5.A$147.4A2.4A10.A.2A5.A5.A$
148.2A4.2A15.2A2.2A4.2A$121.2A27.A2.A17.A3.A5.A$121.2A27.A2.A18.A3.A
5.A$151.2A18.2A2.2A4.2A$118.A6.A41.2A.A6.2A.A$119.B4.B42.A.2A6.A.2A$
119.B4.B$118.A.B2.B.A$119.A4.A$121.2A20$151.2A2$149.A.2B.A$130.A2.A
33.2A.A6.2A.A$129.A.2B.A13.A.B2.B.A11.A.2A6.A.2A$130.B2.B13.3A.2B.3A
14.2A8.2A$147.4A2.4A14.A9.A$147.10A15.A9.A$127.2A.B2.B.2A10.10A14.2A
8.2A17.4A$126.4A.2B.4A10.8A11.2A.A6.2A.A18.3A.A$124.7A2.7A8.8A11.A.2A
6.A.2A17.8A$124.16A9.6A16.2A2.2A21.4A.A.A$124.16A9.6A16.A3.A21.9A$
124.7A2.7A8.8A16.A3.A22.7A$126.4A.2B.4A10.8A15.2A2.2A23.5A$127.2A.B2.
B.2A10.10A10.2A.A6.2A.A20.3A$147.10A10.A.2A6.A.2A20.A$147.4A2.4A$130.
B2.B13.3A.2B.3A$129.A.2B.A13.A.B2.B.A$130.A2.A$149.A.2B.A2$151.2A20$
167.2A.A4.2A3.2A$167.A.2A4.2A3.2A$171.2A$171.A3.2A3.2A$172.A2.A.A.A.A
$171.2A4.A.A$167.2A.A5.2A.A$167.A.2A9.2A$171.2A8.A$171.A8.A$172.A7.2A
$171.2A8.A$167.2A.A9.A$167.A.2A9.2A22$151.2A$150.A2.A2$148.A.B2.B.A$
146.3A.B2.B.3A$144.6A.2B.6A7.2A.A6.2A.A$144.7A2.7A7.A.2A6.A.2A$143.8A
2.8A10.2A2.2A$143.7A.2B.7A10.A3.A$144.5A.B2.B.5A12.A3.A$145.3A.B4.B.
3A12.2A2.2A24.4A$167.2A.A6.2A.A20.4A$149.6B12.A.2A6.A.2A20.7A$147.A2.
B2.B2.A14.2A2.2A4.2A17.8A$147.A2.B2.B2.A14.A3.A5.A18.8A$149.6B17.A3.A
5.A18.7A$171.2A2.2A4.2A18.4A$145.3A.B4.B.3A8.2A.A6.2A.A20.4A$144.5A.B
2.B.5A7.A.2A6.A.2A$143.7A.2B.7A$143.8A2.8A$144.7A2.7A$144.6A.2B.6A$
146.3A.B2.B.3A$148.A.B2.B.A2$150.A2.A$151.2A18$167.2A.A6.2A.A$167.A.
2A6.A.2A$171.2A2.2A4.2A$171.A3.A5.A$172.A3.A5.A$171.2A2.2A4.2A$167.2A
.A6.2A.A$167.A.2A6.A.2A$171.2A2.2A4.2A$171.A3.A5.A$172.A3.A5.A$171.2A
2.2A4.2A$167.2A.A6.2A.A$167.A.2A6.A.2A27$150.3A14.2A3.2A4.2A.A$149.5A
13.2A3.2A4.A.2A$148.7A21.2A4.2A$148.7A12.2A3.2A2.A5.A$149.8A10.A.A.A.
A3.A5.A$150.4A15.A.A4.2A4.2A$151.2A.B2.A10.2A.A4.A5.A$151.2A.B2.A14.
2A3.A5.A$150.4A19.A2.2A4.2A$149.8A15.A3.A5.A$148.7A17.2A3.A5.A$148.7A
18.A2.2A4.2A$149.5A18.A5.2A.A$150.3A19.2A4.A.2A24$151.2A$149.A4.A$
149.A4.A$167.2A3.2A4.2A.A$148.2A.2B.2A11.2A3.2A4.A.2A$147.4A2.4A25.2A
$147.4A2.4A10.2A3.2A8.A$148.2A4.2A11.A.A.A.A9.A$150.A2.A15.A.A10.2A$
151.2A15.2A.A6.2A.A$172.2A4.A.2A$173.A2.2A$151.2A19.A3.A$150.A2.A18.
2A3.A$148.2A4.2A17.A2.2A$147.4A2.4A15.A5.2A.A$147.4A2.4A15.2A4.A.2A$
148.2A.2B.2A2$149.A4.A$149.A4.A$151.2A22$167.2A3.2A2.2A3.2A$167.2A3.
2A2.2A3.2A2$148.A6.A11.2A3.2A2.2A3.2A$146.A3.A2.A3.A9.A.A.A.A2.A.A.A.
A$145.A.B2.A2.A2.B.A10.A.A6.A.A$146.B.B.4A.B.B10.2A.A5.2A.A$146.2B.6A
.2B14.2A7.2A$148.8A17.A8.A$146.5A2.5A14.A8.A$148.8A16.2A7.2A$148.8A
17.A8.A$149.6A17.A8.A$172.2A7.2A27$167.2A3.2A4.2A.A$167.2A3.2A4.A.2A$
176.2A$167.2A3.2A2.A$167.A.A.A.A3.A$169.A.A4.2A$168.2A.A6.2A.A$172.2A
4.A.2A$173.A2.2A4.2A$172.A3.A5.A$172.2A3.A5.A$173.A2.2A4.2A$172.A5.2A
.A$172.2A4.A.2A27$167.2A3.2A4.2A.A$167.2A3.2A4.A.2A$121.3A6.3A16.A.2B
.A21.2A4.2A$125.4A38.2A3.2A2.A5.A$123.B.4A.B16.A.B4.B.A10.A.A.A.A3.A
5.A$119.A.B.B.4A.B.B.A13.B6.B13.A.A4.2A4.2A$122.B.6A.B14.A3.B2.B3.A
10.2A.A6.2A.A$117.A2.2B.8A.2B2.A9.A2.B.2A.B2.A14.2A4.A.2A$117.3A2.10A
2.3A11.B.4A.B17.A2.2A4.2A$118.8A2.8A10.A2.6A2.A14.A3.A5.A$118.8A2.8A
9.14A13.2A3.A5.A$117.3A2.10A2.3A9.5A2.5A15.A2.2A4.2A$117.A2.2B.8A.2B
2.A9.5A2.5A14.A5.2A.A$122.B.6A.B15.2A6.2A15.2A4.A.2A$119.A.B.B.4A.B.B
.A$123.B.4A.B$125.4A$121.3A6.3A23$169.2A.A6.2A.A$169.A.2A6.A.2A$167.
2A8.2A4.2A$167.A9.A5.A$168.A9.A5.A$167.2A8.2A4.2A$169.2A.A4.A5.A$169.
A.2A5.A5.A$173.2A2.2A4.2A$173.A3.A5.A$174.A3.A5.A$173.2A2.2A4.2A$169.
2A.A6.2A.A$169.A.2A6.A.2A27$169.2A.A6.2A.A$169.A.2A6.A.2A$167.2A14.2A
$167.A15.A$153.2A13.A15.A$150.A.A2.A.A9.2A14.2A$148.A4.2A4.A9.2A.A6.
2A.A$147.A.B.B.2A.B.B.A8.A.2A6.A.2A$148.B.B.4A.B.B13.2A2.2A$146.A2.B.
6A.B2.A11.A3.A$150.8A16.A3.A$147.6A2.6A12.2A2.2A$149.4A2.4A10.2A.A6.
2A.A$150.3A2.3A11.A.2A6.A.2A27$169.2A.A4.2A3.2A$169.A.2A4.2A3.2A$167.
2A$167.A9.2A3.2A$168.A8.A.A.A.A$167.2A10.A.A$169.2A.A5.2A.A$169.A.2A
9.2A$173.2A8.A$173.A8.A$174.A7.2A$173.2A8.A$169.2A.A9.A$169.A.2A9.2A!


LeftSeacrhv05_C2sym.py
from glife import rect, pattern,validint
from collections import Counter
import golly as g
import random
from glife import getminbox, rect, rccw
from time import time
import math as m
import csv
import os
debug=0

#output as  category:power:save
def powerlyse(stepsize, numsteps,delaythres=0.2):
   g.setalgo("RuleLoader")
   g.setbase(2)
   g.setstep(stepsize)
   poplist = [0]*numsteps
   poplist[0] = int(g.getpop())
   pointlist = []
   save=1
      

   for i in xrange(1, numsteps, 1):
      oldsecs=time()
      g.step()
      newsecs=time()
      poplist[i] = int(g.getpop()) + poplist[i-1]
      if  (newsecs-oldsecs)> delaythres:
         save=False
         break      
      if (i % 50 == 0):
         g.fit()
         g.update()

      if (i > numsteps/2):
         pointlist.append((m.log(i),m.log(poplist[i]+1.0)))
      oldsecs=newsecs
   if pointlist!=[]:
      power=regress(pointlist)
      if (power < 0.55):
         cat='unidentified'
      elif (power < 0.82):
         cat='REPLICATOR'
      elif (power < 1.02):
         cat='LINEAR'
      elif (power < 1.4 ):
         cat='EXPLOSIVE'
         save=0
      else:
         cat='QUADRATIC'
         save=0
      return "%s:%f:%i"%(cat,power,save)
   else:
      return'unidentified:0:0'

def leftlyse(stepsize,stepnum,thres=20,pnum=20,orient=2):

   left=g.getrect()[orient]
   pj=[0 for j in xrange(pnum+1)]
   pjold=[0 for j in xrange(pnum+1)]
   g.setbase(2)
   g.setstep(stepsize)
   leftlist=[]
   Ileftlist=[]
   period=0
   oldsecs=time()
   for i in range(stepnum):
      g.run(1)
      if g.empty():
         return '0:0:0:0'
      left=int(g.getrect()[orient])
      leftlist.append( left )
      if i ==0:
         Ileft=0
      else:
         Ileft=left-leftlist[i-1]
      Ileftlist.append(Ileft)
      
      for j in range(pnum):
         j=j+1
         if i>=j:
            pjtemp=(Ileftlist[i]==Ileftlist[i-j])
         else:
            pjtemp=0
         pj[j]=(pj[j]+int(pjtemp))*int(pjtemp)
   
      threstemp=6
      for j in range(pnum):
         if pj[-(j+1)]!=0:
            threstemp=max(pnum-j,6)
            # threstemp=30
            break   

      if period==0:
         if max(pj)>=threstemp:
            pttemp=g.getcells(g.getrect())
            period=pj.index(max(pj))
      else:
         if (pj[period]==0 and pjold>=thres):
            if sum(Ileftlist[(i-1-period):(i-1)])==0:
               cat='_still'
            else:
               cat='_move'
            return '%s:%i:%i:%i'%(cat,period,pjold[period],1)
      pjold=pj[:]
      event = g.getevent()   
      if event.startswith("key"):
         evt, ch, mods = event.split()
         if ch == "q":
            break
      newsecs=time()
      if newsecs-oldsecs>=1.0:
         g.update()
      oldsecs=newsecs
   return '0:0:0:0'

def regress(pairlist):

    cumx = 0.0
    cumy = 0.0
    cumvar = 0.0
    cumcov = 0.0

    for x,y in pairlist:

        cumx += x
        cumy += y

    cumx = cumx / len(pairlist)
    cumy = cumy / len(pairlist)

    for x,y in pairlist:

        cumvar += (x - cumx)*(x - cumx)
        cumcov += (x - cumx)*(y - cumy)
   try:
      return (cumcov / cumvar)
   except:
      return 100

def randfill(rectcoords, amt):
   newstate = g.getoption("drawingstate")
   for i in range(rectcoords[0],rectcoords[0]+rectcoords[2]):
      for j in range(rectcoords[1],rectcoords[1]+rectcoords[3]):
         if(100*random.random()<amt):
            g.setcell(i, j, newstate)
            g.setcell(i, -j-1, newstate)
      
         else:
            g.setcell(i, j, 0)

def draw_line(x1, y1, x2, y2):
    g.setcell(x1, y1, 1)
    if x1 == x2 and y1 == y2: return

    dx = x2 - x1
    ax = abs(dx) * 2
    sx = 1
    if dx < 0: sx = -1
    dy = y2 - y1
    ay = abs(dy) * 2
    sy = 1
    if dy < 0: sy = -1

    if ax > ay:
        d = ay - (ax / 2)
        while x1 != x2:
            g.setcell(x1, y1, 1)
            if d >= 0:
                y1 += sy
                d -= ax
            x1 += sx
            d += ay
    else:
        d = ax - (ay / 2)
        while y1 != y2:
            g.setcell(x1, y1, 1)
            if d >= 0:
                x1 += sx
                d -= ay
            y1 += sy
            d += ax

    g.setcell(x2, y2, 1)

def fit_if_not_visible():
    try:
        r = rect(g.getrect())
        if (not r.empty) and (not r.visible()): g.fit()
    except:
        # getrect failed because pattern is too big
        g.fit()

#For some reason this function always returns a warning. Thus I have to expand it in full every time.
def savepattern(cellist,ptn,attr):
   filename=g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+ attr
   filename=g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+'_p2'+'_medium'
   try:
      g.store(celllist,filename)
   except:
      g.warn('can\'t write pattern file to file:\n' + filename)

def oscillating():
    # return True if the pattern is empty, stable or oscillating

    # first get current pattern's bounding box
    prect = g.getrect()
    pbox = rect(prect)
    if pbox.empty:
        g.show("The pattern is empty.")
        return '1:0'

    # get current pattern and create hash of "normalized" version -- ie. shift
    # its top left corner to 0,0 -- so we can detect spaceships and knightships
    ## currpatt = pattern( g.getcells(prect) )
    ## h = hash( tuple( currpatt(-pbox.left, -pbox.top) ) )

    # use Golly's hash command (3 times faster than above code)
    h = g.hash(prect)

    # check if outer-totalistic rule has B0 but not S8
    rule = g.getrule().split(":")[0]
    hasB0notS8 = rule.startswith("B0") and (rule.find("/") > 1) and not rule.endswith("8")

    # determine where to insert h into hashlist
    pos = 0
    listlen = len(hashlist)
    while pos < listlen:
        if h > hashlist[pos]:
            pos += 1
        elif h < hashlist[pos]:
            # shorten lists and append info below
            del hashlist[pos : listlen]
            del genlist[pos : listlen]
            del poplist[pos : listlen]
            del boxlist[pos : listlen]
            break
        else:
            # h == hashlist[pos] so pattern is probably oscillating, but just in
            # case this is a hash collision we also compare pop count and box size
            if (int(g.getpop()) == poplist[pos]) and \
               (pbox.wd == boxlist[pos].wd) and \
               (pbox.ht == boxlist[pos].ht):
                period = int(g.getgen()) - genlist[pos]

                if hasB0notS8 and (period % 2 > 0) and (pbox == boxlist[pos]):
                    # ignore this hash value because B0-and-not-S8 rules are
                    # emulated by using different rules for odd and even gens,
                    # so it's possible to have identical patterns at gen G and
                    # gen G+p if p is odd
                    return '0:0'

                if period == 1:
                    if pbox == boxlist[pos]:
                        g.show("The pattern is stable.")
                    else:
                        show_spaceship_speed(1, 0, 0)
                elif pbox == boxlist[pos]:
                    g.show("Oscillator detected (period = " + str(period) + ")")
                else:
                    deltax = abs(boxlist[pos].x - pbox.x)
                    deltay = abs(boxlist[pos].y - pbox.y)
                    #show_spaceship_speed(period, deltax, deltay)
                return '1:'+str(period)
            else:
                # look at next matching hash value or insert if no more
                pos += 1

    # store hash/gen/pop/box info at same position in various lists
    hashlist.insert(pos, h)
    genlist.insert(pos, int(g.getgen()))
    poplist.insert(pos, int(g.getpop()))
    boxlist.insert(pos, pbox)

    return '0:0'      
try:
   os.mkdir(g.getdir('patterns')+'LeftSearch')
except:
   pass
layername = "LeftSearch"
poplayer = -1
newlayer=g.getstring("Avoid overwritting layer with same name? (y/n)",'y',)=='y'
if newlayer:
   poplayer = -1
else:
   for i in xrange(g.numlayers()):
      if g.getname(i) == layername:
         poplayer = i
         break
if poplayer == -1 and g.numlayers() == g.maxlayers():
   g.show('You need to delete a layer')
   g.exit()
if poplayer == -1:
   poplayer = g.addlayer()
else:
   g.setlayer(poplayer)

g.new(layername)

# #load a torus with rightside sealed
# if powerlyse==0:
   # wd=int(g.getstring('width of the torus?','200'))
   # ht=int(g.getstring('height of the torus?','100'))
   # g.setrule('flashbf7a'+':T'+str(wd)+','+str(ht))
   # left = -int(wd/2)
   # top = -int(ht/2)   
   # right=left+wd-1
   # g.update()

   # for j in range(top,top+ht):
      # g.setcell(right,j,3)

   
   # soupnum=int(g.getstring('How many soups to screen?','100'))
   # pnum=int(g.getstring('Upper limit for period?','16'))
   # thres=int(g.getstring('Threshold Period?','50'))
   # abandon=int(g.getstring('Longest time before a stable leftline is trimmed','75'))

   # amt=int(g.getstring('Random fill density in pecentage','40',))
   # swd=int(g.getstring('Soup width','20'))
   # sht=int(g.getstring('Soup height','20'))

   # sgap=int(g.getstring('Gap between soup and seal','10'))
   # trimwidth=10
   # trimthres=100



# else:
input=g.getstring('soupwidth/soupheight/soupdensity/period/threshold to detect oscillation/threshold to stop oscillation monitoring/pattern number wish to detect'
            ,'20/20/60/16/50/75/5000/Y')   
swd=int(input.split('/')[0])
sht=int(input.split('/')[1])
amt=int(input.split('/')[2])
pnum=int(input.split('/')[3])
thres=int(input.split('/')[4])
abandon=int(input.split('/')[5])
soupnum=int(input.split('/')[6])
soupsel=[-int(swd/2),-int(sht/2),swd,int(sht/2)]


prescreen=g.getstring('Prescreen-powrelyse parameters: stepnum/delay/stepsize, increase delay if you only see soup pattern flashing','200/0.05/1')
stepnum=int(prescreen.split('/')[0])
delaythres=float(prescreen.split('/')[1])
stepsize=int(prescreen.split('/')[2])

#read pattern number from last time
try:
   INIFileName = g.getdir("data") + "ptn.ini"
   f = open(INIFileName, 'r')
   ptn = f.readline()
   f.close()
   if not validint(ptn):
      ptn = 0
   else:
      ptn = int(ptn)
except:
# should only happen 1st time (ptn.ini doesn't exist)
   pass
ptnnew=soupnum+ptn

if debug:
   g.note(g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+'_p2'+'_medium')


while ptn<=ptnnew:
   
   #reset to a soup and save souptemp
   if not g.empty():
      g.select(g.getrect())
      g.clear(0)
   randfill(soupsel,amt)
   souptemp=g.getcells(soupsel)
   g.show('The next pattern will be number %i, press q to quit and save pattern number'%ptn)   
   #screen soups for linear or replicator category
   descriptor1=powerlyse(stepsize,stepnum,delaythres)
   
   if descriptor1.split(':')[2]=='1' and g.empty()==0:
      wdold=g.getrect()[2]
      htold=g.getrect()[3]
      g.run(10)
      wdnew=g.getrect()[2]
      htnew=g.getrect()[3]
      w=wdnew!=wdold
      h=htnew!=htold
      if (w+h)==1:
         if w:
            descriptor2=leftlyse(0,abandon,thres,orient=2)
         if h:
            descriptor2==leftlyse(0,abandon,thres,orient=3)
      if (w+h)==2:
            descriptor2=leftlyse(0,abandon,thres,orient=2)
      if (w+h)==0:
         descriptor2='_still:n:n:1'
   else:
      descriptor2='0:0:0:0'
   if descriptor2.split(':')[3]=='1' :
      if powerlyse(stepsize,200,delaythres).split(':')[2]=='1' :
         cat=descriptor2.split(':')[0]
         round=descriptor2.split(':')[2]
         if cat=='_still'    and round=='n':
            hashlist = []        # for pattern hash values
            genlist = []         # corresponding generation counts
            poplist = []         # corresponding population counts
            boxlist = []         # corresponding bounding boxes
            for i in range(1,100):
               g.run(1)
               osci=oscillating()
               if int(osci.split(':')[0]):
                  period=osci.split(':')[1]
                  break

         else:
            period=descriptor2.split(':')[1]
         pttemp=g.getcells(g.getrect())
         g.store(pttemp,g.getdir('patterns')+ 'LeftSearch\ptn%i_p%s_r%s'%(ptn,period,round)+cat+descriptor1.split(':')[0])
         g.store(souptemp,g.getdir('patterns')+ 'LeftSearch\soup%i_p%s_r%s'%(ptn,period,round)+cat+descriptor1.split(':')[0])
         ptn=ptn+1
   event=g.getevent()
   if event.startswith("key"):
      evt, ch, mods = event.split()
      if ch == "q":
         break      
      if debug:
         g.note('%i %i %i'%(poplist[i],left,llim))

      continue
# We are adding the (i+1)th elements to lists
   


# return '%s:%i:%i:%i'%(cat,period,pjold[period],save)

try:
   f = open(g.getdir('data')+'ptn.ini','w')
   f.write(str(ptn))
   f.close()
except:
   g.warn('bug')

#check whether finish

#gen=5
#GotoINIFileName = g.getdir("data") + "goto.ini"
#savegen(GotoINIFileName, gen)


Updated to support more symmetry:
LeftSearchv06.py
from glife import rect, pattern,validint
from collections import Counter
import golly as g
import random
from glife import *
from time import time
import math as m
import csv
import os
debug=0

#output as  category:power:save
def powerlyse(stepsize, numsteps,delaythres=0.2):
   g.setalgo("RuleLoader")
   g.setbase(2)
   g.setstep(stepsize)
   poplist = [0]*numsteps
   poplist[0] = int(g.getpop())
   pointlist = []
   save=1
      

   for i in xrange(1, numsteps, 1):
      oldsecs=time()
      g.step()
      newsecs=time()
      poplist[i] = int(g.getpop()) + poplist[i-1]
      if  (newsecs-oldsecs)> delaythres:
         save=False
         break      
      if (i % 50 == 0):
         g.fit()
         g.update()

      if (i > numsteps/2):
         pointlist.append((m.log(i),m.log(poplist[i]+1.0)))
      oldsecs=newsecs
   if pointlist!=[]:
      power=regress(pointlist)
      if (power < 0.55):
         cat='unidentified'
      elif (power < 0.82):
         cat='REPLICATOR'
      elif (power < 1.02):
         cat='LINEAR'
      elif (power < 1.4 ):
         cat='EXPLOSIVE'
         save=0
      else:
         cat='QUADRATIC'
         save=0
      return "%s:%f:%i"%(cat,power,save)
   else:
      return'unidentified:0:0'

def leftlyse(stepsize,stepnum,thres=20,pnum=20,orient=2):
   if g.empty():
      return '0:0:0:0'
   left=g.getrect()[orient]
   pj=[0 for j in xrange(pnum+1)]
   pjold=[0 for j in xrange(pnum+1)]
   g.setbase(2)
   g.setstep(stepsize)
   leftlist=[]
   Ileftlist=[]
   period=0
   oldsecs=time()
   for i in range(stepnum):
      g.run(1)
      if g.empty():
         break
      
      left=int(g.getrect()[orient])
      leftlist.append( left )
      if i ==0:
         Ileft=0
      else:
         Ileft=left-leftlist[i-1]
      Ileftlist.append(Ileft)
      
      for j in range(pnum):
         j=j+1
         if i>=j:
            pjtemp=(Ileftlist[i]==Ileftlist[i-j])
         else:
            pjtemp=0
         pj[j]=(pj[j]+int(pjtemp))*int(pjtemp)
   
      threstemp=6
      for j in range(pnum):
         if pj[-(j+1)]!=0:
            threstemp=max(pnum-j,6)
            # threstemp=30
            break   

      if period==0:
         if max(pj)>=threstemp:
            pttemp=g.getcells(g.getrect())
            period=pj.index(max(pj))
      else:
         if (pj[period]==0 and pjold>=thres):
            if sum(Ileftlist[(i-1-period):(i-1)])==0:
               cat='_still'
            else:
               cat='_move'
            return '%s:%i:%i:%i'%(cat,period,pjold[period],1)
      pjold=pj[:]
      event = g.getevent()   
      if event.startswith("key"):
         evt, ch, mods = event.split()
         if ch == "q":
            break
      newsecs=time()
      if newsecs-oldsecs>=1.0:
         g.update()
      oldsecs=newsecs
   return '0:0:0:0'

def regress(pairlist):

    cumx = 0.0
    cumy = 0.0
    cumvar = 0.0
    cumcov = 0.0

    for x,y in pairlist:

        cumx += x
        cumy += y

    cumx = cumx / len(pairlist)
    cumy = cumy / len(pairlist)

    for x,y in pairlist:

        cumvar += (x - cumx)*(x - cumx)
        cumcov += (x - cumx)*(y - cumy)
   try:
      return (cumcov / cumvar)
   except:
      return 100

def randfill(rectcoords, amt):
   newstate = g.getoption("drawingstate")
   for i in range(rectcoords[0],rectcoords[0]+rectcoords[2]):
      for j in range(rectcoords[1],rectcoords[1]+rectcoords[3]):
         if(100*random.random()<amt):
            g.setcell(i, j, newstate)
         else:
            g.setcell(i, j, 0)

def randfill_syn(rectcoords,amt):   
   newstate = g.getoption("drawingstate")
   if(100*random.random()<amt):
      on=1
   else:
      on=0
   for i in range(rectcoords[0],rectcoords[0]+rectcoords[2]):
     for j in range(rectcoords[1],rectcoords[1]+rectcoords[3]):
       if on:
         g.setcell(i, j, newstate)
       else:
         g.setcell(i, j, 0)

def draw_line(x1, y1, x2, y2):
    g.setcell(x1, y1, 1)
    if x1 == x2 and y1 == y2: return

    dx = x2 - x1
    ax = abs(dx) * 2
    sx = 1
    if dx < 0: sx = -1
    dy = y2 - y1
    ay = abs(dy) * 2
    sy = 1
    if dy < 0: sy = -1

    if ax > ay:
        d = ay - (ax / 2)
        while x1 != x2:
            g.setcell(x1, y1, 1)
            if d >= 0:
                y1 += sy
                d -= ax
            x1 += sx
            d += ay
    else:
        d = ax - (ay / 2)
        while y1 != y2:
            g.setcell(x1, y1, 1)
            if d >= 0:
                x1 += sx
                d -= ay
            y1 += sy
            d += ax

    g.setcell(x2, y2, 1)

def fit_if_not_visible():
    try:
        r = rect(g.getrect())
        if (not r.empty) and (not r.visible()): g.fit()
    except:
        # getrect failed because pattern is too big
        g.fit()

#For some reason this function always returns a warning. Thus I have to expand it in full every time.
def savepattern(cellist,ptn,attr):
   filename=g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+ attr
   filename=g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+'_p2'+'_medium'
   try:
      g.store(celllist,filename)
   except:
      g.warn('can\'t write pattern file to file:\n' + filename)

def oscillating():
    # return True if the pattern is empty, stable or oscillating

    # first get current pattern's bounding box
    prect = g.getrect()
    pbox = rect(prect)
    if pbox.empty:
        g.show("The pattern is empty.")
        return '1:0'

    # get current pattern and create hash of "normalized" version -- ie. shift
    # its top left corner to 0,0 -- so we can detect spaceships and knightships
    ## currpatt = pattern( g.getcells(prect) )
    ## h = hash( tuple( currpatt(-pbox.left, -pbox.top) ) )

    # use Golly's hash command (3 times faster than above code)
    h = g.hash(prect)

    # check if outer-totalistic rule has B0 but not S8
    rule = g.getrule().split(":")[0]
    hasB0notS8 = rule.startswith("B0") and (rule.find("/") > 1) and not rule.endswith("8")

    # determine where to insert h into hashlist
    pos = 0
    listlen = len(hashlist)
    while pos < listlen:
        if h > hashlist[pos]:
            pos += 1
        elif h < hashlist[pos]:
            # shorten lists and append info below
            del hashlist[pos : listlen]
            del genlist[pos : listlen]
            del poplist[pos : listlen]
            del boxlist[pos : listlen]
            break
        else:
            # h == hashlist[pos] so pattern is probably oscillating, but just in
            # case this is a hash collision we also compare pop count and box size
            if (int(g.getpop()) == poplist[pos]) and \
               (pbox.wd == boxlist[pos].wd) and \
               (pbox.ht == boxlist[pos].ht):
                period = int(g.getgen()) - genlist[pos]

                if hasB0notS8 and (period % 2 > 0) and (pbox == boxlist[pos]):
                    # ignore this hash value because B0-and-not-S8 rules are
                    # emulated by using different rules for odd and even gens,
                    # so it's possible to have identical patterns at gen G and
                    # gen G+p if p is odd
                    return '0:0'

                if period == 1:
                    if pbox == boxlist[pos]:
                        g.show("The pattern is stable.")
                    else:
                        show_spaceship_speed(1, 0, 0)
                elif pbox == boxlist[pos]:
                    g.show("Oscillator detected (period = " + str(period) + ")")
                else:
                    deltax = abs(boxlist[pos].x - pbox.x)
                    deltay = abs(boxlist[pos].y - pbox.y)
                    #show_spaceship_speed(period, deltax, deltay)
                return '1:'+str(period)
            else:
                # look at next matching hash value or insert if no more
                pos += 1

    # store hash/gen/pop/box info at same position in various lists
    hashlist.insert(pos, h)
    genlist.insert(pos, int(g.getgen()))
    poplist.insert(pos, int(g.getpop()))
    boxlist.insert(pos, pbox)

    return '0:0'      
try:
   os.mkdir(g.getdir('patterns')+'LeftSearch')
except:
   pass
layername = "LeftSearch"
poplayer = -1
newlayer=g.getstring("Avoid overwritting layer with same name? (y/n)",'y',)=='y'
if newlayer:
   poplayer = -1
else:
   for i in xrange(g.numlayers()):
      if g.getname(i) == layername:
         poplayer = i
         break
if poplayer == -1 and g.numlayers() == g.maxlayers():
   g.show('You need to delete a layer')
   g.exit()
if poplayer == -1:
   poplayer = g.addlayer()
else:
   g.setlayer(poplayer)

g.new(layername)

# #load a torus with rightside sealed
# if powerlyse==0:
   # wd=int(g.getstring('width of the torus?','200'))
   # ht=int(g.getstring('height of the torus?','100'))
   # g.setrule('flashbf7a'+':T'+str(wd)+','+str(ht))
   # left = -int(wd/2)
   # top = -int(ht/2)   
   # right=left+wd-1
   # g.update()

   # for j in range(top,top+ht):
      # g.setcell(right,j,3)

   
   # soupnum=int(g.getstring('How many soups to screen?','100'))
   # pnum=int(g.getstring('Upper limit for period?','16'))
   # thres=int(g.getstring('Threshold Period?','50'))
   # abandon=int(g.getstring('Longest time before a stable leftline is trimmed','75'))

   # amt=int(g.getstring('Random fill density in pecentage','40',))
   # swd=int(g.getstring('Soup width','20'))
   # sht=int(g.getstring('Soup height','20'))

   # sgap=int(g.getstring('Gap between soup and seal','10'))
   # trimwidth=10
   # trimthres=100



# else:
rule=g.getstring('rule','flashbf7df3')
#load a torus with rightside sealed
g.setrule(rule)

identifier=g.getstring('Symmetry (0,C4,D2xD2) and Identifier for this job?','C4_1a')
symmetry=identifier.split('_')[0]
input=g.getstring('soupwidth/soupheight/soupdensity/period/threshold to detect oscillation/threshold to stop oscillation monitoring/pattern number wish to detect',
   '20/20/60/62/50/75/5000/Y')   
swd=int(input.split('/')[0])
sht=int(input.split('/')[1])
amt=int(input.split('/')[2])
pnum=int(input.split('/')[3])
thres=int(input.split('/')[4])
abandon=int(input.split('/')[5])
soupnum=int(input.split('/')[6])



def soup(symmetry):
   global soupsel
   if symmetry=='0':
      soupsel=[-int(swd/2),-int(sht/2),swd,sht]
      randfill(soupsel,amt)
   #elif symmetry=='C2':
      
   elif symmetry=='C4':
      swd1=(swd/2)+1
      swd2=(swd/2)-1
      soupsel=[-swd1+1,-swd2,swd,swd]
      soupsel0=[-swd1+1,-swd2,swd1,swd2]
      soupsel1=[0,-swd2,swd2+1,swd1]
      randfill(soupsel0,amt)
      p=pattern(g.getcells(soupsel0))
      p.put(-1,0,rccw)
      p.put(0,1,rcw)
      p=pattern(g.getcells(soupsel1))
      p.put(0,1,rcw)
      randfill_syn([-1,0,2,2],amt)   
   elif symmetry=='D2xD2':
      if swd % 2 ==0:
         swd1=(swd/2)
         swd2=(swd/2)
      soupsel=[-swd1,-swd2,swd,swd]
      sel=[-swd1,-swd2,swd1,swd2]
      randfill(sel,amt)
      g.putcells(g.getcells(sel),-1,0,-1,0,0,1)
      sel=[-swd1,-swd2,swd,swd2]
      g.putcells(g.getcells(sel),0,-1,1,0,0,-1)

   

prescreen=g.getstring('Prescreen-powrelyse parameters: stepnum/delay/stepsize, increase delay if you only see soup pattern flashing','200/0.05/1')
stepnum=int(prescreen.split('/')[0])
delaythres=float(prescreen.split('/')[1])
stepsize=int(prescreen.split('/')[2])

#read pattern number from last time
try:
   INIFileName = g.getdir("data") + "ptn_%s.ini"%identifier
   f = open(INIFileName, 'r')
   ptn = f.readline()
   f.close()
   if not validint(ptn):
      ptn = 0
   else:
      ptn = int(ptn)
except:
# should only happen 1st time (ptn.ini doesn't exist)
   f = open(g.getdir('data')+"ptn_%s.ini"%identifier,'w')
   f.write('0')
   f.close()
   g.note('essential INI file created ,run the script again.')
   g.exit()
   pass
   
ptnnew=soupnum+ptn

if debug:
   g.note(g.getdir('patterns')+ 'LeftSearch\ptn' + str(ptn)+'_p2'+'_medium')


while ptn<=ptnnew:
   
   #reset to a soup and save souptemp
   if not g.empty():
      g.select(g.getrect())
      g.clear(0)
   soup(symmetry)
   souptemp=g.getcells(soupsel)
   g.show('The next pattern will be number %i_%s, press q to quit and save pattern number'%(ptn,identifier))   
   #screen soups for linear or replicator category
   descriptor1=powerlyse(stepsize,stepnum,delaythres)
   
   if descriptor1.split(':')[2]=='1' and g.empty()==0:
      wdold=g.getrect()[2]
      htold=g.getrect()[3]
      g.run(10)
      if not g.empty():
         wdnew=g.getrect()[2]
         htnew=g.getrect()[3]
         w=wdnew!=wdold
         h=htnew!=htold
         if (w+h)==1:
            if w:
               descriptor2=leftlyse(0,abandon,thres,orient=2)
            if h:
               descriptor2==leftlyse(0,abandon,thres,orient=3)
         if (w+h)==2:
               descriptor2=leftlyse(0,abandon,thres,orient=2)
         if (w+h)==0:
            descriptor2='_still:n:n:1'
   else:
      descriptor2='0:0:0:0'
   if descriptor2.split(':')[3]=='1' :
      if powerlyse(stepsize,200,delaythres).split(':')[2]=='1' :
         cat=descriptor2.split(':')[0]
         round=descriptor2.split(':')[2]
         if cat=='_still'    and round=='n':
            hashlist = []        # for pattern hash values
            genlist = []         # corresponding generation counts
            poplist = []         # corresponding population counts
            boxlist = []         # corresponding bounding boxes
            for i in range(1,100):
               g.run(1)
               osci=oscillating()
               if int(osci.split(':')[0]):
                  period=osci.split(':')[1]
                  break

         else:
            period=descriptor2.split(':')[1]
         pttemp=g.getcells(g.getrect())
         g.store(pttemp,g.getdir('patterns')+ 'LeftSearch\p%s_%s_%s_r%s_%s%i_%s'%(period,cat,descriptor1.split(':')[0],round,'ptn',ptn,identifier) )
         g.store(souptemp,g.getdir('patterns')+ 'LeftSearch\p%s_%s_%s_r%s_%s%i_%s'%(period,cat,descriptor1.split(':')[0],round,'soup',ptn,identifier) )
         ptn=ptn+1
   event=g.getevent()
   if event.startswith("key"):
      evt, ch, mods = event.split()
      if ch == "q":
         break      
      if debug:
         g.note('%i %i %i'%(poplist[i],left,llim))

      continue
# We are adding the (i+1)th elements to lists
   


# return '%s:%i:%i:%i'%(cat,period,pjold[period],save)

try:
   f = open(g.getdir('data')+"ptn_%s.ini"%identifier,'w')
   f.write(str(ptn))
   f.close()
except:
   g.warn('bug')

#check whether finish

#gen=5
#GotoINIFileName = g.getdir("data") + "goto.ini"
#savegen(GotoINIFileName, gen)
shouldsee
 
Posts: 406
Joined: April 8th, 2016, 8:29 am

Re: 3-state life-based rules with mobile birth forcers

Postby shouldsee » April 23rd, 2016, 3:59 am

Although a 4-state rule, flashbf8df8 share the feature of state2-cored structure.

I am not sure how to name these spaceships
x = 140, y = 105, rule = flashbf8df8
41$49.2A$49.2A$34.4A$21.A11.6A66.2A$14.3A2.4A10.6A47.4A13.4A$2A11.10A
10.7A11.3A23.3A3.7A11.3A4.4A$3A9.11A11.4A10.7A7.3A12.A.5A.5A.2A8.13A$
3A9.4A.5A15.A9.8A6.5A10.4A.A.A.6A3.A5.2A.5A.A.4A$3A9.10A14.2A10.7A6.
5A10.A.5A.A.5A3.A6.15A$2A9.10A15.A.2A8.7A5.6A7.2A.3A.A.3A5.A4.A11.A2.
A.A.3A$2A8.A5.3A16.A2.A7.2A3.3A7.4A7.A.A3.A.2A7.2A2.4A8.3A3.5A$A9.2A
23.A2.2A5.A.A14.A8.2A.3A3.2A9.3A.2A8.A7.2A$35.A.2A7.2A23.4A16.2A.2A
17.A$41.2A2.3A24.A20.2A$41.2A3.2A13.3A30.A$41.2A.A3.A11.A3.A8.A2.A$
42.A.2A.A12.A.B.A9.2A$43.A2.A13.A3.A$41.A19.3A$42.A2$16.3A42.2A$18.A
42.2A$17.2A49.2A$68.2A.A3$55.A13.3A$16.A27.3A8.A12.4A$15.3A26.4A6.A9.
2A.2A.A$12.6A11.A14.4A8.4A3.4A13.2A$11.A2.A10.3A2.2A12.4A8.12A3.2A6.
3A$A10.A2.A9.5A.2A13.A.A8.4A.2A.4A2.4A9.4A$A11.2A10.7A4.3A7.2A9.12A.
20A$A15.2A6.5A7.A11.2A7.4A.9A.A.5A.A.A.A.4A$15.A.A7.3A6.A.A8.2A.2A8.
11A.21A$16.A17.2A13.A9.2A.4A.2A.A.6A2.A.2A.A.A.3A$43.A5.A11.3A4.8A4.
3A3.5A$6.3A34.A4.2A.2A9.A2.8A7.A7.2A$4.A4.A33.A.2A3.A2.A10.A.6A16.A$
6.3B.A40.2A11.2A$3.A.3B54.A2.A4.A$9.A52.4A3.2A$7.A53.A2.A4.A$61.A2.A$
61.A.A2$9.2A$8.2A$10.A3.A$13.A2.A$6.A7.2A$A6.A2$11.A$6.A5.2A$A.A6.4A$
A.A4.5A$3.2A.A.4A$10.3A$9.2A.A$8.A.A$7.2A.2A$8.A.A!


flashbf8df8.table
# rules: 45
#
# Golly rule-table format.
# Each rule: C,N,NE,E,SE,S,SW,W,NW,C'
# N.B. Where the same variable appears multiple times in a transition,
# it takes the same value each time.
#
# Default for transitions not listed: no change
#
n_states:4
neighborhood:Moore
symmetries:rotate8
var a={0,2,3}
var b={0,1,2,3}
var c={0,1,2,3}
var d={0,1,3}
var e={0,1,2,3}
var f={0,1,2,3}
var g={0,1,2,3}
var h={0,1,2,3}
var i={0,3}
var j={0,3}
var k={0,3}
var l={0,3}
var m={0,3}
var n={0,1,2}
var o={0,2,3}
var p={0,2,3}
var q={0,2,3}
var r={0,2,3}
var s={0,2,3}
var t={0,1,2,3}
var u={1,2,3}
var v={0,1,3}
var w={0,1}
var x={0,2}
var y={0,1,2}
var z={0,1,2}
var A={0,2}
var B={0,2}
var C={0,2}
var D={0,2}
var E={0,2}
var F={2,3}
var G={0,3}
var H={0,1,3}
a,b,c,d,e,f,g,h,2,1
a,i,j,k,l,m,1,1,1,1
a,i,j,k,l,1,m,1,1,1
a,i,j,k,l,1,1,m,1,1
a,i,j,k,1,l,m,1,1,1
a,i,j,k,1,l,1,m,1,1
a,i,j,k,1,1,l,m,1,1
a,i,j,1,k,l,1,m,1,1
d,1,1,1,1,1,1,1,1,2
n,2,2,2,2,2,2,2,2,3
1,a,o,p,i,q,r,s,b,0
1,b,c,e,f,g,h,t,3,0
u,i,j,k,l,m,d,3,v,0
u,i,j,k,l,m,3,w,1,0
u,i,j,k,l,1,0,d,3,0
u,i,j,k,l,1,m,3,w,0
u,i,j,k,0,1,1,l,3,0
1,x,n,y,z,1,1,1,1,0
u,i,j,k,l,1,3,0,1,0
u,i,0,j,k,3,0,w,1,0
u,0,i,j,k,3,1,0,1,0
1,x,A,B,1,C,D,E,2,0
1,A,n,y,1,B,1,1,1,0
1,A,n,y,1,1,B,1,1,0
1,A,B,C,1,1,1,D,1,0
1,A,B,1,C,D,1,1,1,0
1,A,B,1,C,1,D,1,1,0
1,A,B,1,C,1,1,D,1,0
1,A,B,1,1,C,D,1,1,0
1,A,B,1,1,C,1,D,1,0
1,A,1,B,1,C,1,D,1,0
F,i,j,k,l,m,G,d,v,0
F,0,G,i,j,0,1,0,1,0
F,G,i,j,k,1,0,0,1,0
F,G,d,v,H,1,1,1,1,0
F,G,i,j,1,k,l,m,1,0
F,G,H,d,1,i,1,1,1,0
F,G,H,d,1,1,i,1,1,0
F,G,i,j,1,1,1,k,1,0
F,G,i,1,j,k,1,1,1,0
F,G,i,1,j,1,k,1,1,0
F,G,i,1,j,1,1,k,1,0
F,G,i,1,1,j,k,1,1,0
F,G,i,1,1,j,1,k,1,0
F,G,1,i,1,j,1,k,1,0


a spacefilling seed
x = 13, y = 8, rule = flashbf8df8
5.A$4.3A$3.5A$2.7A$3.5A$4.3A$5.A!


aesthetic spaceship grid
x = 21, y = 327, rule = flashbf8df8
3.A13.A$2.17A$.19A$21A$.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.A$
2.17A$.19A$21A$.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$.
19A$21A$.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$.19A$21A$
.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$.19A$21A$.19A$2.
17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$.19A$21A$.19A$2.17A$3.A
6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$.19A$21A$.19A$2.17A$3.A6.A6.A$
10.A$10.A$10.A$3.A6.A6.A$2.17A$.19A$21A$.19A$2.17A$3.A6.A6.A$10.A$10.
A$10.A$3.A6.A6.A$2.17A$.19A$21A$.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$
3.A6.A6.A$2.17A$.19A$21A$.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.
A$2.17A$.19A$21A$.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$
.19A$21A$.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$.19A$21A
$.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$.19A$21A$.19A$2.
17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$.19A$21A$.19A$2.17A$3.A
6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$.19A$21A$.19A$2.17A$3.A6.A6.A$
10.A$10.A$10.A$3.A6.A6.A$2.17A$.19A$21A$.19A$2.17A$3.A6.A6.A$10.A$10.
A$10.A$3.A6.A6.A$2.17A$.19A$21A$.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$
3.A6.A6.A$2.17A$.19A$21A$.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.
A$2.17A$.19A$21A$.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$
.19A$21A$.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$.19A$21A
$.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$.19A$21A$.19A$2.
17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$.19A$21A$.19A$2.17A$3.A
6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$.19A$21A$.19A$2.17A$3.A6.A6.A$
10.A$10.A$10.A$3.A6.A6.A$2.17A$.19A$21A$.19A$2.17A$3.A6.A6.A$10.A$10.
A$10.A$3.A6.A6.A$2.17A$.19A$21A$.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$
3.A6.A6.A$2.17A$.19A$21A$.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.
A$2.17A$.19A$21A$.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$
.19A$21A$.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$.19A$21A
$.19A$2.17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$.19A$21A$.19A$2.
17A$3.A6.A6.A$10.A$10.A$10.A$3.A6.A6.A$2.17A$.19A$21A$.19A$2.17A$3.A
13.A!
shouldsee
 
Posts: 406
Joined: April 8th, 2016, 8:29 am

Re: 3-state life-based rules with mobile birth forcers

Postby shouldsee » April 24th, 2016, 3:44 am

In flashbf8df8, seemingly chaotic puffers always stablise/emit repeat patterns after flying a while, thus become a rake/spaceship . I haven't found any spaceships that persist to be chaotic

I am thinking about a script that test spacial combination of moving objects (searching their relative positions) but I am stuck at testing whether the result is significant (i.e. to distinguish puffers/rakes from the others)

I haven't found out a way to turn these wicks into fuses,though ensheathing along wick is common.

exemplar significant constructions
x = 88, y = 307, rule = flashbf8df8
81.2A$82.A$81.A$81.2A$2.2A.A8.A$.A7.A3.A.A65.2A$A2.3B3.A3.A2.A65.A$A.
4B.B8.A64.A$A2.3B3.A3.A2.A64.2A$.A7.A3.A.A$2.2A.A8.A66.2A$82.A$81.A$
81.2A57$2.2A.A8.A67.2A.A$.A7.A3.A.A66.A.2A$A2.3B3.A3.A2.A69.2A$A.4B.B
8.A69.A$A2.3B3.A3.A2.A70.A$.A7.A3.A.A70.2A$2.2A.A8.A67.2A.A$82.A.2A$
80.2A$80.A$7.2A.A8.A61.A$6.A7.A3.A.A59.2A$5.A2.3B3.A3.A2.A60.2A.A$5.A
.4B.B8.A60.A.2A$5.A2.3B3.A3.A2.A$6.A7.A3.A.A$7.2A.A8.A48$2.2A.A8.A$.A
7.A3.A.A$A2.3B3.A3.A2.A$A.4B.B8.A$A2.3B3.A3.A2.A$.A7.A3.A.A$2.2A.A8.A
65.2A.A$80.A.2A$2.2A.A8.A69.2A$.A7.A3.A.A68.A$A2.3B3.A3.A2.A68.A$A.4B
.B8.A67.2A$A2.3B3.A3.A2.A63.2A.A$.A7.A3.A.A64.A.2A$2.2A.A8.A69.2A$84.
A$2.2A.A8.A70.A$.A7.A3.A.A68.2A$A2.3B3.A3.A2.A63.2A.A$A.4B.B8.A63.A.
2A$A2.3B3.A3.A2.A$.A7.A3.A.A$2.2A.A8.A42$2.2A.A8.A$.A7.A3.A.A$A2.3B3.
A3.A2.A$A.4B.B8.A$A2.3B3.A3.A2.A$.A7.A3.A.A$2.2A.A8.A6$80.2A3.2A$80.
2A3.2A2$2.2A.A8.A65.2A3.2A$.A7.A3.A.A64.A.A.A.A$A2.3B3.A3.A2.A65.A.A$
A.4B.B8.A64.2A.A$A2.3B3.A3.A2.A68.2A$.A7.A3.A.A70.A$2.2A.A8.A70.A$85.
2A$86.A$85.A$85.2A3$2.2A.A8.A$.A7.A3.A.A$A2.3B3.A3.A2.A$A.4B.B8.A$A2.
3B3.A3.A2.A$.A7.A3.A.A$2.2A.A8.A48$4.2A.A8.A65.2A.A$3.A7.A3.A.A64.A.
2A$2.A2.3B3.A3.A2.A61.2A$2.A.4B.B8.A61.A$2.A2.3B3.A3.A2.A62.A$3.A7.A
3.A.A62.2A$4.2A.A8.A65.2A.A$82.A.2A$86.2A$86.A$9.2A.A8.A65.A$8.A7.A3.
A.A63.2A$7.A2.3B3.A3.A2.A58.2A.A$7.A.4B.B8.A58.A.2A$7.A2.3B3.A3.A2.A$
8.A7.A3.A.A$9.2A.A8.A4$4.2A.A8.A$3.A7.A3.A.A$2.A2.3B3.A3.A2.A$2.A.4B.
B8.A$2.A2.3B3.A3.A2.A$3.A7.A3.A.A$4.2A.A8.A!


But there is still chaotic behavior considering other objects.(I figured a short period for this pattern. I was wrong and still don't know the period)
x = 107, y = 23, rule = flashbf8df8
28.A5.4A2.A$.2A24.4A2.9A10.A16.3A25.3A$.5A10.3A8.5A.11A.A5.4A13.5A4.
3A.3A13.8A$2.5A3.3A.8A5.5A.10A.4A3.8A2.4A3.5A2.12A2.3A5.3A.5A$2.21A2.
2A.5A.8A.6A2.4A.10A2.5A2.10A.7A3.10A$2.11A.4A.4A2.2A2.4A3.A.3A3.5A3.
7A.6A3.3A3.4A.5A2.A.4A3.4A.6A$.106A$.3A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A
.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.5A.3A
$103A$.3A3.A.A8.10A3.7A3.8A2.3A2.8A3.11A7.5A8.4A$7.3A8.10A4.5A5.6A3.
3A3.6A5.9A9.3A2$7.3A8.10A4.5A5.6A3.3A3.6A5.9A9.3A$.3A3.A.A8.10A3.7A3.
8A2.3A2.8A3.11A7.5A8.4A$103A$.3A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.
2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.5A.3A$.106A$
2.11A.4A.4A2.2A2.4A3.A.3A3.5A3.7A.6A3.3A3.4A.5A2.A.4A3.4A.6A$2.21A2.
2A.5A.8A.6A2.4A.10A2.5A2.10A.7A3.10A$2.5A3.3A.8A5.5A.10A.4A3.8A2.4A3.
5A2.12A2.3A5.3A.5A$.5A10.3A8.5A.11A.A5.4A13.5A4.3A.3A13.8A$.2A24.4A2.
9A10.A16.3A25.3A$28.A5.4A2.A!


A p1512
x = 39, y = 25, rule = flashbf8df8
21.3A$11.3A2.9A4.A$.2A8.9A.5A2.3A5.2A$.5A5.15A2.3A2.5A$2.5A3.27A$2.
19A2.6A.7A$2.11A.4A.A4.A.11A$.37A$.3A.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.
3A$39A$.3A4.8A10.6A3.3A$8.8A11.4A2$8.8A11.4A$.3A4.8A10.6A3.3A$39A$.3A
.2A.2A.2A.2A.2A.2A.2A.2A.2A.2A.3A$.37A$2.11A.4A.A4.A.11A$2.19A2.6A.7A
$2.5A3.27A$.5A5.15A2.3A2.5A$.2A8.9A.5A2.3A5.2A$11.3A2.9A4.A$21.3A!


6c/228 spaceship
x = 39, y = 56, rule = flashbf8df8
4$17.A$16.3A$15.5A$14.A.A.A.A$13.9A$12.3A.A.A.3A$13.9A$14.A.A.A.A$15.
5A$16.3A$17.A$15.A$15.A$15.A15$15.A6.2A$13.2A.A5.2A$13.2A$11.A4.A$11.
A2.3A$11.A4.A$13.3A$14.A!



Wick Stretchers
x = 43, y = 459, rule = flashbf8df8
11.2A11.A$10.A14.3A$9.A4.A5.A5.A.A$9.A.B.B2.3A3.2B2.A.A$9.A7.A3.3B4.A
$10.2A2.B.B.B.2B$12.2A.A.A$14.4A3.A2.A2.2A$24.2A$24.3A$26.A17$17.A4.A
$8.2A.A13.A$7.A9.B4.B3.A$6.A2.17B.A$5.A2.B18.A$5.A.2B.B2.B2.B2.B2.B2.
B.A$5.A2.B17.A$6.A7.3A3.3A$7.A3.A$8.2A10$7.2A.2A12.2A$6.A7.3A3.3A3.A$
5.A2.B18.A$5.A.2B.B2.B2.B2.B2.B2.B.A$5.A2.B18.A$6.A7.3A3.3A3.A$7.A3.A
12.2A$8.2A9$7.2A.2A$6.A7.3A3.3A3.A$5.A2.B$5.A.2B.B2.B2.B2.B2.B2.B$5.A
2.B$6.A7.3A3.3A3.A$7.2A.2A9$7.2A.2A$6.A$5.A2.B5.A$5.A.2B.B2.B.A$5.A2.
B5.A$6.A$7.2A.2A23$6.2A4.A$5.A3.2A2.B$4.A5.A$4.A2.B.B.B.B$4.A5.A$5.A
3.2A2.B$6.2A4.A3$6.2A17.2A2.4A$5.A3.4A11.A8.A$4.A5.A.2A9.A$4.A2.B.B.B
11.A.B.B.B.B$4.A5.A.2A9.A$5.A3.4A11.A8.A$6.2A17.2A2.4A17$11.A4.A17.2A
5.2A$3.2A.3A12.A11.A3.2A3.A$2.A8.B4.B5.A9.A9.A$2.A.17B.A9.A.7B.A$2.A
8.B4.B5.A9.A9.A$3.2A.3A12.A11.A3.2A3.A$11.A4.A17.2A5.2A11$3.2A.2A$2.A
7.B.A$2.A.7B.A$2.A6.B$3.2A.A2.B$8.A.A$9.A8$12.A4.A$3.2A.A14.A$2.A9.B
4.B4.A$2.A.17B.A$2.A7.B4.B4.B.A$3.2A.2A13.A$15.A4.A8$11.2A$4.2A7.A$3.
A3.2A5.A$2.A8.2B$2.A.9B$2.A11.A$3.A3.A3.2A$4.2A19$9.A$8.A.A3.A4.A$3.
2A.A2.B$2.A6.B4.B4.B$.A2.17B$.A.18B$.A10.B4.B$2.A3.A$3.2A7.A4.A5$4.2A
10.A$3.A3.2A$2.A8.B4.B$.A2.17B$.A.18B$.A10.B4.B$2.2A.5A$12.A4.A6$4.2A
.2A$3.A7.A$2.A2.B5.2A$.A2.2B.B2.B$.A.3B5.A$.A$2.A3.3A$3.2A8$4.2A.2A$
3.A$2.A2.B5.2A.2A$.A2.2B.B2.B2.A.2A$.A.3B5.A3.A$.A9.4A$2.A3.3A4.A$3.
2A7$4.2A.2A12.2A$3.A7.3A3.3A3.A$2.A2.B18.A$.A2.2B.B2.B2.B2.B2.B2.B.A$
.A.3B18.A$.A11.A3.3A3.A$2.A3.3A2.2A8.2A$3.2A5$5.2A$4.A3.A12.2A$3.A7.
3A3.3A3.A$2.A2.B18.A$.A2.2B.B2.B2.B2.B2.B2.B.A$.A.3B18.A$.A9.3A3.3A3.
A$2.2A.A15.2A9$5.2A$4.A3.A$3.A7.A$2.A2.B5.2A$.A2.2B.B2.B$.A.3B5.A$.A$
2.A3.3A$3.2A4$7.2A7.A4.A$6.A3.A12.A$5.A10.B4.B$4.A2.16B.A$3.A2.17B.A$
2.A2.B13.B4.A$.A2.2B.B2.B12.A$.A.3B5.2A3.A$.A14.A.A$2.2A.A4$7.2A7.A$
6.A3.A9.A$5.A10.B4.A$4.A2.13B.A$3.A2.14B.A$2.A2.B15.A$.A2.2B.B2.B2.B
2.B2.B.A$.A.3B14.A$.A9.3A3.3A$2.2A.A3$11.A$10.A.A3.A$5.2A.A2.B$4.A6.B
4.B$3.A2.13B$2.A2.B$2.A.2B.B2.B2.B2.B$2.A2.B$3.A2.13B$4.A6.B4.B$5.2A.
A2.B$10.A.A3.A$11.A4$7.2A$6.A3.2A$5.A$4.A2.5B$3.A2.6B$2.A2.B$2.A.2B.B
2.B$2.A2.B$3.A2.6B$4.A2.5B$5.A$6.A3.2A$7.2A6$7.2A$6.A$5.A9.2A$4.A2.3B
7.A$3.A2.4B.B2.B3.A$2.A2.5B9.A$.A2.B$.A.2B.B2.B2.B2.B3.A$.A2.B$2.A2.
5B9.A$3.A2.4B.B2.B3.A$4.A2.3B7.A$5.A9.2A$6.A$7.2A10$10.2A8.A$9.A3.5A
5.A$8.A11.B3.A$7.A2.14B.A$6.A2.3B$5.A2.4B.B2.B2.B2.B$4.A2.5B12.A$3.A
2.B$2.A2.2B.B2.B2.B2.B2.B5.A$.A2.3B$A2.B21.B.A$A.2B.B2.B2.B2.B2.B2.B
2.B.B.A$A2.B21.B.A$.A2.3B18.B.A$2.A2.2B.B2.B2.B2.B2.B2.B.B.A$3.A2.B
18.B.A$4.A2.3B$5.A2.2B.B2.B2.B2.B5.A$6.A2.B$7.A2.5B9.A$8.A2.4B.B2.B2.
B$9.A2.3B$10.A2.11B.A$11.A8.B3.A$12.A3.2A5.A$13.2A10$17.2A$16.A$15.A$
14.A2.2B.A$13.A2.3B.A$12.A2.B4.A$11.A2.2B.B2.A$10.A2.3B4.A$9.A2.B7.A$
8.A2.2B.B2.B2.A$7.A2.3B7.A$6.A2.B10.A$5.A2.2B.B2.B2.B2.A$4.A2.3B10.A$
3.A2.B13.A$2.A2.2B.B2.B2.B2.B2.A$.A2.3B13.A$A2.B16.A$A.2B.B2.B2.B2.B
2.B2.A$A2.B16.A$.A2.3B13.A$2.A2.2B.B2.B2.B2.B2.A$3.A2.B13.A$4.A2.3B
10.A$5.A2.2B.B2.B2.B2.A$6.A2.B10.A$7.A2.3B7.A$8.A2.2B.B2.B2.A$9.A2.B
7.A$10.A2.3B4.A$11.A2.2B.B2.A$12.A2.B4.A$13.A2.3B.A$14.A2.2B.A$15.A$
16.A$17.2A!


A constructed 18c/36 spaceship:
x = 429, y = 137, rule = flashbf8df8
38$106.A$85.2A.A8.A7.3A$84.A7.A3.A.A5.5A15.3A15.3A$83.A2.3B3.A3.A2.A
3.7A13.6A12.5A$83.A.4B.B8.A2.4A.4A11.5A13.7A15.A17.A15.2A16.2A16.2A
16.2A16.2A16.2A16.2A16.2A16.2A16.2A$83.A2.3B3.A3.A2.A3.7A12.5A13.3AC
3A15.3A15.3A13.2A16.2A16.2A16.2A16.2A16.2A16.2A16.2A16.2A16.2A$84.A7.
A3.A.A5.5A13.5A13.9A13.4A14.4A$85.2A.A8.A7.3A15.3A15.8A13.4A14.4A$
106.A37.5A14.3A15.3A$142.A3.2A17.A187.2A$143.2A2.A.A204.2A$144.3A2.A
31.2A170.A$142.A.4A33.3A$106.A34.A2.A.2A34.2A$85.2A.A8.A7.3A34.2A35.A
.2A$84.A7.A3.A.A5.5A13.5A9.2A5.2A9.2A9.3A12.2A$83.A2.3B3.A3.A2.A3.7A
12.2A.A.2A6.A2.A4.2A.3A4.A2.A6.2A$83.A.4B.B8.A2.4A.4A14.A.2A7.2A4.3A.
3A5.2A6.3A.A.A$83.A2.3B3.A3.A2.A3.7A13.A17.A21.A.2A2.A156.2A$84.A7.A
3.A.A5.5A10.4A2.A14.A2.A20.2A161.2A$85.2A.A8.A7.3A33.A2.A22.3A156.A$
106.A34.A.A$124.A.2A13.A65.A$123.2A15.A67.2A$121.2A3.A12.2A.2A63.2A$
121.5A13.2A.2A$124.A19.2A$121.3A17.A2.A154.2A$106.A14.2A19.A3.2A152.
2A$85.2A.A8.A7.3A11.A24.3A152.A$84.A7.A3.A.A5.5A10.A5.2A$83.A2.3B3.A
3.A2.A3.7A9.A7.A.A.A102.A$83.A.4B.B8.A2.4A.4A11.3A4.A.A103.2A$83.A2.
3B3.A3.A2.A3.7A10.2A7.2A103.2A$84.A7.A3.A.A5.5A16.4A$85.2A.A8.A7.3A
11.A5.A$106.A12.A152.2A$120.A.A150.2A$272.A2$261.A$262.2A$261.2A3$
245.2A$246.2A$245.A2$288.A$104.A.A182.2A$90.A12.A184.2A$69.2A.A8.A7.
3A11.A5.A$68.A7.A3.A.A5.5A16.4A$67.A2.3B3.A3.A2.A3.7A10.2A7.2A103.2A$
67.A.4B.B8.A2.4A.4A11.3A4.A.A103.2A$67.A2.3B3.A3.A2.A3.7A9.A7.A.A.A
102.A$68.A7.A3.A.A5.5A10.A5.2A$69.2A.A8.A7.3A11.A24.3A184.A$90.A14.2A
19.A3.2A184.2A$105.3A17.A2.A186.2A$108.A19.2A$105.5A13.2A.2A$105.2A3.
A12.2A.2A63.2A$107.2A15.A67.2A$108.A.2A13.A65.A$90.A34.A.A$69.2A.A8.A
7.3A33.A2.A22.3A188.A$68.A7.A3.A.A5.5A10.4A2.A14.A2.A20.2A193.2A$67.A
2.3B3.A3.A2.A3.7A13.A17.A21.A.2A2.A188.2A$67.A.4B.B8.A2.4A.4A14.A.2A
7.2A4.3A.3A5.2A6.3A.A.A$67.A2.3B3.A3.A2.A3.7A12.2A.A.2A6.A2.A4.2A.3A
4.A2.A6.2A$68.A7.A3.A.A5.5A13.5A9.2A5.2A9.2A9.3A12.2A$69.2A.A8.A7.3A
34.2A35.A.2A$90.A34.A2.A.2A34.2A$126.A.4A33.3A$128.3A2.A31.2A202.A$
127.2A2.A.A236.2A$126.A3.2A17.A219.2A$90.A37.5A14.3A15.3A$69.2A.A8.A
7.3A15.3A15.8A13.4A14.4A$68.A7.A3.A.A5.5A13.5A13.9A13.4A14.4A$67.A2.
3B3.A3.A2.A3.7A12.5A13.3AC3A15.3A15.3A13.2A16.2A16.2A16.2A16.2A16.2A
16.2A16.2A16.2A16.2A16.2A16.2A$67.A.4B.B8.A2.4A.4A11.5A13.7A15.A17.A
15.2A16.2A16.2A16.2A16.2A16.2A16.2A16.2A16.2A16.2A16.2A16.2A$67.A2.3B
3.A3.A2.A3.7A13.6A12.5A$68.A7.A3.A.A5.5A15.3A15.3A$69.2A.A8.A7.3A$90.
A!
Last edited by shouldsee on April 25th, 2016, 2:26 am, edited 1 time in total.
shouldsee
 
Posts: 406
Joined: April 8th, 2016, 8:29 am

Re: 3-state life-based rules with mobile birth forcers

Postby shouldsee » April 24th, 2016, 4:18 pm

Using

3bo$2b4o$b9o$6ob2ob2o$b9o$2b4o$3bo!


as a construction seed (seed1), a dozen of puffers came out in flashbf8df8.

puffers_seed1.rar

Script used is PufferSea2.py
import golly as g
from glife import *
import random
from time import time
def add_ship(x,y):
   ship=g.parse("3bo$2b4o$b9o$6ob2ob2o$b9o$2b4o$3bo!")
   g.putcells(ship, x, y, 1, 0, 0, 1, "or")


def add_ships(x_1,y_1,x_2,y_2):
   g.select([-10,10,20,20])
   g.clear(1)
   g.clear(0)
   add_ship(0,0)
   add_ship(x_1,y_1)
   add_ship(x_1+x_2,y_1+y_2)


def custom_run(numstep,delay=0.1):
   newsecs=time()
   i=0
   while time()-newsecs<delay:
      g.run(1)
      i=i+1
      if i==numstep:
         return True
      newsecs=time()
   trim()
   return False

def popcount(rectcoords=g.getrect()):
   return int(len(g.getcells(rectcoords))/3)

   
def headbox():
   headbox=g.getrect()
   headbox[2]=50
   headbox[1]=headbox[1]-5
   headbox[3]=headbox[3]+10
   return(headbox)

def oscillating():
    global period,popincr,rate
   # return True if the pattern is empty, stable or oscillating

    # first get current pattern's bounding box
    prect = head
    pbox = rect(prect)
    if pbox.empty:
        g.show("The pattern is empty.")
        return True

    # get current pattern and create hash of "normalized" version -- ie. shift
    # its top left corner to 0,0 -- so we can detect spaceships and knightships
    ## currpatt = pattern( g.getcells(prect) )
    ## h = hash( tuple( currpatt(-pbox.left, -pbox.top) ) )

    # use Golly's hash command (3 times faster than above code)
    h = g.hash(prect)

    # check if outer-totalistic rule has B0 but not S8
    # rule = g.getrule().split(":")[0]
    # hasB0notS8 = rule.startswith("B0") and (rule.find("/") > 1) and not rule.endswith("8")

    # determine where to insert h into hashlist
    pos = 0
    listlen = len(hashlist)
    while pos < listlen:
        if h > hashlist[pos]:
            pos += 1
        elif h < hashlist[pos]:
            # shorten lists and append info below
            del hashlist[pos : listlen]
            del genlist[pos : listlen]
            del poplist[pos : listlen]
            # del boxlist[pos : listlen]
            break
        else:
            # h == hashlist[pos] so pattern is probably oscillating, but just in
            # case this is a hash collision we also compare pop count and box size
         
         if (int(popcount(head)) - poplist[pos])==0:
            period = int(g.getgen()) - genlist[pos]
            bighead=head
            bighead[2]=bighead[2]+period
            popincr=int(popcount(bighead))-poplist[pos]
            rate=float(popincr)/float(period)
            if  (period % 2 > 0) :
               return False
            if  period == 1:
               if True:
                  g.show("The pattern is stable.")
               else:
                  show_spaceship_speed(1, 0, 0)
            elif True:
               g.show("Oscillator detected (period = " + str(period) + ")")
            return True
         else:
            # look at next matching hash value or insert if no more
            pos += 1

    # store hash/gen/pop/box info at same position in various lists
    hashlist.insert(pos, h)
    genlist.insert(pos, int(g.getgen()))
    poplist.insert(pos, int(popcount(head)))
    # boxlist.insert(pos, pbox)

    return False

def list_reset():
   global hashlist,poplist,genlist,boxlist
   hashlist=[]
   poplist=[]
   boxlist=[]
   genlist=[]   

g.setrule("flashbf8df8")
trimlim=int(g.getstring("How many trims allowed at most?","3"))

ptn=0
# last is a temporary override to avoid rescanning.
# last=[-9,9,-2,9]
last=[-11]*4
#last=[-9,9,-10,11]
for x_1 in range(-10,0):
   for y_1 in range(9,14):
      for x_2 in range(-10,10):
         for y_2 in range(9,14):
            if x_1<=last[0] :
               if y_1<=last[1]:
                  if x_2<=last[2]:
                     if y_2<=last[3]:
                        continue
            add_ships(x_1,y_1,x_2,y_2)
            list_reset()
            custom_run(50)
            trimnum=0
            head=headbox()
            while trimnum!=trimlim+1 and not oscillating():
               g.show("%i stored, trimnum=%i"%(ptn,trimnum))   
               before=time()
               g.run(2)
               after=time()
               delay=after-before
               
               head=headbox()
               if delay>=0.05:
                  g.select(head)
                  temp=g.getcells(head)
                  g.clear(1)
                  trimnum=trimnum+1
                  list_reset()
                                 
            if trimnum==trimlim+1:
               continue

            else:
               filename=g.getdir("patterns")+"/temp/gppPercent%i_trimnum%i_%s_%s_%s_%s_p%i.rle"%(int(100*rate),trimnum,x_1,y_1,x_2,y_2,period)
               try:               
                  if trimnum==0:
                     add_ships(x_1,y_1,x_2,y_2)
                     g.save(filename,"rle",True)
                  else:
                     g.store(temp,filename,"rle")
                  ptn=ptn+1
               except:
                  g.note("can't store")               
            
            


               



An occasional seed1 spaceship detected.

x = 16, y = 35, rule = flashbf8df8
7.A$6.4A$5.9A$4.6A.2A.2A$5.9A$6.4A$7.A8$4.A$3.4A$2.9A$.6A.2A.2A$2.9A$
3.4A$4.A8$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

Future: Distinguish burning puffers from the stable ones.

Update:
pufferSea3.py is more strict about puffer and burning.

Some exemplar puffers detected:
#CXRLE Pos=-13,0 Gen=144
x = 25, y = 23, rule = flashbf8df8
16.A$15.4A$14.9A$13.6A.2A.2A$14.9A$15.4A$16.A2$3.A$2.4A$.9A$6A.2A.2A$
.9A$2.4A$3.A2$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-13,0 Gen=108
x = 25, y = 25, rule = flashbf8df8
16.A$15.4A$14.9A$13.6A.2A.2A$14.9A$15.4A$16.A2$3.A$2.4A$.9A$6A.2A.2A$
.9A$2.4A$3.A4$8.A$7.4A$6.9A$5.6A.2A.2A$6.9A$7.4A$8.A!

#CXRLE Pos=-18,0 Gen=108
x = 30, y = 25, rule = flashbf8df8
21.A$20.4A$19.9A$18.6A.2A.2A$19.9A$20.4A$21.A2$8.A$7.4A$6.9A$5.6A.2A.
2A$6.9A$7.4A$8.A4$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-23,0 Gen=216
x = 35, y = 29, rule = flashbf8df8
26.A$25.4A$24.9A$23.6A.2A.2A$24.9A$25.4A$26.A2$13.A$12.4A$11.9A$10.6A
.2A.2A$11.9A$12.4A$13.A8$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-13,0 Gen=216
x = 25, y = 26, rule = flashbf8df8
16.A$15.4A$14.9A$13.6A.2A.2A$14.9A$15.4A$16.A2$3.A$2.4A$.9A$6A.2A.2A$
.9A$2.4A$3.A5$5.A$4.4A$3.9A$2.6A.2A.2A$3.9A$4.4A$5.A!

#CXRLE Pos=-15,0 Gen=216
x = 27, y = 26, rule = flashbf8df8
18.A$17.4A$16.9A$15.6A.2A.2A$16.9A$17.4A$18.A2$5.A$4.4A$3.9A$2.6A.2A.
2A$3.9A$4.4A$5.A5$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-13,0 Gen=180
x = 25, y = 26, rule = flashbf8df8
16.A$15.4A$14.9A$13.6A.2A.2A$14.9A$15.4A$16.A2$3.A$2.4A$.9A$6A.2A.2A$
.9A$2.4A$3.A5$9.A$8.4A$7.9A$6.6A.2A.2A$7.9A$8.4A$9.A!

#CXRLE Pos=-19,0 Gen=144
x = 31, y = 26, rule = flashbf8df8
22.A$21.4A$20.9A$19.6A.2A.2A$20.9A$21.4A$22.A2$9.A$8.4A$7.9A$6.6A.2A.
2A$7.9A$8.4A$9.A5$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-19,0 Gen=108
x = 31, y = 27, rule = flashbf8df8
22.A$21.4A$20.9A$19.6A.2A.2A$20.9A$21.4A$22.A3$9.A$8.4A$7.9A$6.6A.2A.
2A$7.9A$8.4A$9.A5$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-16,0 Gen=180
x = 28, y = 26, rule = flashbf8df8
19.A$18.4A$17.9A$16.6A.2A.2A$17.9A$18.4A$19.A2$6.A$5.4A$4.9A$3.6A.2A.
2A$4.9A$5.4A$6.A5$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-13,0 Gen=360
x = 25, y = 25, rule = flashbf8df8
16.A$15.4A$14.9A$13.6A.2A.2A$14.9A$15.4A$16.A2$3.A$2.4A$.9A$6A.2A.2A$
.9A$2.4A$3.A4$10.A$9.4A$8.9A$7.6A.2A.2A$8.9A$9.4A$10.A!

#CXRLE Pos=-20,0 Gen=432
x = 32, y = 25, rule = flashbf8df8
23.A$22.4A$21.9A$20.6A.2A.2A$21.9A$22.4A$23.A2$10.A$9.4A$8.9A$7.6A.2A
.2A$8.9A$9.4A$10.A4$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-13,0 Gen=288
x = 25, y = 24, rule = flashbf8df8
16.A$15.4A$14.9A$13.6A.2A.2A$14.9A$15.4A$16.A2$3.A$2.4A$.9A$6A.2A.2A$
.9A$2.4A$3.A3$6.A$5.4A$4.9A$3.6A.2A.2A$4.9A$5.4A$6.A!

#CXRLE Pos=-16,0 Gen=360
x = 28, y = 24, rule = flashbf8df8
19.A$18.4A$17.9A$16.6A.2A.2A$17.9A$18.4A$19.A2$6.A$5.4A$4.9A$3.6A.2A.
2A$4.9A$5.4A$6.A3$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-13,0 Gen=1008
x = 25, y = 28, rule = flashbf8df8
16.A$15.4A$14.9A$13.6A.2A.2A$14.9A$15.4A$16.A2$3.A$2.4A$.9A$6A.2A.2A$
.9A$2.4A$3.A7$7.A$6.4A$5.9A$4.6A.2A.2A$5.9A$6.4A$7.A!

#CXRLE Pos=-13,0 Gen=216
x = 25, y = 26, rule = flashbf8df8
16.A$15.4A$14.9A$13.6A.2A.2A$14.9A$15.4A$16.A2$3.A$2.4A$.9A$6A.2A.2A$
.9A$2.4A$3.A5$6.A$5.4A$4.9A$3.6A.2A.2A$4.9A$5.4A$6.A!

#CXRLE Pos=-1051,8
x = 50, y = 20, rule = flashbf8df8
40.A$12.A27.2A4.2A$11.4A27.3A3.A$10.9A.4A14.3A.A.A4.A$9.6A.2A.3A2.A
13.A.A.A2.B.B.A$10.9A.4A14.3A.A.A4.A$11.4A27.3A3.A$12.A21.2A4.2A4.2A$
33.A2.A3.A$34.2A2$31.A$3.A27.2A$2.4A27.4A.2A$.9A.4A14.3A.A.A4.A$6A.2A
.3A2.A13.A.A.A2.B.B.A$.9A.4A14.3A.A.A4.A$2.4A27.3A3.A$3.A27.2A4.2A$
31.A!

#CXRLE Pos=-24,0 Gen=252
x = 36, y = 27, rule = flashbf8df8
27.A$26.4A$25.9A$24.6A.2A.2A$25.9A$26.4A$27.A3$14.A$13.4A$12.9A$11.6A
.2A.2A$12.9A$13.4A$14.A5$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-18,0 Gen=864
x = 30, y = 27, rule = flashbf8df8
21.A$20.4A$19.9A$18.6A.2A.2A$19.9A$20.4A$21.A3$8.A$7.4A$6.9A$5.6A.2A.
2A$6.9A$7.4A$8.A5$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-19,0 Gen=1296
x = 31, y = 26, rule = flashbf8df8
22.A$21.4A$20.9A$19.6A.2A.2A$20.9A$21.4A$22.A3$9.A$8.4A$7.9A$6.6A.2A.
2A$7.9A$8.4A$9.A4$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-21,0 Gen=1296
x = 33, y = 25, rule = flashbf8df8
24.A$23.4A$22.9A$21.6A.2A.2A$22.9A$23.4A$24.A2$11.A$10.4A$9.9A$8.6A.
2A.2A$9.9A$10.4A$11.A4$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-25,0 Gen=288
x = 37, y = 26, rule = flashbf8df8
28.A$27.4A$26.9A$25.6A.2A.2A$26.9A$27.4A$28.A2$15.A$14.4A$13.9A$12.6A
.2A.2A$13.9A$14.4A$15.A5$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-13,0 Gen=1008
x = 25, y = 28, rule = flashbf8df8
16.A$15.4A$14.9A$13.6A.2A.2A$14.9A$15.4A$16.A3$3.A$2.4A$.9A$6A.2A.2A$
.9A$2.4A$3.A6$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-13,0 Gen=432
x = 25, y = 30, rule = flashbf8df8
16.A$15.4A$14.9A$13.6A.2A.2A$14.9A$15.4A$16.A3$3.A$2.4A$.9A$6A.2A.2A$
.9A$2.4A$3.A8$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-25,0 Gen=2160
x = 37, y = 26, rule = flashbf8df8
28.A$27.4A$26.9A$25.6A.2A.2A$26.9A$27.4A$28.A3$15.A$14.4A$13.9A$12.6A
.2A.2A$13.9A$14.4A$15.A4$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-689,-5
x = 50, y = 39, rule = flashbf8df8
47.3A2$47.A$48.A$45.3A$19.A24.A.A.A$18.5A2.2A16.A.B2.A$17.11A12.2A2.A
3.A$16.7A.A3.A11.2A2.A2.2A$17.11A14.A3.4A$18.5A2.2A9.2A2.A.A5.A$19.A
15.2A3.A.A2.A2.2A$34.3A2.2A2.3A$34.2A3.A4.A$6.A32.2A$5.5A2.2A24.A2.A$
4.11A8.A13.2A.A$3.7A.A3.A5.2A.2A11.2A.A.A$4.11A8.A16.3A$5.5A2.2A$6.A
3$3.A$2.5A2.2A$.11A8.A13.3A4.2A5.2A$7A.A3.A5.2A.2A17.A2.A2.3A$.11A8.A
20.2A5.2A$2.5A2.2A24.2A$3.A28.A3.A$32.A4.A$32.A3.A$33.A2.A$33.3A13.A$
49.A$46.A$45.A.A$45.A.A$46.A!

#CXRLE Pos=-1089,9
x = 50, y = 21, rule = flashbf8df8
14.A23.2A$13.4A20.A2.A$12.9A.4A4.A7.2A$11.6A.2A.3A2.A2.A.A17.A$12.9A.
4A3.2A$13.4A$14.A$47.3A$25.A21.2A$3.A20.A.A22.A$2.4A17.A3.A$.9A.4A8.A
3.A5.2A3.A10.A$6A.2A.3A2.A7.A3.A5.A4.A9.2A$.9A.4A9.A.A12.A8.2A$2.4A
19.A6.2A4.A$3.A28.2A2.B$36.B.A$33.A2.B$33.A4.A$33.A4.A$35.3A!

#CXRLE Pos=-24,0 Gen=864
x = 36, y = 26, rule = flashbf8df8
27.A$26.4A$25.9A$24.6A.2A.2A$25.9A$26.4A$27.A2$14.A$13.4A$12.9A$11.6A
.2A.2A$12.9A$13.4A$14.A5$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-13,0 Gen=4608
x = 25, y = 28, rule = flashbf8df8
16.A$15.4A$14.9A$13.6A.2A.2A$14.9A$15.4A$16.A2$3.A$2.4A$.9A$6A.2A.2A$
.9A$2.4A$3.A7$9.A$8.4A$7.9A$6.6A.2A.2A$7.9A$8.4A$9.A!

#CXRLE Pos=-13,0 Gen=3240
x = 25, y = 29, rule = flashbf8df8
16.A$15.4A$14.9A$13.6A.2A.2A$14.9A$15.4A$16.A3$3.A$2.4A$.9A$6A.2A.2A$
.9A$2.4A$3.A7$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!

#CXRLE Pos=-13,0 Gen=3240
x = 25, y = 26, rule = flashbf8df8
16.A$15.4A$14.9A$13.6A.2A.2A$14.9A$15.4A$16.A2$3.A$2.4A$.9A$6A.2A.2A$
.9A$2.4A$3.A5$10.A$9.4A$8.9A$7.6A.2A.2A$8.9A$9.4A$10.A!
   
#CXRLE Pos=-13,0 Gen=108
x = 25, y = 25, rule = flashbf8df8
16.A$15.4A$14.9A$13.6A.2A.2A$14.9A$15.4A$16.A2$3.A$2.4A$.9A$6A.2A.2A$
.9A$2.4A$3.A4$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!


pufferSea3.py
import golly as g
from glife import *
import random
from time import time
def add_ship(x,y):
   g.putcells(ship, x, y, 1, 0, 0, 1, "or")


def add_ships(x_1,y_1,x_2,y_2):
   g.select([-10,10,20,20])
   g.clear(1)
   g.clear(0)
   add_ship(0,0)
   add_ship(x_1,y_1)
   add_ship(x_1+x_2,y_1+y_2)


def custom_run(numstep,delay=0.1):
   newsecs=time()
   i=0
   while time()-newsecs<delay:
      g.run(1)
      i=i+1
      if g.empty(): break
      if i==numstep:   return True
      newsecs=time()

   return False

def popcount(rectcoords=g.getrect()):
   return int(len(g.getcells(rectcoords))/3)

   
def headbox():
   headbox=g.getrect()
   headbox[2]=50
   headbox[1]=-40
   headbox[3]=80
   return(headbox)

def oscillating():
    global period,popincr,rate
   # return True if the pattern is empty, stable or oscillating

    # first get current pattern's bounding box
    prect = head
    pbox = rect(prect)
    if pbox.empty:
        g.show("The pattern is empty.")
        return True

    # get current pattern and create hash of "normalized" version -- ie. shift
    # its top left corner to 0,0 -- so we can detect spaceships and knightships
    ## currpatt = pattern( g.getcells(prect) )
    ## h = hash( tuple( currpatt(-pbox.left, -pbox.top) ) )

    # use Golly's hash command (3 times faster than above code)
    h = g.hash(prect)

    # check if outer-totalistic rule has B0 but not S8
    # rule = g.getrule().split(":")[0]
    # hasB0notS8 = rule.startswith("B0") and (rule.find("/") > 1) and not rule.endswith("8")

    # determine where to insert h into hashlist
    pos = 0
    listlen = len(hashlist)
    while pos < listlen:
        if h > hashlist[pos]:
            pos += 1
        elif h < hashlist[pos]:
            # shorten lists and append info below
            del hashlist[pos : listlen]
            del genlist[pos : listlen]
            del poplist[pos : listlen]
            # del boxlist[pos : listlen]
            break
        else:
            # h == hashlist[pos] so pattern is probably oscillating, but just in
            # case this is a hash collision we also compare pop count and box size
         
         if (int(popcount(head)) - poplist[pos])==0:
            period = int(g.getgen()) - genlist[pos]
            bighead=head
            bighead[2]=bighead[2]+period
            popincr=int(popcount(bighead))-poplist[pos]
            rate=float(popincr)/float(period)
            if  (period % 2 > 0) :
               return False
            if  period == 1:
               if True:
                  g.show("The pattern is stable.")
               else:
                  show_spaceship_speed(1, 0, 0)
            elif True:
               g.show("Oscillator detected (period = " + str(period) + ")")
            return True
         else:
            # look at next matching hash value or insert if no more
            pos += 1

    # store hash/gen/pop/box info at same position in various lists
    hashlist.insert(pos, h)
    genlist.insert(pos, int(g.getgen()))
    poplist.insert(pos, int(popcount(head)))
    # boxlist.insert(pos, pbox)

    return False

def list_reset():
   global hashlist,poplist,genlist,boxlist
   hashlist=[]
   poplist=[]
   boxlist=[]
   genlist=[]   
   slist=[]

def fit_if_not_visible():
    try:
        r = rect(g.getrect())
        if (not r.empty) and (not r.visible()): g.fit()
    except:
        # getrect failed because pattern is too big
        g.fit()

g.setrule("flashbf8df8")
trimlim=int(g.getstring("How many trims allowed at most?","3"))
ship=g.parse(g.getstring("RLE string for your seed","3bo$2b4o$b9o$6ob2ob2o$b9o$2b4o$3bo!"))
wd=11
ht=14

wd=13
ht=8
ptn=0
foldername=g.getstring("folder name","temp")
# last=[-9,9,-2,9]
last0=g.getstring("last stopped at?","-50 -50 -50 -50").split()
last=[0]*4
for i in range(4):last[i]=int(last0[i])
# g.note(str(last))
#last=[-9,9,-10,11]
period=0
lowestperiod=int(g.getstring("loweset period to keep?","36"))
slist=[]



def add_section():
   global slist,section,slistold,l
   slistold=slist
   slist+=[0,0,period/2,0]
   l=len(slist)/4   


def map_sections(slist=slist):
   sectionlist=[0]*len(slist)
   for i in range(len(slist)/4):
      if i==0:
         sectionlist[4*i]=head[0]+head[2]
      else:
         sectionlist[4*i]=sectionlist[4*(i-1)]+period/2
      sectionlist[4*i+1]=head[1]
      sectionlist[4*i+2]=period/2
      sectionlist[4*i+3]=head[3]
   return sectionlist

      

def adjust_head():
   old=pattern(g.getcells(g.getrect()))

   
# COMPARRE FLYING INVARIANCE OF S1



def length_puffer(max=10):
   global rate,head
   slist=[]
   snum=0
   add_section()
   g.setgen("0")   
   initial=1
   while int(g.getgen())<max*period:
      head=headbox()   
      sections=map_sections()
      sirect=sections[4*snum:4*(snum+1)]
      # g.note(str(sirect))
      sPt=g.getcells(sirect)
      try:
         hash=g.hash(sirect)
      except:
         g.note("can't hash %s \n sections=%s"%(str(sirect),str(sections)))
      if initial:
         initial=0
      else:
         if snum>=2:
            sim1rect=sections[4*(snum-1):4*(snum)]
            if g.hash(sirect)==g.hash(sim1rect):
               if int(len(g.getcells(sirect))/3)==int(len(g.getcells(sim1rect))/3):
                  snum=snum-1
                  rate=float(int(len(g.getcells(sirect))/3))/float(period)
                  g.select(sirect)
                  g.show("sections="+str(sections))
                  # g.exit()
                  return snum
         if hash==hash_old:
            if int(len(sPt)/3)==int(len(sPt_old)/3):
               snum=snum+1
               add_section()
               initial=1

               continue

      
      sPt_old=sPt
      hash_old=hash
      g.run(period)
      if g.empty():
         break
   return -1





for x_1 in range(-wd,0):
   for y_1 in range(ht,ht*2):
      for x_2 in range(-wd,ht):
         for y_2 in range(ht,ht*2):
            if x_1<=last[0] :
               if y_1<=last[1]:
                  if x_2<=last[2]:
                     if y_2<=last[3]:
                        continue
            add_ships(x_1,y_1,x_2,y_2)
            list_reset()
            custom_run(50)
            trimnum=0
            head=headbox()
            osci=oscillating()

            while trimnum!=trimlim+1 and not osci :
               g.show("%i stored, trimnum=%i, oscillating=%i,period=%i"%(ptn,trimnum,osci,period))   
               fit_if_not_visible()
               before=time()
               g.run(2)
               after=time()
               delay=after-before
               
               if g.empty(): break
               head=headbox()
               osci=oscillating()
               if delay>=0.05:
                  g.select(head)
                  temp=g.getcells(head)
                  g.clear(1)
                  trimnum=trimnum+1
                  list_reset()

            if trimnum==trimlim+1 or g.empty() or period <lowestperiod:
               continue            
            puffer_len=length_puffer()
         
            if puffer_len!=-1:
               filename=g.getdir("patterns")+"/%s/gppPercent%i_puffer%ip_%s_%s_%s_%s_p%i.rle"%(foldername,int(100*rate),puffer_len,x_1,y_1,x_2,y_2,period)
            else:
               filename=g.getdir("patterns")+"/%s/gppPercent%i_burning_%s_%s_%s_%s_p%i.rle"%(foldername,int(100*rate),x_1,y_1,x_2,y_2,period)
            
            try:               
               if trimnum==0:
                  add_ships(x_1,y_1,x_2,y_2)
                  g.save(filename,"rle",True)
               else:
                  g.store(temp,filename,"rle")
               ptn=ptn+1
            except:
               g.note("can't store")               
            
            


               
shouldsee
 
Posts: 406
Joined: April 8th, 2016, 8:29 am

Re: 3-state life-based rules with mobile birth forcers

Postby shouldsee » April 26th, 2016, 5:05 am

A fairly dirty seed1 based breeder producing puffers rather than wickstretchers.
systematic name:gppPercent93_puffer5p_-11_9_-8_10_p72.rle
x = 31, y = 26, rule = flashbf8df8
22.A$21.4A$20.9A$19.6A.2A.2A$20.9A$21.4A$22.A3$11.A$10.4A$9.9A$8.6A.
2A.2A$9.9A$10.4A$11.A4$3.A$2.4A$.9A$6A.2A.2A$.9A$2.4A$3.A!


A 12c/20 surface signal

x = 116, y = 312, rule = flashbf8df8
62.A.2B9.A$62.A.2B.B.3B2.A$69.2B$65.B$67.B$65.B$62.A.2B3.2B$62.A.2B.B
.2B$69.3B2.A$65.B9.A$67.B2.2A2.B.A$65.B4.2A2.B.A$62.A.2B9.A$62.A.2B.B
.3B2.A$69.2B$65.B6.A$67.B3.A$65.B5.A$62.A.2B3.B2.A$62.A.2B.B.2B$69.3B
2.A$65.B9.A$67.B2.2A2.B.A$65.B4.2A2.B.A$62.A.2B9.A$62.A.2B.B.3B2.A$
69.2B$65.B6.A$67.B$65.B5.A$62.A.2B3.2B$62.A.2B.B.2B$69.3B2.A$65.B9.A$
67.B2.2A2.B.A$65.B4.2A2.B.A$62.A.2B9.A$62.A.2B.B.3B2.A$69.2B$65.B$67.
B$65.B$62.A.2B3.2B$62.A.2B.B.2B$69.3B2.A$65.B9.A$67.B2.2A2.B.A$65.B4.
2A2.B.A$62.A.2B9.A$62.A.2B.B.3B2.A$69.2B$65.B6.A$67.B3.A$65.B5.A$62.A
.2B3.B2.A$62.A.2B.B.2B$69.3B2.A$65.B9.A$67.B2.2A2.B.A$65.B4.2A2.B.A$
62.A.2B9.A$62.A.2B.B.3B2.A$69.2B$65.B6.A$67.B$65.B5.A$62.A.2B3.2B$62.
A.2B.B.2B$69.3B2.A$65.B9.A$67.B2.2A2.B.A$65.B4.2A2.B.A$62.A.2B9.A$62.
A.2B.B.3B2.A$69.2B$65.B$67.B$65.B$62.A.2B3.2B$62.A.2B.B.2B$69.3B2.A$
65.B9.A$67.B2.2A2.B.A$65.B4.2A2.B.A$62.A.2B9.A$62.A.2B.B.3B2.A$69.2B$
65.B6.A$67.B3.A$65.B5.A$62.A.2B3.B2.A$62.A.2B.B.2B$69.3B2.A$65.B9.A$
67.B2.2A2.B.A$65.B4.2A2.B.A$62.A.2B9.A$62.A.2B.B.3B2.A$69.2B$65.B6.A$
67.B$65.B5.A$62.A.2B3.2B$62.A.2B.B.2B$69.3B2.A$65.B9.A$67.B2.2A2.B.A$
65.B4.2A2.B.A$62.A.2B9.A$62.A.2B.B.3B2.A$69.2B$65.B$67.B$65.B$62.A.2B
3.2B$62.A.2B.B.2B$69.3B2.A$65.B9.A$67.B2.2A2.B.A$65.B4.2A2.B.A$62.A.
2B9.A$62.A.2B.B.3B2.A$69.2B$65.B6.A$67.B3.A$65.B5.A$62.A.2B3.B2.A$62.
A.2B.B.2B$69.3B$65.B8.A$67.B2.3A.2A$65.B4.3A.2A$62.A.2B8.A$62.A.2B.B.
3B$69.2B$65.B6.A$67.B2.A$65.B3.A$62.A.2B3.A$62.A.2B.B.A$69.A$65.B3.A$
67.B.A$65.B3.A$62.A.2B$62.A.2B.B2.A$69.B.A$65.B3.B.A$67.B2.A$65.B$62.
A.2B$62.A.2B.B$71.A$65.B5.A$67.B$65.B$62.A.2B3.A$62.A.2B.B.A$69.A$65.
B3.A$67.B.A$65.B3.A$62.A.2B$62.A.2B.B2.A$69.B.A$65.B3.B.A$67.B2.A$65.
B$62.A.2B$62.A.2B.B$71.A$65.B5.A$67.B$65.B$62.A.2B3.A$62.A.2B.B.A$69.
A$65.B3.A$67.B.A$65.B3.A$62.A.2B$62.A.2B.B2.A$69.B.A$65.B3.B.A$67.B2.
A$65.B$62.A.2B$62.A.2B.B$71.A$65.B5.A$67.B$65.B$62.A.2B3.A$62.A.2B.B.
A$69.A$65.B3.A$67.B.A$65.B3.A$62.A.2B$62.A.2B.B2.A$69.B.A$65.B3.B.A$
67.B2.A$65.B$62.A.2B$62.A.2B.B$71.A$65.B5.A$67.B$65.B$62.A.2B3.A$62.A
.2B.B.A$69.A$65.B3.A$67.B.A$65.B3.A$62.A.2B$62.A.2B.B2.A$69.B.A$65.B
3.B.A$67.B2.A$65.B$62.A.2B$62.A.2B.B$71.A$65.B5.A$67.B$65.B$62.A.2B3.
A$62.A.2B.B.A$69.A$65.B3.A$67.B.A$65.B3.A$62.A.2B$62.A.2B.B2.A$69.B.A
$65.B3.B.A$67.B2.A$65.B$62.A.2B$62.A.2B.B$71.A$65.B5.A$67.B$65.B$62.A
.2B3.A$62.A.2B.B.A$69.A$65.B3.A$67.B.A$65.B3.A$62.A.2B$62.A.2B.B2.A$
69.B.A$65.B3.B.A$67.B2.A$65.B$62.A.2B$62.A.2B.B$71.A$65.B5.A$67.B$65.
B$62.A.2B3.A$62.A.2B.B.A$69.A$65.B3.A$67.B.A$65.B3.A$62.A.2B$62.A.2B.
B2.A$69.B.A$65.B3.B.A$67.B2.A$65.B$62.A.2B$62.A.2B.B$71.A$65.B5.A$67.
B$65.B$62.A.2B3.A$62.A.2B.B.A$69.A$65.B3.A$67.B.A$65.B3.A$62.A.2B$62.
A.2B.B2.A$69.B.A$65.B3.B.A$67.B2.A$65.B$62.A.2B$62.A.2B.B$71.A$65.B5.
A$67.B$65.B$62.A.2B3.A$62.A.2B.B.A$69.A$65.B3.A$67.B.A$65.B3.A$62.A.
2B$62.A.2B.B2.A$69.B.A$65.B3.B.A$67.B2.A$65.B!


That propagate on this 6/16 surface signal which sends backward pulses .....at 6c/2 ??? Or is that just visual effect?

x = 13, y = 117, rule = flashbf8df8
5$4.3A$3.5A$2.7A$2.7A$2.7A$.9A$.4A.4A$.9A$.9A$2.A.A.A.A$2.7A$2.A.3A.A
$2.3A.3A$4.3A$4.3A$4.A.A$2.7A$.9A$.4A.4A$.9A$2.A.3A.A$2.3A.3A$4.3A$4.
3A$3.2A.2A$.9A$.9A$3.2A.2A$4.3A$4.3A$4.A.A$4.3A$4.3A$4.A.A$4.3A$4.3A$
2.3A.3A$2.7A$2.7A$2.3A.3A$4.3A$4.3A$3.2A.2A$.9A$.9A$3.2A.2A$4.3A$4.3A
$4.A.A$4.3A$4.3A$4.A.A$4.3A$4.3A$2.3A.3A$2.7A$2.7A$2.3A.3A$4.3A$4.3A$
4.A.A$.9A$4.3A$4.A.A$4.3A$2.7A$.4A.4A$2.7A$2.7A$2.3A.3A$2.7A$4.3A$4.A
.A$4.3A$4.3A$4.A.A$2.7A$4.3A$4.A.A$4.3A$4.3A$4.A.A$2.7A$4.3A$4.A.A$4.
3A$4.3A$4.A.A$2.7A$4.3A$4.A.A$4.3A$4.3A$4.A.A$2.7A$4.3A$4.A.A$4.3A$4.
3A$4.A.A$3.5A$3.5A$2.7A$3.5A$4.3A$5.A!
shouldsee
 
Posts: 406
Joined: April 8th, 2016, 8:29 am


Return to Other Cellular Automata

Who is online

Users browsing this forum: No registered users and 5 guests