Allow comparison between *Each and *Everything in decider combinators.

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
foamy
Filter Inserter
Filter Inserter
Posts: 432
Joined: Mon Aug 26, 2019 4:14 am
Contact:

Allow comparison between *Each and *Everything in decider combinators.

Post by foamy »

This is equivalent to performing the chosen operation on each individual input channel, then summing the results. This can be implemented already with the current combinators, but must be done with a specific channel in each combinator and then the outputs summed via ganging on the same wire. This rapidly becomes unwieldy if you are interested in more than one or two channels at a time. For example, finding the maximum value amongst a set of N channels requires N+2 combinators using this method; a roboport or smart train station could easily have dozens of channels of interest.

However, an *Everything OPERAND *Each option would be precisely logically equivalent to those ganged combinators, would be able to handle arbitrary inputs, and would allow for a significant compaction of any build that needs to perform them.



Sample outputs for the set of signals {A = 2; B = 2; C = 3; D = 4}:

*Everything LESS THAN *Each:
Output:
{D = 4} if *Each or D are the output channels and "Input Value" is selected
{} if a channel other than D is the output channel and "Input Value" is selected
{Channel = 1} if any channel is chosen as the output channel and "1" is selected.

*Everything LESS THAN OR EQUAL *Each
Output:
Identical to above.

*Everything EQUAL TO *Each
Output:
{} in all cases.

*Everything GREATER THAN OR EQUAL *Each
Output:
{A = 2; B = 2} if *Each is the output channel and "Input Value" is selected.
{A = 2} or {B = 2} if A or B, respectively, is the output channel and "Input Value" is selected.
{} if neither A nor B is selected as the output channel and "Input Value" is selected.
{A = 1; B = 1} if *Each is the output channel and "1" is selected.
{Channel = 2} if any channel is selected and "1" is selected.

*Everything GREATER THAN *Each
Output:
{} in all cases.

*Everything NOT EQUAL TO *Each
Output:
{A = 2; B = 2} if *Each and "Input Value" is selected.
{A = 2} or {B = 2} if either A or B, respectively, is selected as the output channel and "Input Value" is selected.
{} if neither A nor B is selected as the output channel and "Input Value" is selected.
{A = 1; B = 1} if *Each is the output channel and "1" is selected.
{Channel = 2} if any channel is selected and "1" is selected.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Allow comparison between *Each and *Everything in decider combinators.

Post by ssilk »

Sorry, but nobody will understand that. And I see no mathematical reason why it should work like so. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

foamy
Filter Inserter
Filter Inserter
Posts: 432
Joined: Mon Aug 26, 2019 4:14 am
Contact:

Re: Allow comparison between *Each and *Everything in decider combinators.

Post by foamy »

ssilk wrote:
Fri Dec 11, 2020 6:03 am
Sorry, but nobody will understand that. And I see no mathematical reason why it should work like so. :)

...

I can assure you those outputs are exactly what you get when you set up the individual combinators and sum the outputs. Tested ingame; you can try it yourself, if you like. Or I could drag you through the full rules of the wildcards in deciders for how I got the truth table, but if you found the summary hard to follow I don't know if it'd help.

In any case, the net effect is to effectively compact all one-channel combinators into one single combinator, just like the *Each operation does in its other implementations. *Each * 5, for example, can be done by setting up a Channel Whatever * 5 combinator for each channel you're working with, but that's a giant hassle because who wants to set up thirty combinators for a simple operation like that? That's why the *Each signal exists in the first place.

This is a simple extension of it, for exactly the same reasons it was originally added. In point of fact it need not be limited to just decider combinators, either; anything that implements the same logic as a decider combinator could and should get it. This would include, in vanilla, pumps, power switches, lamps, inserters, speakers, belts, and train stations.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Allow comparison between *Each and *Everything in decider combinators.

Post by ssilk »

Sounds legit, but still wired. :D 8-) Sorry.

In any case this has a link to the discussion about EACH as second operand and separate the wire colors.
viewtopic.php?f=6&t=92616
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Post Reply

Return to “Ideas and Suggestions”