filter combinator

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

oleg4f
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Fri Dec 04, 2020 9:16 am
Contact:

filter combinator

Post by oleg4f »

Hi.

It would be nice to have a filter combinator. It interface can look like a constant combinator. We choose signals that can pass a filter. Then on output we see only that signals from combinator input which we selected.

Next important feature is the possibility to set a filter from a circuit net. We choose a wire color(red or green) from where we get signals for filter configuration. After this, this wire signals aren't sumed with another colored wire on input(i.e. we have green and red wire on input; we choose for filter configuration the red wire; now red wire is used only for filter configuration and green wire for signal filter input)

Another optional feature is the possibility to set a filter boundaries for quantities in addition to signal types(maximum and minimum values). It can work like a smoothing filter. For example, we choose an iron plate signal with 0-100 boundaries. Thus filter pass only iron plate signal and if it value is greater then 100 it will be 100 on the output; if it value is smaller than 0, it will be 0 on the output. To pass all values we choose boundaries [-infinity, infinity](this is a default setting).
mmmPI
Smart Inserter
Smart Inserter
Posts: 3643
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: filter combinator

Post by mmmPI »

oleg4f wrote: Sat Dec 05, 2020 11:50 am It would be nice to have a filter combinator. It interface can look like a constant combinator. We choose signals that can pass a filter. Then on output we see only that signals from combinator input which we selected.
You can do something that approach this already.
Using "each+0" "output count" "iron" on an arithmetic, would add 0 to all signal and only ouput the iron one( unchanged).
Same logic with if "anything" "different from 0" "output count iron" on a decider combinator.
oleg4f wrote: Sat Dec 05, 2020 11:50 am Thus filter pass only iron plate signal and if it value is greater then 100 it will be 100 on the output; if it value is smaller than 0, it will be 0 on the output. To pass all values we choose boundaries [-infinity, infinity](this is a default setting).
This one is possible using several combinators.

First decider is for the lower bound : "Iron" ">0" "output count iron".
Second decider for the higher bound : "iron" "=<" "100" "output count iron".
third decider is for everything above the higher bound : "iron" ">100" "output iron 1"
forth combinator is an arithmetic (iron *100)

Then link the output of 1 to input of 2 and 3, the output of 2 to the input of 3, the output of 3 to input of 4. And you read signal from 2 and 4 at the same time as output.

If iron is under or equal 0 you'd get 0.
If iron is between 1 and 100 you'd get the precise number
if a signal is above 100 you'd get only 100.
Yoyobuae
Filter Inserter
Filter Inserter
Posts: 509
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: filter combinator

Post by Yoyobuae »

mmmPI wrote: Sat Dec 05, 2020 2:53 pm Using "each+0" "output count" "iron" on an arithmetic, would add 0 to all signal and only ouput the iron one( unchanged).
This doesn't actually work like you think. When you set an arithmetic with EACH as one of it's operands, but set it's output to something else than EACH then the output is the sum of the individual operation results for each input signal.

So if you have 5 copper, 7 stone, 11 coal input signals into an arithmetic combinator configured with "EACH + 0 --> IRON" then the output signal would be 23 iron.
Screenshot_2020-12-05_11-31-39.png
Screenshot_2020-12-05_11-31-39.png (131.62 KiB) Viewed 6037 times
mmmPI
Smart Inserter
Smart Inserter
Posts: 3643
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: filter combinator

Post by mmmPI »

Yoyobuae wrote: Sat Dec 05, 2020 4:29 pm
mmmPI wrote: Sat Dec 05, 2020 2:53 pm Using "each+0" "output count" "iron" on an arithmetic, would add 0 to all signal and only ouput the iron one( unchanged).
This doesn't actually work like you think. When you set an arithmetic with EACH as one of it's operands, but set it's output to something else than EACH then the output is the sum of the individual operation results for each input signal.
So if you have 5 copper, 7 stone, 11 coal input signals into an arithmetic combinator configured with "EACH + 0 --> IRON" then the output signal would be 23 iron.
That is indeed my mistake.


