spaceship collision script: sscol

For scripts to aid with computation or simulation in cellular automata.
Post Reply
User avatar
2718281828
Posts: 738
Joined: August 8th, 2017, 5:38 pm

spaceship collision script: sscol

Post by 2718281828 » July 6th, 2018, 11:15 am

I worked for a while on a spaceship collision script. It is not finally done, there are still open questions, and the code is not very efficient (my first real python script) but is works somehow.

The main idea was to have a script which runs arbitrary spaceship collisions, esp. for the 3 gliders collisions.
It also works for collisions of any stationary object with spaceships, such as collisions of any non-stable pattern (esp. methuselahs) with spaceships. However, in the latter case the code also creates 'non-valid' outputs as for any non-stationary object have no 'history', but this should be clear.

I extended the script so that it works for arbitrary many objects. However, the range of applications beyond three colliding objects is rather limited (even in Snowflakes for colliding a dot with 3'Gs is not really useful) as the script is not very efficient in the present stage, but is also provides some basic analysis of the collisions.

The script does not have an input interface so far. So if you want to apply it you have to have to change the input string: SSSTRING =["bo$2bo$3o!", "bo$2bo$3o!"]
in line 30. This is at the moment just the input for two glider collisions.
Use e.g. SSSTRING = ["2o$2o!", "b5o$o4bo$5bo$o3bo$2bo!"] for block+MWSS collisions. Any oscillator/still life input should be in the first element in the list. Also the any methuselah type input should be in the first position. For testing purpose I just tried e.g. ["2b2o$2b2o2$bo$b2o$obo!", "bo$2bo$3o!"]
and received (at least) three interesting collisions:

Code: Select all

x = 74, y = 13, rule = B3/S23
34bo$13b2o20b2o$13b2o19b2o$72b2o$12bo26b2o31b2o$12b2o25b2o$11bobo57bo$
b2o35bo32b2o$obo35b2o30bobo$2bo34bobo$65b2o$64bobo$66bo!
(I believe the first one is not known so far (http://codercontest.com/mniemiec/glider-3.htm), a one sided collision of 2G with a block that returns an LWSS). Also the second one might be unknown.

The code will return the output in csv summary files. For illustration I attached the three of the mentioned examples, look at the glider+glider file to get an understanding of it (
glider+glider.csv
2G collisions
(14.46 KiB) Downloaded 391 times
). It saves things like time_to_stability, the final ash. The final ash is also separated into a bounded ash [bash] and an outer ash [oash] (containing escaping objects, puffers/guns/etc. will be cut somewhere). Some details like population counts, the bounding box or the period are provided as well. And a nice feature is that the script returns methuselahs that evolve after a collision (see last 3 columns).

I hope this script (part of the zip) has at least some use. Comments are welcome.
Attachments
sscol.zip
sscol python script + some output examples.
(209.17 KiB) Downloaded 388 times

Post Reply