dvgrn wrote:Seems as if catgl, ptbsearch, CatForce, and Bellman would all be good choices for a search. Maybe it would be good to post a quick walkthrough/tutorial on each program, as applied to this problem. I'll write up a catgl input file if someone else will explain one of the other three...!
I don't have ptbsearch right now, but here is a thorough description on how I work with ptbsearch.
If you have problem understanding these, any questions are welcome! (Except for trolling ones...)
NOTE: I would like you to know that these commands are "idiomatic" commands that I used primarily to find patterns that destroy then restore the bait. (e.g. signal transceivers, SGRs, syringes) That means:
1) The code I listed below is not the only way to run ptbsearch, but rather a convenient way to run sequential related commands at once. You could always run each programs seperately, if you like.
2)I haven't used ptbsearch much to find conduits, and I'm not sure if there's a systematic way to filter out interesting partial conduits out of tons and tons of candidates. (Something like "survive a" in the following explanation.) Of course, you can add catalysts and filter out duplicate results when finding conduits, so I guess you could use commands starting with "survive ab" or "ptb2" or "ptblist.pl" in the following explanation.
I would probably use something similar to dvgrn's input.
(partly because I don't have golly right now
)
pitoblock.txt:
(Edited the input pattern)
Code: Select all
..aa.....a.a.a.a.a.a......
a....a...a.a.a.a.a.a......
......a.................bb
a.....a..a.a.a.a.a.a....bb
.aaaaaa...................
.........a.a.a.a.a.a......
.........a.a.a.a.a.a......
And I usually copy the following content and paste it to the terminal.
[1][2]
Warning: I haven't tested the code, and it might not work. Don't blame me if the following code crashes your
computer (although it probably won't) or eats your mouse or whatever.
Ahh, right. You need to have perl installed, and you need to have scorbie.list, pitoblock.txt, ptb2.exe, survive.exe, ptblist.pl, and makematrix.pl in the same directory of the command line. (Which is usually the ptbsearch directory.)
Code: Select all
ptb2 pitoblock.txt scorbie.list 75 1 25 1 > pitoblock2.txt
survive a < pitoblock2.txt | uniq.pl | makematrix.pl > pitoblock2.life
survive ab < pitoblock2.txt | uniq.pl > pitoblock2u.txt
ptblist.pl pitoblock2u.txt scorbie.list 100 > pitoblock21.txt
survive a < pitoblock21.txt | uniq.pl | makematrix.pl > pitoblock21.life
survive ab < pitoblock21.txt | uniq.pl > pitoblock21u.txt
ptblist.pl pitoblock21u.txt scorbie.list 125 > pitoblock211.txt
survive a < pitoblock211.txt | uniq.pl | makematrix.pl > pitoblock211.life
survive a < pitoblock211.txt | uniq.pl > pitoblock211u.txt
Line by line explanation:
(Most of the params are my arbitrary choice, but I made it kinda reasonable.)
Code: Select all
ptb2 pitoblock.txt scorbie.list 75 1 25 1 > pitoblock2.txt
This means "Add two catalysts from scorbie.list, at most one of them transparent, from gens 25 to 75"
pitoblock.txt is the input file, obviously.
scorbie.list is the file that contains the catalysts you want to use.
75 is the last generation a catalyst can touch the reaction
The first
1 is "total number of catalysts -1". So in this case we are using a total of
2 catalysts. Unlike Catgl, ptbsearch only outputs solutions with exactly 2 catalysts.
The second
25 is the first generation a catalyst can touch the reaction.
The third
1 is the maximum number of transparent catalysts.
> pitoblock2.txt means save the output to the file "pitoblock2.txt". Without it, ptb2 will throw results to the console, a.k.a. stdout. (Try it!)
Code: Select all
survive a < pitoblock2.txt | uniq.pl | makematrix.pl > pitoblock2.life
This means "Find anything that restores the block and save it as .life file so that we could view it on Golly!"
You have to know how survive works to understand the command: it runs each the results of ptb2 in Life rule, one by one. And it tries to find patterns that restore cells you specified. How can you specify these cells? Look at the input file. Some "on" cells are marked
a while others are marked
b. You specify one or more characters when running survive (In this case,
a) and survive tries to restore everything
except these characters. So in this case, only cells with b would be restored, which is the initial block. So each word of the command would mean the following:
a is the cells you don't want to restore. You can use a-z and A-Z, so you can put "abc" (without quotes) to exclude cells marked a, b, or c. But you should know that characters * and z are reserved for catalyst cells, so you shouldn't use them.
< pitoblock2.txt means that the program reads input from the file pitoblock2.txt. Survives reads results of ptb2, so you should specify the ptb2 result file here.
| uniq.pl means get the output of survive and feed it in to uniq.pl.
[3] You have to know two things:
The output of survive is the reactions that restore the original block. + Some information about the reaction.
uniq.pl gets the reactions (and the relevant information) and filters out duplicate results. i.e. A transparent block works in everywhere where a normal block would do. uniq.pl eliminates these results.
| makematrix.pl means get the results from ptb2 or survive and convert it into life format. If you look at the text file you would see that there are a lot of as, bs, dots, and exclamation points. This is converted to life format by makematrix.pl.
> pitoblock2.life means to save the output of makematrix.pl to pitoblock2.life. The naming is merely my arbitrary convention. I name intermediate ptb2/survive outputs as .txt extensions (although the standard seems to be .out extensions) and the final results that are viewable by Golly as .life extensions. Now you could see the result of putting two catalysts to the HWSS + Block -> pi explosion. But this would probably have no solutions. What then?
You should add more catalysts! (This is what makes ptbsearch really nice.)
Before you read on, can you guess what the following command means?
Code: Select all
survive ab < pitoblock2.txt | uniq.pl > pitoblock2u.txt
It's kinda tricky. This means "Just filter out duplicate results and save it to pitoblock2u.txt". How does that work?
survive ab means filter out patterns that recovers everything except the ones marked as a or b... But EVERY cell is marked a or b! So this doesn't filter out anything... But this adds additional information about the reaction.
< pitoblock2.txt merely means to get the input from pitoblock2.txt (i.e. the "raw" result by ptb2)
| uniq.pl filters out duplicate results. We cannot use uniq.pl directly (like
uniq.pl < pitoblock2.txt > pitoblock2u.txt) because uniq.pl needs the information generated by survive in order to filter out results. That's why we added survive in the beginning.
> pitoblock2u.txt merely means "save the output file to pitoblock2u.txt". Again the naming is just my arbitrary convention. I named it pitoblock2u.txt because it only contains "unique" reactions.
The line we just examined is not absolutely necessary, but it would make the next search run a little faster as we eliminated duplicate results.
Here's the next line:
Code: Select all
ptblist.pl pitoblock2u.txt scorbie.list 100 > pitoblock21.txt
Hopefully this would be the last unfamiliar command... Everything afterwards are repeating known commands.
ptblist.pl gets a list of input files that need to be perturbed, and adds one catalyst. In this case:
pitoblock2u.txt is the list of the patterns to be perturbed,
scorbie.list is the catalysts to use,
100 is the last generation that a catalyst can be added.
And of course, the output is saved into pitoblock21.txt.
Hence, the command means: "Get all the (unique) 2-catalyst perturbations from the reactions and add another catalyst till gen 100!" (By the way, the catalyst can be transparent.)
Everything afterwards are similar to what we have seen, so let me translate the commands to plain English from the beginning:
Code:
Code: Select all
(1)ptb2 pitoblock.txt scorbie.list 75 1 25 1 > pitoblock2.txt
(2)survive a < pitoblock2.txt | uniq.pl | makematrix.pl > pitoblock2.life
(3)survive ab < pitoblock2.txt | uniq.pl > pitoblock2u.txt
(4)ptblist.pl pitoblock2u.txt scorbie.list 100 > pitoblock21.txt
(5)survive a < pitoblock21.txt | uniq.pl | makematrix.pl > pitoblock21.life
(6)survive ab < pitoblock21.txt | uniq.pl > pitoblock21u.txt
(7)ptblist.pl pitoblock21u.txt scorbie.list 125 > pitoblock211.txt
(8)survive a < pitoblock211.txt | uniq.pl | makematrix.pl > pitoblock211.life
(9)survive a < pitoblock211.txt | uniq.pl > pitoblock211u.txt
Translation:
(1)Catalyze the reaction in pitoblock.txt. Use two catalysts from scorbie.list. At most one of them can be transparent. The catalysts can react from gen 25 to gen 75. Save the output file to pitoblock2.txt.
(2)Find out if there are any reactions that restore the initial block and save it to pitoblock2.life.
(3)Filter out duplicate results and save it to pitoblock2u.txt.
(4)Add one scorbic catalyst that reacts until gen 100. Save it to pitoblock21.txt.
=====This is what we have gone through together=====
(5)Find out if there are any reactions that restore the initial block and save it to pitoblock21.life.
(6)Filter out duplicate results and save it to pitoblock21u.txt.
(7)Add one scorbic catalyst that reacts until gen 125. Save it to pitoblock211.txt.
(8)Find out if there are any reactions that restore the initial block and save it to pitoblock211.life.
(9)Filter out duplicate results and save it to pitoblock211u.txt.
You can see that the last line is not necessary for the current search, just preparing for future searches.
That's all. I hope this would interest more people to ptbsearch (and I especially hope not the other way around...)
There are several nitty gritty details I haven't told you. (If you would like to know what details, then look at the readme file of ptbsearch.) If some things don't work as told, the subtle details would likely be the reason. If you have question, don't hesitate to ask me.
[1]About pasting to the terminal:
On windows < 10, Alt+Space->E->P.
On windows 10, Ctrl+V works!
On linux, you guys would know better than me (Isn't it Shift+Insert?)
[2]I'm doing this way because batch syntax is kinda quirky, and you have to put 'call' thingy in the front to launch multiple programs. This way I can write what I write directly on the terminal.
[3]"AAAA | BBBB" means to pass the output of AAAA to the input of BBBB.