I tought a dummy combinator would do but i mixed up the two. If you want to use arithmetic you need to specify "iron" "+0" output "iron". It will isolate a signal.
Otherwise one chould use a decider combinator with the "Anything" "different than 0" "output iron". The arithmetic don't have the tick box "output 1" or "output count".

Also for the first part the thing i described i did mistake and forgot to add a filter for the signal so that they don't add up when it's above boundary.

I fixed the mistake by adding 2 combinator as filter and made a example :
worse version
Edit : i tought about a little more and realise i could do this re-using my previous mistake to reduce number of combinator :) :
filter boundary2.png
filter boundary2.png (134.15 KiB) Viewed 6003 times
oleg4f
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Fri Dec 04, 2020 9:16 am
Contact:

Re: filter combinator

Post by oleg4f »

mmmPI wrote: Sat Dec 05, 2020 2:53 pm You can do something that approach this already.
Thank you for the info, but i know how to do this with current set of combinators :-D. And this is cumbersome and inconvenient. If you need several such filters, then you get a monstrous ugly thing, which you want immediately destroy.
Ajedi32
Inserter
Inserter
Posts: 28
Joined: Thu May 07, 2020 9:46 pm
Contact:

Re: filter combinator

Post by Ajedi32 »

IMO the best way to solve this would be to allow combinators to choose which network (red or green) to read from with each input. Then you could use an arithmetic combinator set to (Each Red) * (Each Green) and wire the green input to a constant combinator listing the items you want to filter.

That would solve this problem and a whole host of others at the same time.
User avatar
NotRexButCaesar
Smart Inserter
Smart Inserter
Posts: 1133
Joined: Sun Feb 16, 2020 12:47 am
Contact:

Re: filter combinator

Post by NotRexButCaesar »

Ajedi32 wrote: Mon Dec 07, 2020 4:13 pm IMO the best way to solve this would be to allow combinators to choose which network (red or green) to read from with each input. Then you could use an arithmetic combinator set to (Each Red) * (Each Green) and wire the green input to a constant combinator listing the items you want to filter.
pairwise multiplication has been wanted for years. It will not be implemented.
—Crevez, chiens, si vous n'étes pas contents!
oleg4f
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Fri Dec 04, 2020 9:16 am
Contact:

Re: filter combinator

Post by oleg4f »

Ajedi32 wrote: Mon Dec 07, 2020 4:13 pm IMO the best way to solve this would be to allow combinators to choose which network (red or green) to read from with each input. Then you could use an arithmetic combinator set to (Each Red) * (Each Green) and wire the green input to a constant combinator listing the items you want to filter.

That would solve this problem and a whole host of others at the same time.
About this i thought too. But this isn't the same as filter combinator. For example, i get a train payload from a train stop and i interested in only particular set of items. The easiest way is to pass all signals from a train through filter combinator and then pass this output to further logic.
Ajedi32
Inserter
Inserter
Posts: 28
Joined: Thu May 07, 2020 9:46 pm
Contact:

Re: filter combinator

Post by Ajedi32 »

oleg4f wrote: Mon Dec 07, 2020 4:28 pm
Ajedi32 wrote: Mon Dec 07, 2020 4:13 pm IMO the best way to solve this would be to allow combinators to choose which network (red or green) to read from with each input. Then you could use an arithmetic combinator set to (Each Red) * (Each Green) and wire the green input to a constant combinator listing the items you want to filter.

That would solve this problem and a whole host of others at the same time.
About this i thought too. But this isn't the same as filter combinator. For example, i get a train payload from a train stop and i interested in only particular set of items. The easiest way is to pass all signals from a train through filter combinator and then pass this output to further logic.
In that situation you'd wire the train stop to the red input on the arithmetic combinator, and the constant combinator to the green input. Set the signals you want to pass to a value of 1 on the constant combinator and you're all set. Takes 2 combinators instead of 1 but otherwise exactly the same result as having a dedicated filter combinator, just a lot more flexible and without needing to add another entity to the game.
oleg4f
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Fri Dec 04, 2020 9:16 am
Contact:

Re: filter combinator

Post by oleg4f »

