2 ms·
I did a similar thing with our kids' LILLABO set. Except that rather than build from zero, my algorithm was to start with the smallest possible loop (8 curves -
by anthonyb 17y ago
I did a similar thing with our kids' LILLABO set. Except that rather than build from zero, my algorithm was to start with the smallest possible loop (8 curves - a circle) and add similar parts to both sides until the set was used up. The main criteria for the additions was that they had to translate but not rotate, ie. AC or SS and B, although more complex ones are possible, like BCA vs. SCAS. It doesn't seem to make any difference as long as they translate to the same thing.
You should be able to generate all possible loops relatively cheaply, since you're just moving characters around. You might need a separate character for the original circle/curve parts though, to make it possible to find the originals.
I never got around to implementing this - it was just an observation while building interesting tracks for my children, but I might have a go...