There was speculation in another thread about why simsim's B->B conduit was not found by ptbsearch some time ago so I thought I would investigate.
I was working on the version of the code found
here. My conclusion is that ptbsearch (or this version of ptbsearch at least) is not very good at adding transparent catalysts if the transparent catalyst is not the last catalyst to be activated.
For example, let's look at simsim's B->B:
Code: Select all
x = 25, y = 24, rule = LifeHistory
17.2B$16.4B$16.4B$15.6B2.B$15.2B2A2B.B2A$11.B.3BA2BA3B2A$5.2B3.7B2A2B
.2B$2.D18B$.2D17B$2D18B$.2D17B$2.19B$5.B2.13B.B$8.12B.B2A$8.9BC4B2A$
9.7B3CB.2B$9.6B2C2BC$10.10B$14.6B$14.5B$14.6B$15.4B$15.4B$16.2B!
The beehive is last intact at generation 13 and then the second block becomes active at generation 30, thus our catalysts are damaged for 17 generations before the second block is added.
Now, let's look at the code.... the function placeNewPerturbor in analyze.c
here has an input parameter "maxdamage" that specifies how long the current catalysts can be damaged for before giving up adding new ones.
In ptbsearch2.c we
see that placeNewPerturbor is called with maxdamage = 5 so there is no hope that the second block gets placed.
Indeed, if we set maxdamge = 17 and recompile then ptbsearch is able to find simsim's conduit. I made some example input files and minimal command line settings in a commit
here.
Other examples I looked at are Conduit 1:
Code: Select all
x = 22, y = 30, rule = LifeHistory
$13.B$12.3D$12.BDB$11.3D2B$11.5B$10.6B$10.6B$11.5B$11.6B$10.6B$10.7B$
11.6B$11.6B$11.6B$10.8B$9.8B$9.9B$9.9B$8.10B$8.3B2A5B$7.4B2A5B$7.11B$
2.2A.A7BA4B$2.A.2A2.4B3AB$9.2B2A2BA$11.3B$11.2B!
Here the block is intact at generation 1 and the interaction with the snake begins at generation 32. So maxdamage is required to be 31.
The final example is this R->H:
Code: Select all
x = 25, y = 24, rule = LifeHistory
2$5.2B2.2B2.B$3.D11B$.DBD12B2.B$B3D9B2AB.B2A$.D11B2A3B2A$3.14B.B$8.B.
7B$11.7B$11.8B$11.8B$10.8B.3B$10.12B$7.2B.11B2A$6.2A7BA5B2A$6.2AB.4B
3A3B.B$7.B2.3B.A5B$10.9B$9.4B$8.4B$7.4B$7.3B!
The first two catalysts are both alive at generation 24 and the interaction with the third block begins at generation 35. So maxdamage needs to be 11, I believe. I would appreciate it if anyone was willing to check the veracity of these examples.
Now, all this stuff with maxdamage felt a bit wrong: if a catalyst is supposed to be transparent then it shouldn't matter how long it is damaged for, and certainly 5 generations of damage is too low. So I implemented an alternative test: stop adding catalysts only if one of the permanent cells (i.e. a '*' cell) of a catalyst has died. My implementation of that is
here. It seems to work on all of the above examples but it still definitely needs more testing. Does anyone have any suggestions for interesting searches to run?
Finally, my compiler gave a warning about an uninitialised variable in the function "restored" so I also made
this patch.