Page 1 of 1
gencols usage
Posted: April 15th, 2012, 2:41 am
by codeholic
I'm trying to learn how to use gencols. Perhaps I don't understand something really basic.
Say, I want to find a collision of Puffer 2 with a spaceship, that would transform it into a spaceship (i. e. finding Ecologist is the expected result).
I've created a pattern puffer2.life
Code: Select all
*..*
....*
*...*
.****
.
.
.
*
.**
..*
..*
.*
.
.
*..*
....*
*...*
.****
Then I've run gencols with
Code: Select all
./gencols -pat obj/puffer2.life obj/allss_e.list -nph 4 -tc 2 21 -gen 21 -genafter 20 -filt s | ./makematrix
But gencols couldn't find anything. What am I doing wrong?
Re: gencols usage
Posted: April 15th, 2012, 7:21 am
by codeholic
Having analyzed gencols' source code, I concluded, that it uses "spaceship" sensu stricto. I modified the source code so that it traced periodic patterns up to the 20th generation
Code: Select all
--- ../../gencols/output.c 2012-04-15 11:12:57.708179920 +0200
+++ ./output.c 2012-04-15 13:01:04.882425235 +0200
@@ -62,7 +62,7 @@
}
#endif
-#define MAXOSCTEST 4
+#define MAXOSCTEST 20
removefailed=0;
if (countpat(tmp,tgen)
==countpat(pat1gen,tgen)+countpat(pat2gen,tgen)
@@ -157,7 +157,7 @@
if (removefailed && !strchr(filterstring,'f') ) return;
if (per== -1 && !strchr(filterstring,'n') ) return;
if (per>MAXOSCTEST && !strchr(filterstring,'a') ) return;
- if (per>=1 && per <=4 && !strchr(filterstring,'p') &&
+ if (per>=1 && per <= MAXOSCTEST && !strchr(filterstring,'p') &&
!strchr(filterstring,'0'+per)
&& (maxmove!=1 || !strchr(filterstring,'g'))
&& (maxmove!=2 || !strchr(filterstring,'s'))) return;
Then I ran it with
Code: Select all
./gencols -pat obj/puffer2.life obj/allss_e.list -nph 4 -tc 2 21 -gen 21 -genafter 20 -filt p
This way I got 2 widely known versions of Ecologist (one LWSS-based and another MWSS-based) and yet another spaceship with a different spark
Code: Select all
x = 25, y = 18, rule = B3/S23
21b4o$20bo3bo$24bo$20bo2bo2$18b2o$17b5o$10bob3o2bo4bo$8b2o3bo3b3o2bo$
8bobo7bo2b2o$8bob2o7b2o$o8b2o2$11bo2bo$15bo5b4o$11bo3bo4bo3bo$12b4o8bo
$20bo2bo!