@chris
1) Okay, the rock version was working great with some testing! I haven't tested much, though...
2) And I think this pull request is has both good and bad points:
https://github.com/ceebo/ptbsearch/comm ... 7c825e949a
Bad: It outputs a bunch of useless "Working with perturber (1 to nperturbs)" when running ptblist.pl.
Still it's good to see the messages in ptb2. I guess the ideal stderr printing options would be different for everybody.
3) Merely converting tabs to eight spaces really makes the code much prettier.
Back to the rock fork, unfortunately I couldn't apply the rock fork to the test suite... You could see why on this
post.
In short, ptbsearch's duplicate filtering algorithm is rather crude, and fails to remove unwanted results like these:
Code: Select all
x = 14, y = 25, rule = B3/S23
b2ob2obo$o4b4o$7o$2o4b2o$b2o2b3obo$o4b2o$6bobo$b2o2b2o$3o3b4o$bo2bo2b
3o5$12bo$11bobo$11bobo$8bo3bo$8b4o2$8b4o$8bo3bo$11bobo$11bobo$12bo!
(The beehive-with-tail-thing can be replaced by an eater.)
I'll try to modify the code myself. If you are interested in the details, read on.
Okay, I think I got a good fix: wrap
these two lines... like this:
Code: Select all
if(restored == 0{
prodcells = cells.ncells - matchcells.ncells;
copyLifeList(&cells, &outcells);
}
I think this is how it works:
According to the readme file: survive outputs the following:
Code: Select all
<input line> <max #generations fixed part is "damaged"[1] and then restored> \
<#generations during last "damaged" period> \
<last generation fixed part was intact> \
<#cells - fixed part> \
<final pattern - fixed part>
And uniq.pl uses the last param as an id to filter out duplicates. That last param simply means "The whole pattern just before the catalyst is demolished - catalyst cells".[2]
Well that does filter out exact duplicates like a block and a transparent block, but it cannot filter out other trivial stator variants like the beehive-with-tail-thing above. All these trivial variants have different sizes and shapes, and thus are demolished in different generations.
Therefore I suggest to change the survive program so that it outputs perhaps, the same (whole pattern - catalyst) except at the generation when the last catalysis is over. I would like to hear what you think regarding this.
[1]Note the wording: "damaged" is not the catalyst being totally wrecked, but rather temporarily damaged and then being restored.
[2]For people who would like to know precisely, the last three params mean:
<last generation ... > simply means just before the catalyst is wrecked.
<#cells - fixed part> is simply the population in that generation.
<final pattern - fixed part> is simply the pattern[/size]