[0.13.3] logic combinator

Suggestions that have been added to the game.

Moderator: ickputzdirwech

Shaymes
Fast Inserter
Fast Inserter
Posts: 215
Joined: Thu May 22, 2014 8:06 am
Contact:

[0.13.3] logic combinator

Post by Shaymes »

Logic Combinator like the aretmetic combinator just for NOT OR NAND NOR AND XOR
we have a green color left for a logicnetwork device :D

Image
Mining Drill Operator
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [0.13.3] logic combinator

Post by ssilk »

Could you make me a logic table? Like so:
Image

Especially: What is Iron XOR Copper ? What is NOT copper plates? Etc. Input-signals and output signals.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Shaymes
Fast Inserter
Fast Inserter
Posts: 215
Joined: Thu May 22, 2014 8:06 am
Contact:

Re: [0.13.3] logic combinator

Post by Shaymes »

its just like all device if the input is TRUE do the output; if the input is FALSE then do not

A = is there a Copper signal yes/no B = is there an Iron signal yes/no
Y = Give output signal yes/no

XOR
A B Y = A ⊻ B
0 0 0
0 1 1
1 0 1
1 1 0

its hard to translate what i want to say, so the logic combinator dont work with exact ammout of a signal it just check A = 0 or A > 0 then B = 0 or B > 0 then we can do all logic gates AND NAND XOR OR
the oput is free to define for my screeny its a red signal so for the XOR example: i have burner inserter in my chest FALSE; i have yellow inserter in my chest = TURE

FALSE XOR TURE = TRUE,

so do the output; the icon i choosed as 1, es example Y = 1

for a more complex circuit i can add 2 devicer infront the logic gate so that i get a signal if the yellow iserter > 10 and the 2nd deciver burner inserter > 5 with the output of the logic gate
i can control a inserters to produce burner inserters / yellow inserters; the value of a signal doesnt matters, just is one there or not; i hope you can follow me
-------------------------

ok for a NOT gate i can easy use the deciver combinator A = 0; Y = 1
Mining Drill Operator
Neotix
Filter Inserter
Filter Inserter
Posts: 599
Joined: Sat Nov 23, 2013 9:56 pm
Contact:

Re: [0.13.3] logic combinator

Post by Neotix »

There is no boolean signals in Factorio. All signals are integer. How you want to solve logic based on integers? 619 Iron plate XOR 937645 Copper plate = ?

We can build logic gates witch arithmetic/decider combinators because we can determine which value is 1 and which is 0.
Zeblote
Filter Inserter
Filter Inserter
Posts: 973
Joined: Fri Oct 31, 2014 11:55 am
Contact:

Re: [0.13.3] logic combinator

Post by Zeblote »

Neotix wrote:There is no boolean signals in Factorio. All signals are integer. How you want to solve logic based on integers? 619 Iron plate XOR 937645 Copper plate = ?
937158 of whatever output signal you set. All boolean operations can be represented by binary operators on integers so there's no problem. To make the whole thing useful, use it with signals that are 0 or 1...
Shaymes
Fast Inserter
Fast Inserter
Posts: 215
Joined: Thu May 22, 2014 8:06 am
Contact:

Re: [0.13.3] logic combinator

Post by Shaymes »

there is no need of the exact integer for the logic combinator there is a signal so copperplates = 3123 is simple a TRUE and iron = 0 is simple a FLASE
there is no need to get a boolean from a deciver combinator
Mining Drill Operator
Neotix
Filter Inserter
Filter Inserter
Posts: 599
Joined: Sat Nov 23, 2013 9:56 pm
Contact:

Re: [0.13.3] logic combinator

Post by Neotix »

@Zeblote binary calculations are not intuitive for normal player. Most of the people don't even know how to convert integer into binary and vice versa. Then how useful would be that logic combinator? Besides when we want to use 0;1 signals, we already can build that logic.

@Shaymes if i understand it correctly, you want to use any signal that id > 0 as TRUE and any signal = 0 as FALSE? Or you want to you just want to ser pair of conditions and set logic between them?
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [0.13.3] logic combinator

Post by ssilk »

I don't know the others, but for me it's now quite clear what Shaymes meant.

