Smart Splitter Experiments

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
eugenekay
Filter Inserter
Filter Inserter
Posts: 726
Joined: Tue May 15, 2018 2:14 am
Contact:

Smart Splitter Experiments

Post by eugenekay »

Continued from Splitter gives one side priority when both circuit conditions are true (which is "Not a Bug")
boskid wrote: Mon Sep 22, 2025 9:03 pm
robot256 wrote: Mon Sep 22, 2025 8:53 pm So the truth table is:
If you want a truth table for the "set input side", it is as follows:
09-22-2025, 23-03-21.png
09-22-2025, 23-03-21.png (8.83 KiB) Viewed 285 times
robot256 wrote: Mon Sep 22, 2025 9:29 pm Thanks. So if you do happen to want the splitter to give equal priority when both sides are "requesting" it with a true condition, you will need to duplicate both conditions in combinators and, if they are both true, negate both of them before sending to the splitter.
The Splitter has a "Memory" now, so the behavior of the Priority switches is dependent upon the previous Setting. This works fine for the Default logic which uses the same Signal for the Left/Right lanes, since the I/O signal will either be Less than 0, or Greater than 0 - not both at once.
09-23-2025, 12-09-35.png
09-23-2025, 12-09-35.png (79.44 KiB) Viewed 285 times
However, there are many more complicated mechanisms which may be desired, such as two "Demand lanes" coming off a single Feeder. I built this Mechanism to pass a L/R signal if the other signal is not active, which seems to work well. I prefer this over using a Negate signal (as suggested above) , but I don't like that it requires a separate Signal pair / Second Combinator to handle Input and Output.
09-23-2025, 12-22-34.png
09-23-2025, 12-22-34.png (152.09 KiB) Viewed 285 times



I am curious if anybody else has a better idea to achieve this in a single Combinator? I fiddled with the Each/Anything/Everything signals to try to detect a "Transition" and reset the Splitter by not passing any Signals for 1 tick; but I was not happy with the results. What do you think?
robot256
Smart Inserter
Smart Inserter
Posts: 1274
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Smart Splitter Experiments

Post by robot256 »

If your input signals are only 0 or 1, you can do it with no combinators:

Left: L>R
Right: R>L

Then if R=L the priority will be equal.

If your signals are 0 or any positive number, you still need a single decider combinator, but the setting is simple "If Each > 0, output Each=1".
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
robot256
Smart Inserter
Smart Inserter
Posts: 1274
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Smart Splitter Experiments

Post by robot256 »

I finally sat down and played with the existing implementation a bit. It is possible to accomplish basic tasks without being affected by the side-memory feature, but it's not intuitive at first.

I had two applications in mind. The first is sorting the output of a recycler. The second is prioritizing ingredient flow on a bus, for example of spoilable nutrients. The caveat is that most of this can technically be accomplished with enough wires on belts and inserters. So the goal of using splitters is to make it cleaner and more intuitive.

The sorting application turned out to be very effective, but requires a lot of combinators. The benefit is that using circuit-configured filters, "no filter" completely disables one side of the splitter and all items are sent to the opposite side.
09-23-2025, 20-57-02.png
09-23-2025, 20-57-02.png (3.1 MiB) Viewed 156 times
This is exactly what I want for a sorting machine overflow behavior. The complication is that it only works if you have a dedicated signal for each splitter that either contains the item you want, or nothing. You can't say "set the filter to Iron gear if Iron gear < 0" without the extra combinator. Setting the side selection at the same time as the filter doesn't help at all, and I'm doubtful that ability will ever be useful.

----------------------

The priority machine is more nuanced, and this is where we can potentially see the effect of the state memory.

Example 1: Set the splitter so that whichever side is low requests priority. This works at first, but as soon as one of them is full, the other one gets priority. When the first output becomes empty again, it can't get priority back until the second output is completely full, and then it ping-pongs back and forth unless both of them become full at the same time.
09-23-2025, 21-02-14.png
09-23-2025, 21-02-14.png (3.16 MiB) Viewed 156 times
Example 2: Set the splitter to equalize both outputs. This is what I normally do with inserters. It works fine if that's what you need.
09-23-2025, 21-04-19.png
09-23-2025, 21-04-19.png (1.93 MiB) Viewed 156 times
Example 3: Opposite of the first example. Set the splitter so that instead of "requesting" items for the empty side(s), whichever side is full requests it for the *other* side. This has the advantage that the splitter gets "stuck" in its memory state only after both sides are full. As soon as one side empties, the other side will force priority to the empty side.
09-23-2025, 21-06-25.png
09-23-2025, 21-06-25.png (1.43 MiB) Viewed 156 times
Example 4: Same as Example 3, but now with the extra combinator used to enforce "true/true = equal priority".
09-23-2025, 21-07-06.png
09-23-2025, 21-07-06.png (5.32 MiB) Viewed 156 times
Conclusion: In these basic examples, the memory behavior either doesn't affect it at all, or can be worked around in simple but non-obvious ways. I haven't thought of a simple case where it is advantageous yet.
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
Post Reply

Return to “Gameplay Help”