wwei23 wrote: ↑December 30th, 2020, 6:30 pm
Sure. I still don't know how to use CatForce and I don't understand the documentation, so please it explain it to me.
MathAndCode wrote: ↑December 30th, 2020, 6:32 pm
I don't know much how it works either; that's why I wanted someone who uses and understands it to write the explanation.
Sure.
In broad strokes, CatForce takes a given pattern and the bounding box/time restrictions you want to apply, and then tries a list of catalysts on that pattern. CatForce knows nothing about how the catalysts work, or even if they
do work--it just checks to see if they get restored at any point, even if it's obvious that they won't. It tries every possible location of every possible combination of catalysts within the bounding box that you specify.
Of course, the input file contains the subtle details, and you have to fiddle with those to tell the program what to do. Here's an example of an input file which contains some quirks that I often use in my inputs, so I can explain them. We'll call this file "H-example.in".
Code: Select all
max-gen 250
start-gen 45
last-gen 120
num-catalyst 1
stable-interval 5
search-area -20 -20 40 35
combine-results yes 3 3 10 20
fit-in-width-height 20 20
pat o18bo$obo15bobo$3o15bo2bo$2bo$12b2o$10b3o2bobo$9bobo4bobo$9bo8bo$8b2o8b2o! -10 15
output H-example.rle
filter 50-60 4b2o$2bo2bo$bob2o$bo$2o! -2 19
filter 60 bo$obo$bo! 8 15
=Catalysts=
cat 2o$2o 100 0 0 .
cat 2o$o$b3o$3bo! 40 -2 -2 * forbidden 2o$o$b3ob2o$3bobobo$6bo! -2 -2 forbidden bo$obo$2o2$2o$o$b3o$3bo! -2 -6 forbidden bo$2bo$3o2$3b2o$3bo$4b3o$6bo! -5 -6 forbidden 2bo$obo$b2o2$3b2o$3bo$4b3o$6bo! -5 -6
cat bo$obo$obo$bo 100 -1 -2 /
cat b2o$o2bo$bobo$2bo 100 -2 -2 +
cat bo$obo$bo 100 -1 -1 .
cat 2o$obo$bo 100 -1 -1 +
cat 2o$obo$b2o 100 -1 -1 |
I don't actually remember what
max-gen does, but IIRC, CatForce doesn't bother to generate the pattern beyond this maximum number of generations. I always set max-gen to at least last-gen + 100*num-catalyst.
start-gen is the first generation in which catalysts are allowed to react with the input pattern.
last-gen is, similarly, the last generation.
num-catalysts is one of the most important parameters in the program. For the sake of examples, let's assume you're using a block, beehive, and fishhook as your catalyst list. At "1", CatForce tries every possible placement of block, then every beehive, then every fishhook. Only one catalyst is ever run past the pattern at a time. A 1-catalyst search usually only lasts a few seconds at most. At "2", CatForce tries two catalysts at once--every combination of two blocks, every combination of block + beehive, every block + eater, every two beehives, every beehive + eater, and every two eaters. At "3" CatForce tries three catalysts at once. You see how this combinatorially explodes. "2" is the sweet spot.
stable-interval: When CatForce notices that a catalyst has restored itself after an interaction, it checks to see if it survives this many generations thereafter before it's willing to call that restoration a success.
search-area: For the four numbers thereafter--w, x, y, and z--this tells CatForce to place the catalysts in a y-by-z bounding box, with the upper left corner at (w,x). CatForce does all its work on a 64x64 grid, so try to avoid going further away than 30 cells from the origin in any direction, or the results will come out all wraparoundy.
combine-results yes: This line tells Catforce to try layering some results over one another to see if that's a new solution. e.g. if a 1-catalyst solution finds that a block works near the top of a reaction, and also that an eater works way off to the left, combine-results tells CatForce to try that block and that eater together and see if it still works--even though that's technically 2 catalysts instead of the 1 you specified.
The numbers thereafter act like the
stable-interval argument again--in our example, the first round of combined results have to survive for three generations before CatForce accepts that they've survived, and then the next round (when it's further combining those 2-catalyst results) has to survive 3, followed by 10, followed by 20. Every subsequent round inherits from the 20. Finally, when all is said and done, CatForce checks all of these good combinations one last time against the actual
stable-interval parameter. Since stable-interval is less than the 20 required for the last round of combined-results, everything makes it through. Cat-Force usually goes through somewhere between 2 and 9 rounds of combinations before it runs out of ways to combine things.
combine-results yes doesn't take very long, and is almost always worth putting in your search, but it rarely actually does anything if you're going with num-catalyst 3+.
fit-in-width-height basically tells CatForce not to bother placing two blocks at opposite ends of the bounding box during its brute-forcing. It's only useful when num-catalyst 2+, and is particularly handy for 3+. Even though Catforce will try to place catalysts everywhere within the
search-area, any given combination of catalysts can't be farther apart than the smaller bounding box of
fit-in-width-height. This narrows the search space a lot. CatForce stops caring about this when it gets to the
combine-results yes phase, which is a good thing.
pat is the pattern you're running all these catalysts by, in RLE format without a header. The numbers at the end are the location of the upper left corner of the pattern.
You'll notice that the
pat I use has some predecessors of catalysts already in it--i.e., this is a partial for a conduit, and I want CatForce to help me place more catalysts down the line. I use predecessors of the catalysts that ready belong in the partial because CatForce tries
every catalyst placement within the bounding box you specify. It's totally possible that it places a tub right on top of a tub in your partial, if the bounding box reaches that far, and then CatForce will report that as a successful placement. This is particularly annoying with
combine-results yes, because then it will show you Valid Eater Placement #16, but it will also show you Valid Eater Placement #16 Combined With Tub That Was There To Begin With, which look identical.
output is the output file name. You'll get a bunch of extra outputs if you use
combine-results yes, and the one with 'Final' in its name will be the one you want.
filter is, well, a filter. "50-60 4b2o$2bo2bo$bob2o$bo$2o! -2 19" Means that, anytime between generations 50 and 60, 4b2o$2bo2bo$bob2o$bo$2o! must show up with its upper left corner at (-2,19). You can also use a single number for the desired generation. I often use this to check for bait restoration or to ensure that a partial conduit hasn't blown itself up.
=Catalysts= is a comment, because there's a special character at the beginning. CatForce doesn't read it as an argument.
Then there are a lot of
cat lines that contain the actual catalysts. "cat" is always followed by an RLE, much like with
pat; the RLE contains the actual block or eater or whatever. Then three arguments: the maximum recovery time, the x and y offsets, and the object's symmetry.
- I like to set recovery time to 100 for Spartan objects, but you can and should lower it to the longest reasonable recovery time for non-transparent objects.
- X and Y offsets have a bug where you have to input them as negative numbers. The purpose of these is to tell CatForce where the center of the catalyst is, so it has an easier time of computing whether something 'fits' in a bounding box or not. Generally, just halve the x and y dimensions of the catalyst and input those as negative numbers. It doesn't matter that much.
- Under rotations and reflections, there are 8 possible ways to place a catalyst. It really saves on computation if a catalyst is symmetric, though, so you can tell CatForce what a catalyst's axes of symmetry are in order to lighten the load. Each symmetry option uses its own symbol. * for no axes, . for all axes, + for a single diagonal or orthognal axis (i.e. just spin it 90 degrees four times), | for two diagonal axes, / for two orthogonal axes, or x for 180 degree rotational symmetry.)