Interesting puzzle. I spent most time on the meta-puzzle: to figure out a set of patterns that covers all possible values and that is easy to detect and generate. For the implementation, I had to find a high-speed look-up table design, because the normal design was exactly 1 tick too slow

For Ais: After comparing your solution and mine, I noticed that you use a different set of patterns than I do. As a result, I think it should actually be possible to distinguish between all 16 values, not just 15. It would be cool to see a "Torch 2" puzzle in which you need to transfer an arbitrary crate with the same mechanism.

For Ais: After comparing your solution and mine, I noticed that you use a different set of patterns than I do. As a result, I think it should actually be possible to distinguish between all 16 values, not just 15. It would be cool to see a "Torch 2" puzzle in which you need to transfer an arbitrary crate with the same mechanism.

Looking at it, what's happening is that we both found a way to read the value three times in four cycles. I do it by blocking one side of the gate so that the barrel stays there until the cycle after with one possible input value, which lets me distinguish 9991 from 9911 and 9999, and 1119 from 1111 and 1199. Meanwhile, you do it by placing a different barrel there on the fourth cycle, letting you distinguish EE00, EE0E, EEE0, EEEE, but presumably at the cost of being able to distinguish 000E from 0000. I guess the problem more generally is that taking values off the gate, and putting values on the gate, interfere with each other, especially as we need to do the three-way check of low, high, or nothing on the first cycle.

If there's a way to do it, I guess it uses a setup like yours, and somehow ensures that both ports of the adder have something on them on the third cycle regardless of whether the barrel was pushed to the left or right on the second. I think we could actually do this if we had access to the bottom of the mechanism, but we don't; the other possibility would be to try to communicate that the barrel was pushed to the right in one cycle, which likewise seems impossible. So I'm a little out of ideas for combining the techniques right now.

Perhaps it's for the best; we might end up with a six-cycle glass floor or something else ridiculous like that, otherwise…

Looking at it, what's happening is that we both found a way to read the value three times in four cycles. I do it by blocking one side of the gate so that the barrel stays there until the cycle after with one possible input value, which lets me distinguish 9991 from 9911 and 9999, and 1119 from 1111 and 1199. Meanwhile, you do it by placing a different barrel there on the fourth cycle, letting you distinguish EE00, EE0E, EEE0, EEEE, but presumably at the cost of being able to distinguish 000E from 0000. I guess the problem more generally is that taking values off the gate, and putting values on the gate, interfere with each other, especially as we need to do the three-way check of low, high, or nothing on the first cycle.

If there's a way to do it, I guess it uses a setup like yours, and somehow ensures that both ports of the adder have something on them on the third cycle regardless of whether the barrel was pushed to the left or right on the second. I think we could actually do this if we had access to the bottom of the mechanism, but we don't; the other possibility would be to try to communicate that the barrel was pushed to the right in one cycle, which likewise seems impossible. So I'm a little out of ideas for combining the techniques right now.

Perhaps it's for the best; we might end up with a six-cycle glass floor or something else ridiculous like that, otherwise…

The main thing I realized by analyzing your solution for The Torch, is that you used the right side better. In my solution, when the first barrel moves to the right, I remove the barrel after it has moved. That means the machine can only detect two patterns after that: move left or right on the 3rd tick. You, however, keep the barrel there, enabling detection of an extra pattern: move left on 3, move left on 4, or not move at all.

You do the same thing when the first barrel moves left, giving you detection of one extra pattern there as well. In my solution, however, the trick with the adder gives two extra patterns, 4 in total: (1) move right on 3 and move left on 4, (2) move right on 3 and not move on 4, (3) not move on 3 and move right on 4, and (4) not move at all.

Therefore combining my left side with your right side would give the possibility to detect an extra pattern for the total solution.