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

Scripts for building burning helices

For scripts to aid with computation or simulation in cellular automata.

Scripts for building burning helices

Postby codeholic » December 23rd, 2013, 1:45 pm

Here are scripts I wrote for building burning helices:

https://github.com/codeholic/helix

They automate a lot, but not everything. One should glue helix loops together manually.

My acknowledgements go to oblique for his script, that was used to build a database of collisions.
Ivan Fomichev
User avatar
codeholic
Moderator
 
Posts: 1141
Joined: September 13th, 2011, 8:23 am
Location: Hamburg, Germany

Re: Scripts for building burning helices

Postby HartmutHolzwart » January 18th, 2014, 6:21 pm

I have installed strawberry, but can't start the helix script. Perl scripts from Golly do work, but I can't manage to make perl find the directory where I stored the helix.pl script. Any tips?

Thanks in advance!

Hartmut
HartmutHolzwart
 
Posts: 420
Joined: June 27th, 2009, 10:58 am
Location: Germany

Re: Scripts for building burning helices

Postby codeholic » January 18th, 2014, 7:26 pm

helix.pl runs without golly, you can run it from anywhere:
X:\path\to\perl helix.pl [dt] [dx] [dy]

You may want to tune these constants in the script:
my $NO_STRAIGHTS = 1;
my $MAX_FACTOR = 30;
my $MAX_LENGTH = 2;

NO_STRAIGHTS means that it doesn't search for reactions where the glider doesn't change its direction. MAX_FACTOR limits the factor of the helix compared to the given period. MAX_LENGTH is the max number of interactions.

If you're looking for a helix for the caterpillar, you definitely need to set NO_STRAIGHTS to 0, MAX_FACTOR to 6 and MAX_LENGTH to something about 21 (that's the period factor and the length of the original caterpillar's helix, if I remember correctly).
Ivan Fomichev
User avatar
codeholic
Moderator
 
Posts: 1141
Joined: September 13th, 2011, 8:23 am
Location: Hamburg, Germany

Re: Scripts for building burning helices

Postby codeholic » January 18th, 2014, 7:29 pm