Ajedi32 wrote: Mon Dec 07, 2020 4:59 pm In that situation you'd wire the train stop to the red input on the arithmetic combinator, and the constant combinator to the green input. Set the signals you want to pass to a value of 1 on the constant combinator and you're all set. Takes 2 combinators instead of 1 but otherwise exactly the same result as having a dedicated filter combinator, just a lot more flexible and without needing to add another entity to the game.
IIUC, you talk about (Each red) * (Each green) feature. But in this case this operation must work like this: multiply signals from red wire with only identical signals from green wire.
Ajedi32
Inserter
Inserter
Posts: 28
Joined: Thu May 07, 2020 9:46 pm
Contact:

Re: filter combinator

Post by Ajedi32 »

oleg4f wrote: Mon Dec 07, 2020 5:42 pm
Ajedi32 wrote: Mon Dec 07, 2020 4:59 pm In that situation you'd wire the train stop to the red input on the arithmetic combinator, and the constant combinator to the green input. Set the signals you want to pass to a value of 1 on the constant combinator and you're all set. Takes 2 combinators instead of 1 but otherwise exactly the same result as having a dedicated filter combinator, just a lot more flexible and without needing to add another entity to the game.
IIUC, you talk about (Each red) * (Each green) feature. But in this case this operation must work like this: multiply signals from red wire with only identical signals from green wire.
Multiplying by 0 is the same as clearing the signal. The circuit network treats blank signals are 0, and 0 as a blank signal. So any signals not set on the constant combinator would get filtered out, exactly like you want.
mmmPI
Smart Inserter
Smart Inserter
Posts: 3643
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: filter combinator

Post by mmmPI »

oleg4f wrote: Mon Dec 07, 2020 12:33 pm this is cumbersome and inconvenient. If you need several such filters, then you get a monstrous ugly thing, which you want immediately destroy.
On the suggestion template ( viewtopic.php?f=6&t=47316 ) it is asked that you explain "why" you want that thing. It wasn't part of your original post.
Making something easier is not the same as making something possible. I'm no-one to judge but my personnal opinion is not really getting convinced of the necessity for that filter combinator.

It doesn't seems obvious to me why would one need to make easier something to which i don't see much (needed) use-case in the first place. Maybe some more example of said situation where you "need" several filter which end up making a monstruosity that you want to destroy could help illustrating the necessity :)

By that i mean you are not helping your suggestion saying that you already know how to deal without it. Is the use-case for trains ? there are others ways to deal with those in game that's what is the most common answer. Is it for logistic network ? For power management ?

I guess it's more a general something, to widen the range of options at one's disposal.

What you described made me think of something i learned it existed IRL and how to emulate those in game it's called digital multiplexer. https://en.wikipedia.org/wiki/Multiplex ... ltiplexers.

You can make those in game, that has somewhat the same functionnality as what you describe, it uses some inputs to filter other inputs. (similar as using red wire to send a signal that tell the combinator what to filter on the green wire ). The following shema uses 2 bits S0 or S1 to "filter" the other 4. (00 01 10 11).
4to1_MUX_using_basic_gates.jpg
4to1_MUX_using_basic_gates.jpg (150.21 KiB) Viewed 5823 times
I understand why one would want to simplify that process, a bit less what it would add to the gameplay from a game perspective. I think it's the other way around, it is entertaining/fun and you learn stuff from assembling the little basic logic to grow a more complex system.

If this can be assimilated as adding pair-wise multiplication to existing combinators, instead of adding the filter combinator i would be more enclined to understand the added versatility on the existing entity, rather than creating a new one with "obscure" purposes from a beginner/non-coder standpoint.
AmericanPatriot wrote: Mon Dec 07, 2020 4:16 pm
Ajedi32 wrote: Mon Dec 07, 2020 4:13 pm IMO the best way to solve this would be to allow combinators to choose which network (red or green) to read from with each input. Then you could use an arithmetic combinator set to (Each Red) * (Each Green) and wire the green input to a constant combinator listing the items you want to filter.
pairwise multiplication has been wanted for years. It will not be implemented.
That's not a topic i have followed, do you have some link so i can educate myself ?
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: filter combinator

Post by ssilk »

That was hard work! And there ar astonishing much references:

viewtopic.php?f=6&t=32300 Pairwise multiply/divide EACH signal in combinators
viewtopic.php?f=6&t=26944 Expand Circuit Network's "Each"
viewtopic.php?f=6&t=24257 New Combinator to work on wires seperatly

