And / Or etc for circuitry

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

equitime77
Long Handed Inserter
Long Handed Inserter
Posts: 54
Joined: Mon Mar 28, 2016 11:07 am
Contact:

And / Or etc for circuitry

Post by equitime77 »

I had a very brief look for this, but couldnt see it. It would be really good to have for instance an inserter or a train station work if there were a certain amount of iron ore OR iron plates in the system for instance. This could be useful for other things too.
User avatar
Gertibrumm
Fast Inserter
Fast Inserter
Posts: 162
Joined: Fri Jun 03, 2016 6:54 pm
Contact:

Re: And / Or etc for circuitry

Post by Gertibrumm »

If you are talking about combinators, then this is something likely to be implemented soon
User avatar
OdinYggd
Fast Inserter
Fast Inserter
Posts: 200
Joined: Wed May 25, 2016 12:55 pm
Contact:

Re: And / Or etc for circuitry

Post by OdinYggd »

Gertibrumm wrote:If you are talking about combinators, then this is something likely to be implemented soon
No, it probably won't be. People have been asking for this for months.

Thing is, the basic functionality required to make it possible already exists. You just need to think outside the box.


Here's a tip for you: Combinators are not digital logic. In fact they are closer to analogue.
The logic they use is called Quantized Analogue, since it has somewhere around a few billion distinct numerical values that each signal or item token can represent.

Think of it more like an Algebra equation than any sort of boolean logic. All of the boolean functions have an algebraic equivalent, it just takes a little thought to map it out.
In my mind, Steam is the eternal king of the railway.
Yoyobuae
Filter Inserter
Filter Inserter
Posts: 509
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: And / Or etc for circuitry

Post by Yoyobuae »

equitime77 wrote:I had a very brief look for this, but couldnt see it. It would be really good to have for instance an inserter or a train station work if there were a certain amount of iron ore OR iron plates in the system for instance. This could be useful for other things too.
To implement OR simply feed two parallel deciders with the signals and set their output to, for example, (black=1). Then set the conditions on inserters as (black>0).

To implement AND feed two deciders in series with the signals. Set the first one to output (black=1) and set the second to output (black=input count). The output would be (black=1) only when condition on both deciders is true.

After doing lots of stuff with combinators it's just becomes natural to work with them.
User avatar
Gertibrumm
Fast Inserter
Fast Inserter
Posts: 162
Joined: Fri Jun 03, 2016 6:54 pm
Contact:

Re: And / Or etc for circuitry

Post by Gertibrumm »

OdinYggd wrote:
Gertibrumm wrote:If you are talking about combinators, then this is something likely to be implemented soon
No, it probably won't be. People have been asking for this for months.

Thing is, the basic functionality required to make it possible already exists. You just need to think outside the box.


Here's a tip for you: Combinators are not digital logic. In fact they are closer to analogue.
The logic they use is called Quantized Analogue, since it has somewhere around a few billion distinct numerical values that each signal or item token can represent.

Think of it more like an Algebra equation than any sort of boolean logic. All of the boolean functions have an algebraic equivalent, it just takes a little thought to map it out.
Basically, if we didn't had this fancy algebra thing and had to use boolean logic, we wouldn't be able to fit so much logic and CPUs and stuff into thight space. Yes for simple boolean stuff this is unconvenient, doubling the combinator count for some specific small scale circuits, BUT the current system is actually super convenient for fitting way more demanding logic in a single decider!
Yoyobuae
Filter Inserter
Filter Inserter
Posts: 509
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: And / Or etc for circuitry

Post by Yoyobuae »

Gertibrumm wrote:Basically, if we didn't had this fancy algebra thing and had to use boolean logic, we wouldn't be able to fit so much logic and CPUs and stuff into thight space. Yes for simple boolean stuff this is unconvenient, doubling the combinator count for some specific small scale circuits, BUT the current system is actually super convenient for fitting way more demanding logic in a single decider!
Bitwise AND/OR/etc would be pretty epic though.
Shiandow
Inserter
Inserter
Posts: 20
Joined: Sun Jul 03, 2016 1:50 am
Contact:

Re: And / Or etc for circuitry

Post by Shiandow »

Yoyobuae wrote:Bitwise AND/OR/etc would be pretty epic though.
What would really make the circuit system more powerful would be some way to combine the red and green circuits with arithmetic operations. That, and some ways to combine all the signals in a circuit into a single one (maximum / minimum / total etc.). Anyway, this is getting off topic.
Gertibrumm wrote:Basically, if we didn't had this fancy algebra thing and had to use boolean logic, we wouldn't be able to fit so much logic and CPUs and stuff into thight space. Yes for simple boolean stuff this is unconvenient, doubling the combinator count for some specific small scale circuits, BUT the current system is actually super convenient for fitting way more demanding logic in a single decider!
And of course if things get really complicated you can always add them as conditions to a train, and check if it moves...
aober93
Filter Inserter
Filter Inserter
Posts: 453
Joined: Tue Aug 30, 2016 9:07 pm
Contact:

