I made program, which allows to search for objects among RLEs of glider gun collection.
It can be useful when smaller object for some particular task is discovered and it makes sense to update gun collection.
For example, in many cases
Charity's p16 allows to get smaller guns than
Rich's p16.
To find, which guns contain Rich's p16, collection can be downloaded to some directory (d:\GliderGunBackup\glider_guns for example) from
https://github.com/Vort/glider_guns and then such command can be executed:
Code: Select all
RleSearch.exe -o richs_p16.rle -d d:\GliderGunBackup\glider_guns\gun -t 16
First parameter specifies which object to search for in LifeHistory format.
Cells with 0 state should be dead, cells with states 1 and 5 should be alive, other states are ignored.
Here is how richs_p16.rle looks like:
Code:
Select all
x = 15, y = 14, rule = LifeHistory
4B.5B.4B$3B3.3B3.3B$B2.3A3B3A2.B$2.A2.BABAB2.A$2.A3.ABA3.A$.A.4AB4A.A
$.2A4.B4.2A$7.B$7.B$5.2AB2A$4.ABABABA$B4.A3BA4.B$3B3.3B3.3B$4B.5B.4B!
(I'm sure dead and ignored cells can be separated better, but search works fine even this way)
Second parameter specifies where gun collection (.rle files in LifeHistory format) is located.
Third parameter specifies for how many ticks each pattern will be simulated
(for searching oscillators this is just their period).
Execution of such command takes a while, because code is not optimized yet, but here is what it prints as a result:
Code: Select all
Loading 2946 patterns... Done
gun_1024 | x = 0 ! 0% | y = 0 ! 0% | t = 6 | o = 4
gun_1072 | x = 56 ! 94% | y = 50 ! 96% | t = 3 | o = 0
gun_1168 | x = 31 ! 47% | y = 55 ! 100% | t = 7 | o = 1
gun_1200 | x = 15 ! 60% | y = 41 ! 100% | t = 7 | o = 1
gun_1216 | x = 26 ! 35% | y = 52 ! 96% | t = 3 | o = 0
gun_1264 | x = 70 ! 100% | y = 48 ! 96% | t = 3 | o = 0
gun_128 | x = 0 ! 0% | y = 1 ! 4% | t = 0 | o = 4
gun_1280 | x = 27 ! 54% | y = 26 ! 96% | t = 5 | o = 5
gun_1392 | x = 4 ! 11% | y = 37 ! 100% | t = 7 | o = 1
gun_1552 | x = 46 ! 88% | y = 57 ! 100% | t = 5 | o = 0
gun_1584 | x = 5 ! 16% | y = 45 ! 100% | t = 7 | o = 1
gun_1632 | x = 1 ! 1% | y = 17 ! 47% | t = 7 | o = 0
gun_1744 | x = 55 ! 96% | y = 33 ! 82% | t = 1 | o = 0
gun_1936 | x = 15 ! 30% | y = 18 ! 32% | t = 5 | o = 4
gun_1968 | x = 56 ! 100% | y = 17 ! 65% | t = 7 | o = 0
gun_2048 | x = 0 ! 0% | y = 1 ! 2% | t = 0 | o = 4
gun_2080 | x = 11 ! 29% | y = 38 ! 88% | t = 5 | o = 0
gun_2160 | x = 13 ! 38% | y = 2 ! 5% | t = 1 | o = 4
gun_2256 | x = 35 ! 100% | y = 39 ! 95% | t = 3 | o = 0
gun_256 | x = 4 ! 12% | y = 1 ! 4% | t = 6 | o = 4
gun_2560 | x = 12 ! 34% | y = 1 ! 2% | t = 7 | o = 5
gun_2816 | x = 26 ! 60% | y = 32 ! 59% | t = 7 | o = 1
gun_2864 | x = 55 ! 100% | y = 38 ! 77% | t = 1 | o = 0
gun_2912 | x = 20 ! 44% | y = 45 ! 90% | t = 5 | o = 0
gun_2960 | x = 3 ! 3% | y = 51 ! 100% | t = 3 | o = 0
gun_3008 | x = 14 ! 35% | y = 27 ! 58% | t = 1 | o = 4
gun_3120 | x = 11 ! 26% | y = 38 ! 100% | t = 3 | o = 0
gun_320 | x = 0 ! 0% | y = 21 ! 91% | t = 7 | o = 0
gun_3328 | x = 27 ! 69% | y = 20 ! 45% | t = 7 | o = 0
gun_3536 | x = 101 ! 100% | y = 29 ! 67% | t = 3 | o = 0
gun_368 | x = 23 ! 100% | y = 22 ! 100% | t = 1 | o = 0
gun_3920 | x = 88 ! 100% | y = 24 ! 64% | t = 7 | o = 0
gun_4096 | x = 4 ! 12% | y = 1 ! 1% | t = 6 | o = 4
gun_4160 | x = 30 ! 73% | y = 38 ! 86% | t = 7 | o = 0
gun_4400 | x = 63 ! 94% | y = 43 ! 100% | t = 5 | o = 4
gun_448 | x = 13 ! 33% | y = 29 ! 93% | t = 7 | o = 0
gun_512 | x = 6 ! 17% | y = 0 ! 0% | t = 0 | o = 4
gun_5120 | x = 27 ! 54% | y = 26 ! 55% | t = 1 | o = 5
gun_5360 | x = 17 ! 36% | y = 72 ! 97% | t = 3 | o = 0
gun_6000 | x = 23 ! 62% | y = 46 ! 100% | t = 1 | o = 5
gun_624 | x = 26 ! 68% | y = 20 ! 90% | t = 3 | o = 0
gun_64 | x = 31 ! 100% | y = 8 ! 88% | t = 2 | o = 5
gun_640 | x = 1 ! 3% | y = 23 ! 65% | t = 7 | o = 0
gun_6768 | x = 58 ! 98% | y = 0 ! 0% | t = 1 | o = 0
gun_6800 | x = 41 ! 77% | y = 87 ! 100% | t = 5 | o = 4
gun_6960 | x = 0 ! 0% | y = 56 ! 94% | t = 5 | o = 4
gun_720 | x = 13 ! 38% | y = 2 ! 10% | t = 1 | o = 5
gun_752 | x = 25 ! 73% | y = 27 ! 100% | t = 1 | o = 4
gun_8000 | x = 0 ! 0% | y = 41 ! 75% | t = 5 | o = 4
gun_8192 | x = 6 ! 17% | y = 0 ! 0% | t = 0 | o = 4
gun_832 | x = 26 ! 68% | y = 20 ! 90% | t = 3 | o = 0
gun_9152 | x = 26 ! 68% | y = 20 ! 33% | t = 5 | o = 0
gun_976 | x = 21 ! 56% | y = 48 ! 100% | t = 3 | o = 0
gun_9840 | x = 64 ! 98% | y = 47 ! 90% | t = 1 | o = 1
54 patterns found
x and y are coordinates of found object, t is simulation tick at which object was found, o is orientation (transformation) index.
Here is binary of this program:
It should work as is for Windows; for Linux, Mono program is needed, however I did not tested RleSearch in Linux yet.
Source code is located in repository
https://github.com/Vort/RleSearch