But I don't know, if that should be called "logic combinator", cause from the functionality it is a "router":

Route Signal X if Signal Y present XOR Signal Z present (where Y could be the same signal as X for example). That can make much sense.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
terror_gnom
Fast Inserter
Fast Inserter
Posts: 121
Joined: Wed Apr 06, 2016 4:01 am
Contact:

Re: [0.13.3] logic combinator

Post by terror_gnom »

hmmm... If you go this way, you should do a bitwise xor on the Integer :P I Think I could make use of it, but 99% of Factorio-Players will post a Bug report :P
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: [0.13.3] logic combinator

Post by ssilk »

Bitwise XOR is nonsense. :)

Well, lets say we call this thing a router. Then it would also look quite different - and has of course a quite different interface (completely different to shown above). I won't go deeper here, cause it looks like overtaking a suggestion. ;)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Shiandow
Inserter
Inserter
Posts: 20
Joined: Sun Jul 03, 2016 1:50 am
Contact:

Re: [0.13.3] logic combinator

Post by Shiandow »

I don't think this would really add any new behaviour, most of these can be replicated using the arithmetic combinator if you consider all positive values TRUE and 0 FALSE (and negative values neither).

Then you'd get:

NOT A = (A == 0)
A AND B = A * B
A OR B = A + B
A XOR B = NOT (A == B)
A NAND B = NOT (A AND B)
A NOR B = NOT (A OR B)

For XOR, NAND and NOR you do need two combinators but I don't really see a realistic scenario where you'd need to use those.

Edit: XOR is somewhat more difficult.
Last edited by Shiandow on Mon Jul 04, 2016 4:41 pm, edited 1 time in total.
User avatar
stellatedHex
Inserter
Inserter
Posts: 27
Joined: Wed Jun 15, 2016 1:39 am
Contact:

Re: [0.13.3] logic combinator

Post by stellatedHex »

Hmm, I don't think your XOR works. If positive numbers are all TRUE, then 2 XOR 3 should be 0. You probably would need 4 combinators to do XOR (3 if A and B use the same signal). I think a superior schema would be to use 0 and 1, all using the same channel, where signals that don't conform are divided by themselves before being circuitified. Then A XOR B could be done as (A+B)*(2^-31)/(2^-31), or NOT (A==B) both of which require only 2 combinators.
stellatedHexahedron wrote:I'm the kind of person who makes Conway's Game of Life in Factorio, but forgets what they are doing halfway through typing their username.
terror_gnom
Fast Inserter
Fast Inserter
Posts: 121
Joined: Wed Apr 06, 2016 4:01 am
Contact:

Re: [0.13.3] logic combinator

Post by terror_gnom »

Bitwise XOR is at least more usefull than integer xor :P But even if I like it, because I do some bitshifting in my combinator builds, I dont think it will be implemented and its definitive unintuitive :lol:
Shiandow
Inserter
Inserter
Posts: 20
Joined: Sun Jul 03, 2016 1:50 am
Contact:

Re: [0.13.3] logic combinator

Post by Shiandow »

stellatedHex wrote:Hmm, I don't think your XOR works. If positive numbers are all TRUE, then 2 XOR 3 should be 0. You probably would need 4 combinators to do XOR (3 if A and B use the same signal). I think a superior schema would be to use 0 and 1, all using the same channel, where signals that don't conform are divided by themselves before being circuitified. Then A XOR B could be done as (A+B)*(2^-31)/(2^-31), or NOT (A==B) both of which require only 2 combinators.
Yeah you're right, however if you only want to use 1 and 0 then you could also just do the following:

NOT A = (A == 0)
A AND B = A * B
A OR B = (A + B) > 0
A XOR B = NOT (A == B)
A NAND B = NOT (A AND B)
A NOR B = NOT (A OR B)

Since OR is the only operation that returns values other than 1. I suppose a "max" operator would have made it easier, then you could just use A OR B = max(A,B).
Shaymes
Fast Inserter
Fast Inserter
Posts: 215
Joined: Thu May 22, 2014 8:06 am
Contact:

Re: [0.13.3] logic combinator

Post by Shaymes »

added 0.15 with logic network thread can be closed
Mining Drill Operator
Post Reply

Return to “Implemented Suggestions”