Re: And / Or etc for circuitry

Post by aober93 »

Much can be done already. The problem for me is the complexity with the wires and all. Its like spaghetti code ,hard to maintain ,hard to understand. Just 2 combinators can cause this.

If all that can be done already could be encapsulated like factorissimo does, but better, this would be best. A factory housing a set of combinators. Maybe different sizes that hold appropriate amounts of combinators in them (like as big as 10x10 housing 50 combinators), and different looks, and adding symbols and text to them to describe the function. Make it exchangable to users.
Shiandow
Inserter
Inserter
Posts: 20
Joined: Sun Jul 03, 2016 1:50 am
Contact:

Re: And / Or etc for circuitry

Post by Shiandow »

That sounds like an awesome idea for a mod. Something like factorissimo, but for circuits (circuissimo?) sounds quite interesting. But it probably won't make it into the main game for the same reasons factorissimo won't.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: And / Or etc for circuitry

Post by ssilk »

Exactly, cause the Spaghetti is a wanted game-element. Otherwise I would Factorio call "Factory Constructor".

But that game would be boring. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Yoyobuae
Filter Inserter
Filter Inserter
Posts: 509
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: And / Or etc for circuitry

Post by Yoyobuae »

aober93 wrote:Much can be done already. The problem for me is the complexity with the wires and all. Its like spaghetti code ,hard to maintain ,hard to understand. Just 2 combinators can cause this.

If all that can be done already could be encapsulated like factorissimo does, but better, this would be best. A factory housing a set of combinators. Maybe different sizes that hold appropriate amounts of combinators in them (like as big as 10x10 housing 50 combinators), and different looks, and adding symbols and text to them to describe the function. Make it exchangable to users.
I'd much rather have a system to organize connections similar to a breadboard:
http://www.instructables.com/id/How-to- ... readboard/

Could simply be a tileable entity (like belts) which automatically makes red+green wire connections with the next+previous neighbors and can accepts red/green wire connections itself. Kinda like power poles but with the extra benefit of autoconnecting with adjacent neighbors either vertically or horizontally. It would be like the equivalent of transport belts for circuit networks. Extra points if it includes underground version as well.
User avatar
Gertibrumm
Fast Inserter
Fast Inserter
Posts: 162
Joined: Fri Jun 03, 2016 6:54 pm
Contact:

Re: And / Or etc for circuitry

Post by Gertibrumm »

In the end, factorio is not a logic simulator, rather a messy "Factory Constructor" like ssilk calls it :) . You can do absolutely everything with combinators that you could do with bit wise logic but more! I see no real use in using bit wise operations except in maybe for a few very very basic operations.

It is like when you choose assembler over C programming or vice versa, it is the same discussion. Assembler only stands out on low level logic design, while C only stands out in complicated system design.

Complexity wise, I think factorio is just in between low level and highlevel systems. We dont need to setup hugh arrays of bit wise combinators to build a 32 bit CPU, yet every CPU in factorio is 32 bit which I consider "high level". Yes AND/OR/NOT/NOR/NAND etc might be cool to have but as Klonan likes to say: "I don't see any benefit gameplay wise"
User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: And / Or etc for circuitry

Post by Deadly-Bagel »

In Bob's Mods I want to vent Petroleum Gas (or at least send it to crack to hydrogen which is vented) under specific circumstances, basically petroleum must be full, there needs to be good reserves of oil (no sense venting it if there's no supply), AND my Heavy Oil tanks are nearing empty.

This is the only time I've ever wanted to use an AND operator in the circuit network, and it's simple enough a circumstance. Quickly worked out I could set up three deciders outputting a signal of 1 when true and test that signal = 3.

Yeah it could be made simpler but for general gameplay what we have is great, encourages more logical thinking and only needs a few extra combinators. It's also more flexible (say you wanted two out of three conditions, could test signal > 1).
Money might be the root of all evil, but ignorance is the heart.
User avatar
Gertibrumm
Fast Inserter
Fast Inserter
Posts: 162
Joined: Fri Jun 03, 2016 6:54 pm
Contact:

Re: And / Or etc for circuitry

Post by Gertibrumm »

I also prefer combinators the way they are now, they might be improved but not with bitwise logic I think. Also clicking through <,>,=,AND,NOT,OR,… is too much! maybe for a sepearate combinator or specific button inside the current GUI.
Yoyobuae
Filter Inserter
Filter Inserter
Posts: 509
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: And / Or etc for circuitry

Post by Yoyobuae »

