mniemiec wrote:One possible way to improve this is to also consider gliders that interact with an object, and track the changes made to the object. For example, any living or dead cells in an object that are struck with green gliders (or anything resulting from a green glider) in a way that alters its normal state are colored green. Similar for red or other colors. If any living or dead cell in the object acquires more than one color, those two colors must be considered one group; otherwise, they can be safely separated.
I've done some experimental rule-building today along these general lines, and I think that that might be pretty close to the simplest algorithm that works reliably. I tried coloring two gliders at a time, to figure out whether they belonged in the same stage or not. Was hoping to get away without having to color the OFF cells different colors as well, but it was easy to find situations where my trial algorithm didn't work.
Your rule nicely handles the common case where two gliders hit each other before the resulting spark hits anything else. As soon as two gliders come into contact, either to cause a cell birth or to inductively suppress one, that cell would immediately be assigned two colors... and therefore those two gliders belong in the same stage and can be assigned one color.
Once all the directly interacting gliders are grouped together, though, I don't quite see how to resolve the next problem. If a target object gets incrementally adjusted several times (which happens a lot these days!) then a single cell might easily be changed twice or more, by two different stages of a long recipe -- turned ON in one stage, then OFF again in the next along with other changes. The two stages can be safely separated, but the algorithm as stated will recommend combining them into one stage.
It almost seems as if the colors should be allowed to fade over time. Maybe only a glider's new-birth cells and new induction cells should be colored, and only for one tick. Let's say anything that goes stable loses its color. If an ON or OFF cell has to acquire two different colors
on the same tick, does that allow a more accurate partition?
In a quick-fade color system, I think a two-colored cell is a sufficient condition to prove that those two colors need to be merged, but it might not be a necessary condition -- and a more complicated rule might be needed to complete the partition.
Time to go hunt for some more good counterexamples...
mniemiec wrote:This might not be true if the period or velocity of the object changes as a result, as in the final step of activating an oscillator or spaceship, but this is easy enough to check - before separating the two groups, see if the result remains the same if one group is applied first, and if not, try swapping them.)
Ow, that's tricky. If an object is starting to move, then with my proposed quick-fade rule, the color is bound to spread through the object somehow: change in Cell 1 causes change in Cell 2 causes change in Cell 3, and so on. Eventually all cells in a moving object will be touched by one color, at least periodically, because otherwise the object isn't moving. Same with all cells of the rotor of an oscillator.
-- Drat. if the color never fades, then if an oscillator is constructed as an intermediate target, all the following stages will get combined into the oscillator-making stage.
Will have to short-circuit that somehow, maybe by checking if the intermediate target is stable mod 30, and killing the cycling colors if so. But it will be good to remember the period, because the algorithm
is correctly indicating that the next stage (at least) has picked up a new mod-N dependency that wasn't there before.
I think that a two-color moving object will turn out to be impossible, if new suppressed-birth cells are colored as well as new birth cells. Not sure how easy it will be to prove that yet.