(I’m proud, that I found those, they’re from 2016)

viewtopic.php?f=80&t=50283 Separated Handling of Red and Green Wires
viewtopic.php?f=6&t=49278 circuit combinators, set wire-colors for select-windows
viewtopic.php?f=6&t=31438 Wire color based signal input selector (for virtual signals)


Similar:

viewtopic.php?f=6&t=61557 New combinator symbols: Each[Green] and Each[Red]
viewtopic.php?f=6&t=75852 One Wire for control circuits, colours as channels
viewtopic.php?f=6&t=56890 Separate signals to/from red and green wires


Related:

viewtopic.php?f=6&t=47706 Circuit network improvement: Multiple modes of operation

Summary
this idea of separation of input wire colors is very old and has many pros, the arguments for it are good. Gameplay value is high, but implementation effort seems to be also quite high.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
oleg4f
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Fri Dec 04, 2020 9:16 am
Contact:

Re: filter combinator

Post by oleg4f »

mmmPI wrote: Tue Dec 08, 2020 4:49 am Making something easier is not the same as making something possible.
In some situations these are the same. If we need to spend much time and efforts to make something, then only few people can make this. And for others this will be equal to impossible. For example, is it possible to play with metal constructor kit? Yes, certainly. You need a metal, lathe machine, milling machine, some background in metal processing. This is possible, but this isn't simple. Only few people can do it. For all others this is equal to impossible. But companies which produce ready-made metal constructor kit and sell they to us making this possigle for the most people without experience in metal processing.
Is the use-case for trains ? there are others ways to deal with those in game that's what is the most common answer. Is it for logistic network ? For power management ?
Yes. The last case I encountered the need in something like a filter combinator was for trains.
I guess it's more a general something, to widen the range of options at one's disposal.
Yes.
What you described made me think of something i learned it existed IRL and how to emulate those in game it's called digital multiplexer. https://en.wikipedia.org/wiki/Multiplex ... ltiplexers.

You can make those in game, that has somewhat the same functionnality as what you describe, it uses some inputs to filter other inputs. (similar as using red wire to send a signal that tell the combinator what to filter on the green wire ). The following shema uses 2 bits S0 or S1 to "filter" the other 4. (00 01 10 11).
Thanks for the info, but i already tried this :-). And when i caught myself making a job from a game, i stopped this process :-). I do enough stuff like that at my work to not want to do this in the game :-). If game become as complex as job, then i better to do some job and get a money for this ;-). And after a job i can play in some game to have a rest.

If i would talk about some strange things like a combinators based video decoder in factorio or something strange like this, then yes - game already allow to do this fun and nothing special else need for this. But i talk about the main game goal - automation of production processes. Why this need to be complex? I'm not even talking about a sorting railway station, which would makes better trains; or about a possibility of text comments for a signals in combinators(without this almost impossible to remember after some time how a complex combinators scheme is work).

If we would have a possibility to insert some blueprint in assembling machine and get a PCB on out, then at least one problem will not exist - the cumbersomeness of complex combinators scheme.
If this can be assimilated as adding pair-wise multiplication to existing combinators, instead of adding the filter combinator i would be more enclined to understand the added versatility on the existing entity, rather than creating a new one with "obscure" purposes from a beginner/non-coder standpoint.
If pair-wise multiplication work as Ajedi32 wrote, then for me this will be enough to solve my problems.
Last edited by oleg4f on Tue Dec 08, 2020 9:44 am, edited 3 times in total.
oleg4f
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Fri Dec 04, 2020 9:16 am
Contact:

Re: filter combinator

Post by oleg4f »

Ajedi32 wrote: Mon Dec 07, 2020 7:13 pm Multiplying by 0 is the same as clearing the signal. The circuit network treats blank signals are 0, and 0 as a blank signal. So any signals not set on the constant combinator would get filtered out, exactly like you want.
Yes. But i'm talking not about this. IIUC, if we have (A B C) signals on red wire and (A C E) signals on green wire, then such operation will yield:

(A*A C*C)

and not:

(A*A A*C A*E B*A B*C B*E C*A C*C C*E)