Gertibrumm wrote:Complexity wise, I think factorio is just in between low level and highlevel systems. We dont need to setup hugh arrays of bit wise combinators to build a 32 bit CPU, yet every CPU in factorio is 32 bit which I consider "high level". Yes AND/OR/NOT/NOR/NAND etc might be cool to have but as Klonan likes to say: "I don't see any benefit gameplay wise"
To me the potential benefits are pretty clear already.

I'm using a long bit shift register (352 bits long) to control the timing of inserters picking up from belt. Each cycle the register is shifted up by one bit, so the contents of the shift register more or less follow the contents of belt.

Issue is having to trigger inserters at specific times. Now I'm relying on greater than or less than operators, but it would be far easier to implement with bitwise AND.

Bitwise AND operator would also make it super easy to display bits of a signal using lamps.
Gertibrumm wrote:I also prefer combinators the way they are now, they might be improved but not with bitwise logic I think. Also clicking through <,>,=,AND,NOT,OR,… is too much! maybe for a sepearate combinator or specific button inside the current GUI.
In the poll about circuit network features it was mentioned the possibility of switching GUI of circuit condition operation to a drop down (so 2 clicks only).
User avatar
MeduSalem
Smart Inserter
Smart Inserter
Posts: 1686
Joined: Sun Jun 08, 2014 8:13 pm
Contact:

Re: And / Or etc for circuitry

Post by MeduSalem »

ssilk wrote:Exactly, cause the Spaghetti is a wanted game-element.
Well with the regular Factory stuff like producing items, moving them around on belts/trains/bots that's actually fine... since even with all the spaghetti mess you still have somewhat a clue about what you are doing.

Can't say the same about a 50 combinator contrapion wire mess. It's like "Omg scrap it... if I don't get it." ... which basically happens all the time.

Like aober93 wrote... hard to maintain, hard to understand... and only 2 combinators can already cause it if they are somehow trapped in a feedback loop.

So while the Circuit Network truly is very flexible and a masterpiece on its own, the practicability of it is still... questionable. At least in my opinion.
Yoyobuae wrote:
Gertibrumm wrote:I also prefer combinators the way they are now, they might be improved but not with bitwise logic I think. Also clicking through <,>,=,AND,NOT,OR,… is too much! maybe for a sepearate combinator or specific button inside the current GUI.
In the poll about circuit network features it was mentioned the possibility of switching GUI of circuit condition operation to a drop down (so 2 clicks only).
Yay... Finally. I like pull downs a lot more than "click until you die"-GUIs.

I already hate that in Sim City 4 because Maxis never implemented true modding support for the UI... so a lot of the mods are stuck with abusing an endless rotation of items... cycling through with one button. And if you only went one item too far you can do a whole round-trip again. Urgh.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: And / Or etc for circuitry

Post by DRY411S »

equitime77 wrote:I had a very brief look for this, but couldnt see it. It would be really good to have for instance an inserter or a train station work if there were a certain amount of iron ore OR iron plates in the system for instance. This could be useful for other things too.
+1 from me. I just posted a similar request (forgot to search, sorry moderators :oops: )

With maps getting larger and larger, and trains taking minutes sometimes to travel to far flung outposts, I'd really like to have a 'dashboard' at the centre of my factory telling me about ore levels in each outpost, or plates in a smelting factory far far away (2 examples). It IS possible to achieve what I want with existing combinators but 3 more combinator types would be most helpful.

Integer functions (DIV, MOD, x^y, factorial!)
Logic (AND, OR, NOT, etc)
Bitwise (Lsh, Lsh, Rol, RoR)

Before anybody says "but who would use them?" well, I would, and it seems to me that they'd be fairly straightforward to implement.
Yoyobuae
Filter Inserter
Filter Inserter
Posts: 509
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: And / Or etc for circuitry

Post by Yoyobuae »

DRY411S wrote:Integer functions (DIV, MOD, x^y, factorial!)
Signals are integer values. So Arithmetic combinator division is actually integer division.
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 731
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: And / Or etc for circuitry

Post by DRY411S »

Yoyobuae wrote:
DRY411S wrote:Integer functions (DIV, MOD, x^y, factorial!)
Signals are integer values. So Arithmetic combinator division is actually integer division.
Indeed. DIV would be no different to '/', but it would help readability.
Yoyobuae
Filter Inserter
Filter Inserter
Posts: 509
Joined: Fri Nov 04, 2016 11:04 pm
Contact:

Re: And / Or etc for circuitry

Post by Yoyobuae »

DRY411S wrote:
Yoyobuae wrote:
DRY411S wrote:Integer functions (DIV, MOD, x^y, factorial!)
Signals are integer values. So Arithmetic combinator division is actually integer division.
Indeed. DIV would be no different to '/', but it would help readability.
Eh? I didn't know the assembly language DIV mnemonic was actually common knowledge.

Readability for who? Software engineers? Not all players have that kind of background.

Similar problem with MOD and even x^y (but there's no other good option for those).
Post Reply

Return to “Ideas and Suggestions”