sed2d.pl - a self-suggesting addition to ptbsearch
Posted: September 12th, 2013, 11:08 am
I've written a quick-and-dirty Perl script for replacing a certain part of a pattern with something else. It is currently tightly coupled with the format used by ptbsearch, but suggestions are welcome.
E. g. you want to search pi-heptomino perturbations. First you create an input file with the pi-heptomino and feed it into ptbsearch as usual:
On the next step, before running survive, you replace the pi-heptomino in patterns, generated in the output file, with a reaction, that produces a pi-heptomino, e. g.
The script is invoked like that
where the 1st argument is the pattern with the pi-heptomino, and the 2nd is the one with the reaction.
Then you run survive as usual.
The point of this script is that you can check more reactions that produce a perturbated object without running ptbsearch multiple times.
I hope the script will be useful. Of course, please report any bugs you find.
E. g. you want to search pi-heptomino perturbations. First you create an input file with the pi-heptomino and feed it into ptbsearch as usual:
Code: Select all
............
............
............
...aaa......
...a........
...aaa......
............
............
............
Code: Select all
............
............
............
.........b..
........b.b.
........b.b.
..aa.....b..
.a.a........
...a........
Code: Select all
./sed2d.pl pi.life pihive.life <ptbs.out >pihive.out 2>sed2d.logThen you run survive as usual.
Code: Select all
./survive a <pihive.out >survive.outI hope the script will be useful. Of course, please report any bugs you find.