Re: gencols: techniques
Posted: October 3rd, 2014, 2:55 pm
Thanks a lot!
I simply mixed the two files! Why did you choose -tc 30 35?
I simply mixed the two files! Why did you choose -tc 30 35?
Code: Select all
./gencols -pat 3g_collisions.col obj/glider_nw.life -tc x y -gen z -filt 1 -leq 14 -geq 14
Code: Select all
./gencols -pat 3g_collisions.col obj/glider_nw.life -tc x y -gen z -filt 1 -leq 14 -geq 14 -bbox 7_7 -symm diag
I thought about the bounding box, but not the symmetry. But both should be pretty straightforward.chris_c wrote:I think a nice feature would be to be able to further specify the output by bounding box and possibly by symmetry type.
If by "subsequent pies" you mean pies running on the same blinker track, then I would probably write a Golly script. gencols is not good at things like this.HartmutHolzwart wrote:Collide a glider into two subsequent pies, s.t. the pies suvive...
Code: Select all
.......*
.......*
.......*
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
......***
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.......*
.......*
.......*
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
......***
.
.
.
.
.
.
.
.
......***
.......*
.
.***.......***
*.*...***...*.*
*.............*
**.**.....**.**
..*...*.*...*
..***.....***
.
.
.
.
.
......***
.
.
.
.
.
.
.
.
.
.
.
.
.......*
......***
.....**.**
Code: Select all
......***
.
.
.
.
.
.
.
.
......***
.......*
.
.***.......***
*.*...***...*.*
*.............*
**.**.....**.**
..*...*.*...*
..***.....***
.
.
.
.
.
......***
.
.
.
.
.
.
.
.
.
.
.
.
.......*
......***
.....**.**
then I don't have a clue at the moment. Let me see when I'm back at the laptop. What was your gencols command, by the way?HartmutHolzwart wrote:one line missing in the g136-file!!!
Code: Select all
x = 7, y = 8, rule = B3/S23
bo$o2bo$bobo$2b3obo$2bo2bo$2bo2bo$5bo$3b3o!
If I'm searching for a particular "sparky" pattern I usually look for patterns that contain a desired population sub-sequence. First of all I would get all 3G collisions in a file with something like:biggiemac wrote:When trying to collide say, 3 gliders, to form a target active pattern, is it typically better to search for the target pattern directly or for its eventual debris?
More specifically, how would I best go about finding a collision that produces this active pattern, that eventually stabilizes into a block + glider (but not the one with a 6-cell predecessor).Code: Select all
x = 7, y = 8, rule = B3/S23 bo$o2bo$bobo$2b3obo$2bo2bo$2bo2bo$5bo$3b3o!
Code: Select all
./gencols -pat obj/glider_ne.life obj/glider_nw.life -tc 10 13 -nph 4 > 2g.col
./gencols -pat 2g.col obj/glider_se.life -tc 10 25 -nph 4 > 3g.col
Code: Select all
import golly as g
g.setrule("Life")
FILENAME = "/home/user/life/gencols-master/3g.col"
MAX_GENS = 256
wanted = eval(g.getstring("Enter population sequence",
"[7, 8, 10, 12, 14, 18, 16, 19]"))
count=0
offset=0
result=[]
for s in open(FILENAME):
count+=1
if count%100==0:
g.show(str(count))
g.new("Pattern "+str(count))
pat=g.parse(s.replace('!','$').replace('.','b').replace('*','o')+'!')
g.putcells(pat)
pops = []
for n in range(MAX_GENS):
g.run(1)
pops.append(int(g.getpop()))
if pops[-len(wanted):] == wanted:
g.new('')
result += g.transform(pat, offset, 0)
offset += 100
g.putcells(result)
g.fit()
g.update()
g.select(g.getrect())
g.copy()
break
g.new('')
g.putcells(result)
Code: Select all
gcc -O3 -c -o output.o output.c
output.c:24:1: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
outcollisions(pat1,pat2,align,gen,tmp,resultafter,
^
output.c:43:2: warning: implicit declaration of function 'delgen' is invalid in
C99 [-Wimplicit-function-declaration]
delgen(tmp,ALLGENS);
^
output.c:46:9: warning: implicit declaration of function 'copypattern' is
invalid in C99 [-Wimplicit-function-declaration]
copypattern(tmp,pat1,0,0,1);
^
output.c:50:9: warning: implicit declaration of function 'patstring' is invalid
in C99 [-Wimplicit-function-declaration]
patstring(tmp,1,outpatini);
^
output.c:57:4: warning: implicit declaration of function 'genlist' is invalid in
C99 [-Wimplicit-function-declaration]
genlist(tmp,1,resultafter-1);
^
output.c:67:8: warning: implicit declaration of function 'countpat' is invalid
in C99 [-Wimplicit-function-declaration]
if (countpat(tmp,tgen)
^
output.c:69:11: warning: implicit declaration of function 'subpattern' is
invalid in C99 [-Wimplicit-function-declaration]
&& subpattern(pat1gen,tmp,0,0,tgen,tgen,&count)
^
output.c:75:3: warning: implicit declaration of function 'delpattern' is invalid
in C99 [-Wimplicit-function-declaration]
delpattern(remove1,tmp,0,0,ALLGENS,tgen);
^
output.c:108:8: warning: implicit declaration of function 'gensparse' is invalid
in C99 [-Wimplicit-function-declaration]
gensparse(tmp,tgen+per-1);
^
output.c:109:12: warning: implicit declaration of function 'comparegen' is
invalid in C99 [-Wimplicit-function-declaration]
if (comparegen(tmp,tgen,tgen+per,&xshift,&yshift)) break;
^
output.c:114:9: warning: implicitly declaring library function 'strcpy' with
type 'char *(char *, const char *)'
else strcpy(outpatfin,"not_shown");
^
output.c:114:9: note: include the header <string.h> or explicitly provide a
declaration for 'strcpy'
output.c:116:4: warning: implicit declaration of function 'outputpattern' is
invalid in C99 [-Wimplicit-function-declaration]
outputpattern(outpatini,outpatfin,
^
output.c:125:1: warning: control reaches end of non-void function
[-Wreturn-type]
}
^
output.c:127:1: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
setfilters(fstring)
^
output.c:131:1: warning: control reaches end of non-void function
[-Wreturn-type]
}
^
output.c:133:1: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
setlower(lbound)
^
output.c:137:1: warning: control reaches end of non-void function
[-Wreturn-type]
}
^
output.c:139:1: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
setupper(ubound)
^
output.c:143:1: warning: control reaches end of non-void function
[-Wreturn-type]
}
^
output.c:145:1: warning: type specifier missing, defaults to 'int'
[-Wimplicit-int]
outputpattern(patstr1,patstr2,numcells,removefailed,per,xshift,yshift)
^
output.c:156:57: error: non-void function 'outputpattern' should return a value
[-Wreturn-type]
if (numcells<mincells || numcells>maxcells) return;
^
output.c:157:34: warning: implicitly declaring library function 'strchr' with
type 'char *(const char *, int)'
if (removefailed && !strchr(filterstring,'f') ) return;
^
output.c:157:34: note: include the header <string.h> or explicitly provide a
declaration for 'strchr'
output.c:157:61: error: non-void function 'outputpattern' should return a value
[-Wreturn-type]
if (removefailed && !strchr(filterstring,'f') ) return;
^
output.c:158:57: error: non-void function 'outputpattern' should return a value
[-Wreturn-type]
if (per== -1 && !strchr(filterstring,'n') ) return;
^
output.c:159:63: error: non-void function 'outputpattern' should return a value
[-Wreturn-type]
if (per>MAXOSCTEST && !strchr(filterstring,'a') ) return;
^
output.c:163:63: error: non-void function 'outputpattern' should return a value
[-Wreturn-type]
&& (maxmove!=2 || !strchr(filterstring,'s'))) return;
^
21 warnings and 5 errors generated.
make: *** [output.o] Error 1
GalensSlverBook:gencols-master galenmcholbi$
Code: Select all
x = 32, y = 16, rule = B3/S23
15bo6b2o$14bobo6bo$15bo7bob2o3b2o$24bobo4bo$8b2o16bob3o$7bo2bo14b2obo$
8bobo$8b3o$21b3o$21bobo$3bob2o14bo2bo$b3obo16b2o$o4bobo$2o3b2obo7bo$8b
o6bobo$8b2o6bo!
Code: Select all
./gencols -pat p21.life p21s.list -nph 21 -tc 1 22 -gen 43 -del1 -del2 -geq 0 -filt ap > blah.col
Code: Select all
x = 27, y = 43, rule = B3/S23
2o23b2o$bo5bo18bo$2bo4bobo7bobo4bo$b3o4bob2o3b2obo4b3o$b3o2bobob2o3b2o
bobo2b3o$6bo2b2o5b2o2bo$5b4o9b4o2$3b2o17b2o$3b2o2b2o9b2o2b2o$4bo2bobo
7bobo2bo$bo2bobo2bo3bo3bo2bobo2bo$bo4bo3bob3obo3bo4bo$2bobobo4bobobo4b
obobo$4bobo4bo3bo4bobo$2b4o2bobo5bobo2b4o$2b3ob2ob2ob3ob2ob2ob3o$11b5o
$8bobo5bobo$8bob2o3b2obo$13bo$13bo$7b2o14$8b3o$8bo2bo$8bo$8bo3bo$8bo3b
o$8bo$9bobo!
Code: Select all
gencols -pat 3c7.life allss_n.list -nph 7 -tc 1 8 -gen 71 -del1 -filt ap > blah.txt
Code: Select all
diff --git a/defs.h b/defs.h
index 19f11bd..ea7c552 100644
--- a/defs.h
+++ b/defs.h
@@ -17,13 +17,13 @@
/* various constants */
/* MAXCOL, MAXROW, DEFMR, DEFMC obsolete for list code */
-#define MAXCOL 100
-#define MAXROW 100
+#define MAXCOL 800
+#define MAXROW 800
#define DEFMR 20
#define DEFMC 20
-#define MAXLINE 512
-#define MAXPATLEN 8192
-#define DEFAULTHSIZE 1024
+#define MAXLINE 8192
+#define MAXPATLEN 16384
+#define DEFAULTHSIZE 8192
#define NOFORCE -1
#define SPECGEN -1
#define ALLGENS -2
Code: Select all
x = 36, y = 4, rule = B3/S23
2bo30bo$bobo14bo14bobo$o3bo13b2o13b3o$b4o12b2o16bo!
Probably not a bug, but let's see what turns up.gmc_nxtman wrote:I entered the population sequences of the following small patterns and found nothing, despite seeing various examples of these objects being found with the same script elsewhere on the forums, excluding the R-pentomino. It also worked with the default B-heptomino sequence, oddly enough. Am I doing something wrong here, or is it a bug?
Code: Select all
5, 6, 7, 9, 8, 9, 12, 11
Code: Select all
x = 7, y = 9, rule = B3/S23
4bobo$o3b2o$b2o2bo$2o3$5bo$4b2o$4bobo!
Code: Select all
......*!....*.*!.....**!!!!!!.**!*.*!..*!.........**!.........*.*!.........*!
..*!*.*!.**!!!!!!.....**!....*.*!......*!.............**!.............*.*!.............*!
...*!.*.*!..**!!!!!!!!.**!*.*!..*!.........**!.........*.*!.........*!
..*!*.*!.**!!!!!!!!...**!..*.*!....*!...........**!...........*.*!...........*!
...*!.*.*!..**!!!!!!!.**!*.*!..*!.........**!.........*.*!.........*!
..*!*.*!.**!!!!!!!...**!..*.*!....*!...........**!...........*.*!...........*!
..*!*.*!.**!!!!!!!!.**!*.*!..*!.........**!.........*.*!.........*!
.....*!...*.*!....**!!!!!!!.**!*.*!..*!.........**!.........*.*!.........*!
..*!*.*!.**!!!!!!!.**!*.*!..*!.........**!.........*.*!.........*!
..*!*.*!.**!!!!!!!....**!...*.*!.....*!............**!............*.*!............*!
....*!..*.*!...**!!!!!!!!.**!*.*!..*!.........**!.........*.*!.........*!
..*!*.*!.**!!!!!!!!..**!.*.*!...*!..........**!..........*.*!..........*!
....*!..*.*!...**!!!!!!!.**!*.*!..*!.........**!.........*.*!.........*!
..*!*.*!.**!!!!!!!..**!.*.*!...*!..........**!..........*.*!..........*!
.......*!.....*.*!......**!!!!!.**!*.*!..*!.........**!.........*.*!.........*!
.......*!.....*.*!......**!!!!.**!*.*!..*!.........**!.........*.*!.........*!
......*!....*.*!.....**!!!!!!!.**!*.*!..*!.........**!.........*.*!.........*!
.....*!...*.*!....**!!!!!!!!.**!*.*!..*!.........**!.........*.*!.........*!
..*!*.*!.**!!!!!!!!....**!...*.*!.....*!............**!............*.*!............*!
........*!......*.*!.......**!!!!.**!*.*!..*!.........**!.........*.*!.........*!
..*!*.*!.**!!!!!!!.....**!....*.*!......*!.............**!.............*.*!.............*!
..*!*.*!.**!!!!!!!!.....**!....*.*!......*!.............**!.............*.*!.............*!
...*!.*.*!..**!!!!!!!!!.**!*.*!..*!.........**!.........*.*!.........*!
..*!*.*!.**!!!!!!!!!...**!..*.*!....*!...........**!...........*.*!...........*!
..*!*.*!.**!!!!!!!!!.**!*.*!..*!.........**!.........*.*!.........*!
..*!*.*!.**!!!!!!!!!....**!...*.*!.....*!............**!............*.*!............*!
....*!..*.*!...**!!!!!!!!!.**!*.*!..*!.........**!.........*.*!.........*!
..*!*.*!.**!!!!!!!!!..**!.*.*!...*!..........**!..........*.*!..........*!
..*!*.*!.**!!!!!!!!!.....**!....*.*!......*!.............**!.............*.*!.............*!
..*!*.*!.**!!!!!!!!......**!.....*.*!.......*!..............**!..............*.*!..............*!
..*!*.*!.**!!!!!!!......**!.....*.*!.......*!..............**!..............*.*!..............*!
..*!*.*!.**!!!!!!......**!.....*.*!.......*!..............**!..............*.*!..............*!
..*!*.*!.**!!!!!......**!.....*.*!.......*!..............**!..............*.*!..............*!
..*!*.*!.**!!!!......**!.....*.*!.......*!..............**!..............*.*!..............*!
..*!*.*!.**!!!......**!.....*.*!.......*!..............**!..............*.*!..............*!
..*!*.*!.**!!!!!!!!!......**!.....*.*!.......*!..............**!..............*.*!..............*!
..*!*.*!.**!!!!!!!!!!...**!..*.*!....*!...........**!...........*.*!...........*!
..*!*.*!.**!!!!!!!!!!.**!*.*!..*!.........**!.........*.*!.........*!
..*!*.*!.**!!!!!!!!!!....**!...*.*!.....*!............**!............*.*!............*!
..*!*.*!.**!!!!!!!!!!..**!.*.*!...*!..........**!..........*.*!..........*!
..*!*.*!.**!!!!!!!!!!.....**!....*.*!......*!.............**!.............*.*!.............*!
...*!.*.*!..**!!!!!!!!!!.**!*.*!..*!.........**!.........*.*!.........*!