Its purpuse is to search for a way to add simple objects to a pattern in a way that causes it to self destruct.
Get the program here
Prepare a LifeHistory pattern in Golly and save as an .rle-file (an .mc-file will not work).
Use state 1 for still lifes to be destroyed and for the active pattern that initiates the destruction.
Use state 4 for the area where the program is allowed to place still lifes. All cells (in both phases for a blinker) must fit in the red area.
Use state 2 for the rest of the area that the active pattern is allowed to reach during the self destruct.
Run the program from the command line in Windows. It should compile with gcc for other platforms as well. There are two versions: Use destroy256.exe if you have a newer CPU (Inter Haswell or later), or use the somewhat slower destroy128.exe otherwise.
The command line format is:
destroy128 <pattern file> <objects> <max pool size> <max objects>
<objects> is a number of digits representing the type of objects the program may place:
1 = blocks, 2 = hives, 3 = blinkers, 4 = loaves, 5 = boats
<max pool size> describes how wide the search should be. The running time is proportional to this parameter.
<max objects> is the max number of objects the program will place. Currently the program will stop when the first solution is found, so this parameter can just be set to a high enough value.
> destroy128 demonoid.rle 124 5000 32
It happens sometimes that the program will fail to find one particular solution at one setting of <max pool size>, that it found at a lower setting of that parameter. This is a consequence of the search algorithm, and should not be considered a bug.
The cost function of the search is changed for this test release, to work better with larger patterns. It is now based on the size of the minimum spanning tree of the individual objects in the pattern after it has settled.
Here is an example file. Note that this is a rather difficult problem for the program to solve - depending on the search settings it will sometimes fail to make much progress when trying to get rid of the last few objects:
Code: Select all
x = 104, y = 132, rule = LifeHistory 24.36B$23.38B$22.14BA25B$21.15BABA24B$20.16B2A26B$19.46B$18.48B$17. 50B$16.52B$15.54B$14.56B$13.51B2D5B$12.51B4D5B$11.52B5D5B$10.54B5D5B$ 9.37B2A17B5D5B$8.38BA18B6D5B$7.37BABA18B7D5B$6.38B2A13B2A9B3D5B$5.54B 2A10B3D5B$4.67B4D5B$3.30BA4BA32B5D5B$2.21B2A7B2A3B2A26B2A4B6D5B$.22B 2A6B2A3B2A27B2A4B7D5B$32B2A4BA22B2A8B8D5B$33B2A26B2A8B9D5B$72B9D5B$ 18B2D52B10D5B$17B11D44B11D5B$16B12D38B2A4B12D5B$16B12D38B2A4B12D6B$ 16B11D45B12D7B$16B11D11B8D26B12D8B$16B11D11B9D25B12D9B$16B12D11B9D23B 13D10B$16B13D10B10D18B17D11B$16B13D10B10D17B18D12B$16B13D4B2A4B10D17B 18D13B$16B13D4B2A4B10D16B19D14B$16B13D10B10D15B20D15B$16B13D10B9D16B 20D16B$16B13D9B5D22B19D17B$16B14D7B5D24B18D18B$16B25D26B17D19B$16B25D 27B16D20B$16B24D6B2A21B15D20B$16B24D5BABA22B14D20B$16B24D5BA13B2D10B 13D20B$16B24D4B2A13B3D10B12D20B$16B24D19B4D10B11D20B$16B24D20B4D10B 10D20B$16B24D20B4D11B9D20B$16B25D35B8D20B$16B31D30B7D20B$16B31D31B6D 20B$16B31D7B2A23B5D20B$16B25D13B2A7B2A39B$16B24D23BA5B2D33B$16B15D30B ABA5B3D32B$16B14D31B2A6B4D31B$16B14D14B2A22B6D30B$16B14D14B2A22B7D29B $16B14D4B2A31B9D28B$16B14D5BA30B11D27B$16B14D5BABA28B12D26B$16B14D6B 2A29B12D25B$16B14D38B12D24B$16B15D38B12D23B$16B16D38B12D22B$16B17D37B 13D21B$16B18D37B13D20B$16B19D36B13D20B$16B19D36B13D20B$16B19D36B13D 20B$16B18D6B2A29B13D20B$16B18D5BABA28B14D20B$16B18D5BA28B16D20B$16B 18D4B2A25B19D20B$16B18D31B19D20B$16B18D32B18D20B$16B18D32B18D20B$16B 19D31B18D20B$17B19D29B19D20B$18B18D19B2A7B20D20B$19B17D19B2A7B20D20B$ 20B15D12B2A14B21D20B$21B13D14BA14B21D20B$22B12D11B3A15B21D20B$23B11D 11BA17B21D20B$24B10D29B21D20B$25B9D12BA16B21D20B$26B8D11BABA14B22D20B $27B7D11BABA14B22D20B$28B6D9B3AB2A13B22D20B$29B5D8BA19B22D20B$30B4D9B 3AB2A20B15D20B$45BAB2A21B14D19B$70B14D18B$55B2A13B13D18B$55B2A7B2A4B 12D18B$64BA5B11D18B$62BABA5B10D18B$62B2A6B9D18B$69B9D18B$.68B8D18B$2. 66B8D18B$3.39B2A23B8D18B$4.38B2A23B7D18B$5.62B6D18B$6.62B4D18B$7.62B 2D18B$8.80B$9.49BA28B$10.47BABA26B$11.46BABA25B$12.46BA25B$13.46B3A 21B$14.47BA20B$15.66B$16.64B$17.62B$18.60B$19.58B$20.56B$21.54B$22. 52B$23.50B$24.48B$25.46B$26.44B$27.42B$28.40B!