Catalyst (search program)

From LifeWiki
Jump to: navigation, search

Catalyst is a search program by Gabriel Nivasch. It is similar to ptbsearch, but without the ability to search for transparent catalysts. It was written in C++, and is good for finding new Herschel conduits.

Details

Catalyst uses a depth-first search algorithm, allowing it to exhaustively search the space of all possible catalyses. It can search with a variety of different catalysts, namely the block, eater, eater2, snake, tub, tub-with-tail and boat. It doesn't allow custom catalysts, unlike ptbsearch, so is less flexible. It is also slower than ptbsearch, due to the lack of machine-level optimisation.

Dave Greene created an adaptation, catgl, which detects and removes escaping gliders. This optimisation alleviates the common problem whereby the program systematically tries to place every combination of eater in front of the glider at every timestep, causing the search space to explode. Using this modification, Greene found the boojum reflector in 2001.

Interfacing

Catalyst can either be run from a command-line interface or a batch file. The former is more direct, but the latter is good for performing lots of successive related searches semi-automatically. The input allows the user to specify which catalysts are to be used, the desired initial and final states, how many catalysts to use, and when to place catalysts. The output is in a pictorial format, so that it can be pasted into most Life programs.

A batch file might contain one or more lines like the following, where the contents of a text file are piped into the standard input of the catalyst executable.


test.bat:

catgl < Herschel-to-beehive.txt

The file being piped in should contain lines of text similar to the following example.


Herschel-to-beehive.txt:

y
......................*
......................***
.........................*
........................*1,
.
.
.
.
.
.
.
.........../
............../
.............././
.........../..///
................/
........../
.
......../../
.
....../../
.
..../../
....../
.....
..*1,
...*
***
*
!
n
49
121  
49
2

When run directly with no text file piped in, the catalyst program asks a series of questions, the answers to which can be found on successive new lines of the above text file:

  • Print output to file (y/n)
  • (Please enter the pattern. Use ' ' or '.' for regular dead cells, ',' for fixed dead cells, '*' for fixed live cells, and any other character for regular live cells. Finish the pattern with '!')
  • Customize which catalysts to use (y/n)?
  • Earliest generation for placing catalysts?
  • Latest generation for placing catalysts?
  • How many generations must a catalyst survive?
  • Maximum number of catalysts?

A single line like the one in the sample batch file above can also be entered directly from the command line. The purpose of using a text file is to save a copy of all the parameters and pattern information that would ordinarily have to be re-entered on the command line for every search. A text file can be duplicated and/or edited, so that another search can be made easily after adjustments are made to the text file.