Oh, yeah, one more thing. If you want more variation, you might want to change how helix uniqueness is determined:
diff --git a/helix.pl b/helix.pl
index a3691d0..91e96ac 100755
--- a/helix.pl
+++ b/helix.pl
@@ -36,8 +36,7 @@ foreach my $n (1..$MAX_FACTOR) {
sub g {
   my ($c) = @_;
   return ($c->{dx} > 0 ? '>' : '<')
-    . join('-', @$c{'t', 'x', 'y'})
-    . ($c->{f} ? '!' : '');
+    . $c->{id};
}

sub bt {
Ivan Fomichev
User avatar
codeholic
Moderator
 
Posts: 1141
Joined: September 13th, 2011, 8:23 am
Location: Hamburg, Germany

Re: Scripts for building burning helices

Postby HartmutHolzwart » January 20th, 2014, 4:58 pm

What would happen if I try
helix 90 0 -34
?

build-helix still doesn't work for me! Some error with standard perl libs (perl/lib/test), although other Golly test scripts do run.

Rgds,
Hartmut
HartmutHolzwart
 
Posts: 420
Joined: June 27th, 2009, 10:58 am
Location: Germany

Re: Scripts for building burning helices

Postby codeholic » January 21st, 2014, 6:19 pm

I adjusted settings a little bit:
diff --git a/helix.pl b/helix.pl
index a3691d0..12f733d 100755
--- a/helix.pl
+++ b/helix.pl
@@ -13,9 +13,9 @@ memoize('get_turns');
my ($dsn, $user, $password) = ("dbi:SQLite:dbname=$FindBin::Bin/helix.sqlite3", '', '');
my $dbh = DBI->connect($dsn, $user, $password);

-my $NO_STRAIGHTS = 1;
-my $MAX_FACTOR   = 30;
-my $MAX_LENGTH   = 2;
+my $NO_STRAIGHTS = 0;
+my $MAX_FACTOR   = 10;
+my $MAX_LENGTH   = 10;

my $FUZZINESS_STRAIGHTS = 4;
my $FUZZINESS_TURNS     = 0;
@@ -36,8 +36,7 @@ foreach my $n (1..$MAX_FACTOR) {
sub g {
   my ($c) = @_;
   return ($c->{dx} > 0 ? '>' : '<')
-    . join('-', @$c{'t', 'x', 'y'})
-    . ($c->{f} ? '!' : '');
+    . $c->{id};
}

sub bt {

Then I ran helix.pl:
./helix.pl 90 0 -34

and got:
n=1
n=2
n=3
2527:2527:2527:2527:410:2527:2527:2527:2527:410
2527:2527:2527:2527:703:2527:2527:2527:146:1738
2527:2527:2527:2527:703:2527:2527:2527:146:1749
2527:2527:2527:2527:703:2527:2527:2527:4152
2527:2527:2527:2527:1408:2527:2527:2527:146:3890
2527:2527:2527:2527:1413:2527:2527:2527:146:3890
2527:2527:2527:2527:1419:2527:2527:2527:146:3890
2527:2527:2527:2527:1749:2527:2527:2527:2527:5153
2527:2527:2527:2527:1888:2527:2527:2527:2527:3165
2527:2527:2527:2527:1888:2527:2527:2527:2527:3929
2527:2527:2527:2527:2052:2527:2527:2527:2527:5012
2527:2527:2527:2527:2778:2527:2527:2527:2527:5883
2527:2527:2527:2527:3439:2527:2527:2527:2527:4882
2527:2527:2527:2527:3723:2527:2527:2527:2527:2948
2527:2527:2527:2527:3929:2527:2527:2527:3890
2527:2527:2527:2527:4882:2527:2527:2527:2527:3439
2527:2527:2527:2527:5012:2527:2527:2527:2527:5012
2527:2527:2527:2527:5153:2527:2527:2527:2527:1749
2527:2527:2527:2527:5155:2527:2527:2527:2527:2948
2527:2527:2527:2527:5193:2527:2527:2527:2527:2343
2527:2527:2527:3051:1052:2527:2527:2527:2527:4351
2527:2527:2527:3051:2343:2527:2527:2527:146:3165
2527:2527:2527:3051:2343:2527:2527:2527:3890
2527:2527:2527:3051:3165:2527:2527:2527:146:2343
2527:2527:2527:3051:3165:2527:2527:2527:3051:3165
2527:2527:2527:75:2527:2527:2527:2527:248
2527:2527:2527:75:2527:2527:2527:3165
2527:2527:2527:75:2527:2527:2527:4907
2527:2527:2527:75:2527:2527:2527:4932
2527:2527:2527:1624:2527:2527:3051:3051:146:703
2527:2527:2527:2343:2527:2527:2527:3890:1076
2527:2527:2527:2343:2527:2527:2527:3890:1134
2527:2527:2527:2343:2527:2527:2527:3890:1185
2527:2527:2527:2804:2527:2527:2527:5662:703
2527:2527:2527:3036:2527:2527:2527:2527:2056
2527:2527:2527:3890:2527:2527:1076:2527:2343
2527:2527:2527:3890:2527:2527:1134:2527:2343
2527:2527:2527:3890:2527:2527:1185:2527:2343
2527:2527:2527:3890:2527:2527:2527:2527:3929
2527:2527:2527:3890:2527:2527:2527:3051:2343
2527:2527:2527:4134:2527:2527:2527:2527:703
2527:2527:2527:4152:2527:2527:2527:2527:703
2527:2527:2527:4173:2527:2527:2527:2527:703
2527:2527:2527:5681:2527:2527:2527:2527:3165
2527:2527:3051:75:2527:2527:2527:2343
2527:2527:75:2527:2527:2527:2343:1076
2527:2527:75:2527:2527:2527:2343:1134
2527:2527:75:2527:2527:2527:2343:1185
n=4
^C

(I stopped the search with Ctrl+C once I had got enough.)

Then I ran build-helix.pl in Golly and tried helices with the least length, and I found out that 2527:2527:2527:75:2527:2527:2527:3165 fits the best.

After some copy-pasting, I've got the following helix backbone (one would just need to run some gencols searches in order to get rid of debris destroying it and get one or two output gliders instead):
x = 70, y = 69, rule = B3/S23
21bo$20b3o12bo$20bob2o3b3o4b3o12bo$15b2o4b3o3bo2bo3bob2o3b3o4b3o$14bob
o4b2o4bo7b3o3bo2bo3bob2o3b3o7b3o$16bo10bo3bo3b2o4bo7b3o3bo2bo5bo2bo$
27bo3bo9bo3bo3b2o4bo11bo$27bo13bo3bo9bo3bo3bo3bo$28bobo10bo13bo3bo3bo
3bo$42bobo10bo11bo$56bobo5bobo5$60bo$49bo9b3o$35bo12b3o8bob2o$21bo12b
3o4b3o3b2obo9b3o$20b3o4b3o3b2obo3bo2bo3b3o10b3o$13b3o3b2obo3bo2bo3b3o
7bo4b2o10b3o$12bo2bo3b3o7bo4b2o3bo3bo16b2o$15bo4b2o3bo3bo9bo3bo$11bo3b
o9bo3bo13bo$11bo3bo13bo10bobo$15bo10bobo$12bobo4$b3o$o2bo6b3o$3bo5bo2b
o$3bo8bo8bo$obo9bo7b3o12bo$9bobo7b2obo4b3o4b3o12bo$19b3o4bo2bo3b2obo4b
3o4b3o$20b2o7bo3b3o4bo2bo3b2obo4b3o7b3o$25bo3bo4b2o7bo3b3o4bo2bo7bo2bo
$25bo3bo9bo3bo4b2o7bo7bo$29bo9bo3bo9bo3bo7bo3bo$26bobo14bo9bo3bo7bo3bo
$40bobo14bo7bo$54bobo9bobo5$60bo$49bo9b3o$35bo12b3o7b2obo$21bo12b3o4b
3o4bob2o6b3o$20b3o4b3o4bob2o3bo2bo4b3o6b3o$13b3o4bob2o3bo2bo4b3o3bo7b
2o7b3o$13bo2bo4b3o3bo7b2o4bo3bo13b2o$13bo7b2o4bo3bo9bo3bo$13bo3bo9bo3b
o9bo$13bo3bo9bo14bobo$13bo14bobo$14bobo4$b3o$bo2bo5b3o$bo8bo2bo$bo8bo$
2bobo5bo$11bobo!

Maybe there are some modules missing in your Perl distribution? Check if the following modules are installed:
DBD::SQLite
DBI
Memoize
Test::More
Ivan Fomichev
User avatar
codeholic
Moderator
 
Posts: 1141
Joined: September 13th, 2011, 8:23 am
Location: Hamburg, Germany

Re: Scripts for building burning helices

Postby HartmutHolzwart » January 22nd, 2014, 4:23 am

Thanks a lot for your help! I'll have a look at this as soon as I find the time and check whether the modules are actually installed.

Interestingly, the original search

helix 45 0 -17

did'n show any results, but

helix 28 -6 -6

gave quite a few! Only build-helix failed, so I couldn't interpret them correctly.

On a slightly different track: One idea to cut down the original fanout device for the caterpillar would be that the helix already provides some more gliders that could be used as input for the fanout device so that less *WSS would be needed for glider duplication. Would that be feasible? Most welcome would be a glider is emitted approximately halfway through with a timing not too different from teh one that is needed to produce the first 6 gliders that build the first six blinkers.

The length of the caterpillar depends mainly on two factors: The number of up ships that need to be constructed and the length of the forward rake needed to build one *WSS including various "noncoding DNA", i.e. blinker trails that are empty or only filled with adjuster pies.

So efficient helix + fanout is one, flexible rakes are the other.
HartmutHolzwart
 
Posts: 420
Joined: June 27th, 2009, 10:58 am
Location: Germany

Re: Scripts for building burning helices

Postby HartmutHolzwart » January 22nd, 2014, 6:14 pm

this helix looks interesting!

Only HWSS and LWSS and not too dense.

Something went wrong with the last part, though.

Rgds,
Hartmut
HartmutHolzwart
 
Posts: 420
Joined: June 27th, 2009, 10:58 am
Location: Germany

Re: Scripts for building burning helices

Postby codeholic » January 22nd, 2014, 7:00 pm

HartmutHolzwart wrote:Interestingly, the original search

helix 45 0 -17

did'n show any results

Have you changed these settings in the code?
HartmutHolzwart wrote:On a slightly different track: One idea to cut down the original fanout device for the caterpillar would be that the helix already provides some more gliders that could be used as input for the fanout device so that less *WSS would be needed for glider duplication.

That's not always possible, because sometimes fanout devices not only duplicate gliders, but also allow to adjust timing.
Ivan Fomichev
User avatar
codeholic
Moderator
 
Posts: 1141
Joined: September 13th, 2011, 8:23 am
Location: Hamburg, Germany

Re: Scripts for building burning helices

Postby HartmutHolzwart » January 23rd, 2014, 7:54 am

Obviously you cannot get rid of the complete fanout device!

But you could may simplify it a little in terms of *WSS support count, if e.g. the x6 helix could provide one additional glider at approximately the correct time. The you could maybe save one glider duplication.

I'll try to design an example to illustrate the point.
HartmutHolzwart
 
Posts: 420
Joined: June 27th, 2009, 10:58 am
Location: Germany

Re: Scripts for building burning helices

Postby biggiemac » December 30th, 2014, 7:55 pm

I'm running this script to find orthogonal helices that advance at 18c/59 (see current waterbear thread for reasoning), and it's returning 8 options at n=2:

>perl helix.pl 59 0 -18
n=1
n=2
2527:2343:2527:4351
2527:2343:2527:5006
2527:4351:2527:2343
2527:5006:2527:2343
2527:5155:3051:1624
3051:1624:2527:5155
75:2527:5155:3084
2804:2804
n=3
^C


However, when I use build-helix to create these, the dialog in the upper left claims a different velocity for all the helices after the first one. The first shows 118 0 -36, as desired, but the next 7 all claim oblique velocities (e.g., 78 -2 -26 for the 2804:2804). Is one of the steps not working properly?
(Unfortunately, the sparks from the first helix interfere with a second iteration, so I need one of the other options if I'm to make a x2 helix)

For reference, my settings are
NO_STRAIGHTS = 0
MAX_FACTOR = 30
MAX_LENGTH = 22

Thanks,
-Brett
Physics: sophistication from simplicity.
User avatar
biggiemac
 
Posts: 504
Joined: September 17th, 2014, 12:21 am
Location: California, USA

Re: Scripts for building burning helices

Postby codeholic » December 30th, 2014, 8:13 pm

That's right, build-helix.pl is not smart enough yet to adjust a helix to a desired slope. You need to do it manually. Fortunately, it's easy to do. I'm currently working on 2804:2804, looking for a collision that would knock a glider out of the helix. Here is a gliderless variant (if it appears that two LWSS are easier to synthesise than one HWSS, that I doubt, there are plenty of ways to do so):
x = 36, y = 123, rule = B3/S23
23b3o$23bo2bo$18b2o3bo$17bobo3bo$19bo4bobo6$25bo$10bo13b3o$9b3o11b2obo
$9bob2o10b3o5b3o$10b3o11b2o4bo2bo$10b2o21bo$29bo3bo$29bo3bo$33bo$30bob
o3$8b3o$8bo2bo11b3o$2bo5bo13bo2bo$b3o4bo16bo$2obo5bobo13bo$3o19bobo$3o
$3o$b2o3$25bo$10bo13b3o$9b3o12bob2o$8b2obo13b3o3b3o$8b3o14b2o4bo2bo$9b
2o20bo$31bo3bo$31bo3bo$31bo$32bobo3$8b3o$7bo2bo12b3o$2bo7bo12bo2bo$b3o
6bo12bo$bob2o2bobo13bo$2b3o19bobo$2b3o$2b3o$2b2o3$25bo$10bo13b3o$9b3o
11b2obo$9bob2o10b3o5b3o$10b3o11b2o4bo2bo$10b2o21bo$29bo3bo$29bo3bo$33b
o$30bobo3$8b3o$8bo2bo11b3o$2bo5bo13bo2bo$b3o4bo16bo$2obo5bobo13bo$3o
19bobo$3o$3o$b2o3$25bo$10bo13b3o$9b3o12bob2o$8b2obo13b3o3b3o$8b3o14b2o
4bo2bo$9b2o20bo$31bo3bo$31bo3bo$31bo$32bobo3$8b3o$7bo2bo12b3o$2bo7bo
12bo2bo$b3o6bo12bo$bob2o2bobo13bo$2b3o19bobo$2b3o$2b3o$2b2o3$25bo$10bo
13b3o$9b3o11b2obo$9bob2o10b3o5b3o$10b3o11b2o4bo2bo$10b2o21bo$29bo3bo$
29bo3bo$33bo$30bobo3$8b3o$8bo2bo$2bo5bo$b3o4bo$2obo5bobo$3o$3o$3o$b2o!
Ivan Fomichev
User avatar
codeholic
Moderator
 
Posts: 1141
Joined: September 13th, 2011, 8:23 am
Location: Hamburg, Germany

Re: Scripts for building burning helices

Postby biggiemac » December 30th, 2014, 8:18 pm

Okay, glad it's the expected behavior. That looks nice; I had been doing the same thing and the best I could find was using a MWSS and LWSS. Glad a single HWSS does the trick!

Good luck with getting it to release a glider, please keep me posted!
Physics: sophistication from simplicity.
User avatar
biggiemac
 
Posts: 504
Joined: September 17th, 2014, 12:21 am
Location: California, USA

Re: Scripts for building burning helices

Postby codeholic » December 30th, 2014, 8:29 pm

By the way, here is a near miss (if anyone's interested):
x = 38, y = 59, rule = B3/S23
25b3o$25bo2bo$20b2o3bo$19bobo3bo$21bo4bobo6$27bo$12bo13b3o$11b3o11b2ob
o$11bob2o10b3o5b3o$12b3o11b2o4bo2bo$12b2o21bo$31bo3bo$31bo3bo$35bo$32b
obo3$3b3o4b3o$2bo2bo4bo2bo11b3o$5bo4bo13bo2bo$5bo4bo16bo$2bobo6bobo13b
o$24bobo4$b3o$bo2bo$bo25bo$bo10bo13b3o$2bobo6b3o12bob2o$10b2obo13b3o3b
3o$10b3o14b2o4bo2bo$11b2o20bo$33bo3bo$33bo3bo$33bo$34bobo3$3b3o4b3o$3b
o2bo2bo2bo$3bo8bo$3bo8bo$4bobo2bobo5$b3o$o2bo$3bo$3bo$obo!
Ivan Fomichev
User avatar
codeholic
Moderator
 
Posts: 1141
Joined: September 13th, 2011, 8:23 am
Location: Hamburg, Germany


Return to Scripts

Who is online

Users browsing this forum: No registered users and 1 guest