Another question. For what else uses except filtering this operation can be used?
mmmPI
Smart Inserter
Smart Inserter
Posts: 3643
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: filter combinator

Post by mmmPI »

oleg4f wrote: Tue Dec 08, 2020 8:45 am In some situations these are the same. If we need to spend much time and efforts to make something, then only few people can make this. And for others this will be equal to impossible. For example, is it possible to play with metal constructor kit? Yes, certainly. You need a metal, lathe machine, milling machine, some background in metal processing. This is possible, but this isn't simple. Only few people can do it. For all others this is equal to impossible. But companies which produce ready-made metal constructor kit and sell they to us making this possigle for the most people without experience in metal processing.
good point
If i would talk about some strange things like a combinators based video decoder in factorio or something strange like this, then yes - game already allow to do this fun and nothing special else need for this. But i talk about the main game goal - automation of production processes. Why this need to be complex? I'm not even talking about a sorting railway station, which would makes better trains; or about a possibility of text comments for a signals in combinators(without this almost impossible to remember after some time how a complex combinators scheme is work).
i thought the main goal was to have fun, but you can use it as a learning tool, and even do both ! the complexity of the mechanism is not felt the same for everyone some players find it not so complex, it definitly feels complex for me too, but i enjoy it. I think it offers deep gameplay, everytime i play factorio i know i will have to make some choices, trade-offs, i will not be pursing the "optimal strategy", even after few years. That's very valuable to me. Sure i have taken habits, but the game has evolved, there are many mods, and my habits are also challenged quite often :).

In other games i know, the same kind of things i only feel with multiplayer RTS, or PVP in MMO, both on rely defeating foes to push you to learn. I think the factorio way is more pleasant, more about creativity not execution. But while the goal is to win, if it's too easy i don't have fun. And the lesson wouldn't be valuable. I find the learning process is pleasant, and there is much things to learn. i'm hooked for a long time and recommend :)

Also i wish there was a way to comment combinators. I often just remember general logic of something and lose myself in the implementation details when going back to it possibly due to the very messy nature of things i do.

ssilk wrote: Tue Dec 08, 2020 7:23 am
Summary
this idea of separation of input wire colors is very old and has many pros, the arguments for it are good. Gameplay value is high, but implementation effort seems to be also quite high.
Thanks for compiling all those links It makes it clearer to me why all those things are to consider together as a whole change. I haven't realised that pairwise multiplication is not just adding "each" on both end of a combinator, but requires changing the circuit network logic so that the 2 inputs are not summed up. And/or that it would require another entity.

I wasn't aware of the consequences this change could have and i'm not pretending it's much better now. I didn't know it was a thing so i didn't missed it.

oleg4f wrote: Tue Dec 08, 2020 8:50 am if we have (A B C) signals on red wire and (A C E) signals on green wire, then such operation will yield:
(A*A C*C)
I think that's what expected,it would be asymetric. The green wire would code for example the channel that are read, and hold A=1 C=1 E=1; the red wire would be the flow of unfiltered data ( A=22 B=12 C=14 G=-5 H=2 U=45555 ), and the filtered data at the end would be : (A=22, C=14). right ?

[Edit: pairwise multiplication doesn't show it's asymetric that's a poor example from me, a better one is pairwise division i think. If you differentiate the two channel it makes it possible to choose which one is divided by which. ]

oleg4f wrote: Tue Dec 08, 2020 8:50 am and not:
(A*A A*C A*E B*A B*C B*E C*A C*C C*E)
Another question. For what else uses except filtering this operation can be used?
you lost me gain here.
Last edited by mmmPI on Wed Dec 09, 2020 8:09 pm, edited 1 time in total.
User avatar
Impatient
Filter Inserter
Filter Inserter
Posts: 883
Joined: Sun Mar 20, 2016 2:51 am
Contact:

Re: filter combinator

Post by Impatient »

Part of your multi-suggestion is this, if I understood correctly:

viewtopic.php?t=56890

Edit: Oh, ssilk already made an exhausting list of already made suggestions. Also noticing, that ssilk made a similar suggestion like mine in 2016 2017 already. :)
Post Reply

Return to “Ideas and Suggestions”