More Expressive Combinators

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
KeepGridButton
Burner Inserter
Burner Inserter
Posts: 18
Joined: Sat Nov 14, 2020 2:39 am
Contact:

More Expressive Combinators

Post by KeepGridButton »

There's alot of scenarios where I have a solid idea of the boolean logic I need to accomplish something, but the lack of expressiveness in combinators makes it very tedious. And I cannot emphasize enough how this tedium is multiplied when you're in space constrained scenarios where you start having to pick up and move components, and troubleshoot reconnecting the edges of what was moved. Even taking a screenshot before moving doesn't help alot, because wires so perfectly cross connections espetially on vertical combinators that sometimes it's hard to tell what's connected to what. Yes I know wires are kept when copying multiple, but I'm talking about if you need to move smaller sections or individual components.

Simple things like not being able to separately compare the same signal on red/green wires, i.e. separating them as parameters, requires extra steps/components just to "prepare" the signals for a simple boolean comparison. What is a combination of simple boolean logic can easily quadruple in size and complexity.
Every circuit related suggestion gets the response "But you can do that with W, X, Y, and Z." We're in agreement. The lack of expressiveness requires significantly more tedium. That just solidifies my point regarding the lack of expressiveness.

It's not fun.

You could code your own copy of Factorio using machine code, but that wouldn't be very fun would it? I don't understand why the criteria for dismissing suggestions is simply "you could do it a different way". Alot of people have great ideas for solving problems in a unique way, they just need better building blocks to do it. When you expand the expressiveness of their toolkit then a greater variety of solutions can emerge.

"You can use a constant combinator and a combinator to do multiple conditions." That's fine for very specific use cases, but it's not a general case. You cannot decompose the grammar available in a train to an array comparison using a single operator.

Many of the solutions to the general problem have been suggested, or implemented as mods. Some of the mods crash, some of them no longer maintained. Using mods for your circuit logic is risky because then you're stuck whenever they are no longer maintained and you have to choose between updating and breaking your circuits or staying on an older version.

I'm sure lots of circuit experts will jump on the thread to explain to me how I'm a idiot and I must be doing it wrong.

If we could unlock a more advanced combinator that gave us the expressiveness available on a train, and address green/red wire signals separately, that would be a good starting point.

People will argue "no it's easy". And when they show you what "easy" means they're doing what would otherwise be simple boolean logic with an extravagant number of components and connections.

I have played the game for a long time, and made lots of working circuits and used lots of the advanced methods.

Why do we have such an expressive boolean grammar for trains? If this rational holds, make us use circuits inside the train.

My only point is I find it's not fun. There's a multitude of ways to solve the problem, and they've been suggested, and shutdown by un-fun alternatives. My core suggestion is stop using "you can do that a different way" as your primary rationale for dismissing suggestions.

robot256
Filter Inserter
Filter Inserter
Posts: 847
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: More Expressive Combinators

Post by robot256 »

This is a fair analogy and criticism. The features we have in train scheduling were added over time, as gameplay evolved, and some were requested for years before they were added.

Circuit networks are probably the least-used game mechanic by average players, so it is understandable that circuit QoL would be last to improve. Part of the problem is how to decide what tasks are "common" enough to warrant adding complexity, and how to identify which features can actually reduce complexity by their addition without making the game "too easy".

astroshak
Filter Inserter
Filter Inserter
Posts: 635
Joined: Thu May 10, 2018 9:59 am
Contact:

Re: More Expressive Combinators

Post by astroshak »

I get the sense that there is one thing in particular that could be made as a circuit network device. Its commonly suggested as an answer to some problems ..

A SR Latch. Sends a signal out when an input signal drops below some configurable amount, and stops sending that signal out when the input signal rises above some other configurable amount.

A couple of other devices I could see being useful would be Minimum and Maximum Limiters - devices that take a signal in and set a minimum (if it drops below some amount, output that set amount, output the current signal if its equal to or greater than that set amount) or maximum (if it rises above a set amount, output that set amount, output the current signal if it is less than or equal to that set amount).

Bear in mind, that additional creations such as this can only decrease the complexity for specific applications. This SR Latch device would not, for example, impact dynamically setting the Train Stop Limit.

Another device, more of a QoL device than anything else, would be a delay. A device that takes all signals in, and then outputs them X (configurable) ticks later. This would simplify maintaining synchronicity across parallel combinator logic paths without recourse to repeated Arithmetic Combinators set to Each + 0, output Each.

Tertius
Filter Inserter
Filter Inserter
Posts: 904
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: More Expressive Combinators

Post by Tertius »

KeepGridButton wrote:
Fri Feb 11, 2022 6:02 pm
I'm sure lots of circuit experts will jump on the thread to explain to me how I'm a idiot and I must be doing it wrong.
Definitely not. The game can be improved in this area. My workaround to the first problem you mention is a save with the sandbox mode. I design all my blueprints (even casual ones, and especially ones that contain circuits) in the sandbox, then move to the real game, and just use them there, because it's so inconvenient to tinker with and to develop stuff in the real game. In the real game, I just put down all my prepared blueprints. If I don't have bots yet, I put down the blueprint, then act as a bot myself to build. 66% of my time is spent in sandbox mode designing stuff, and only 33% in the real game using the designed stuff. Would be nice if that ratio can be shifted towards the non sandbox game.

I terribly miss the possibility to move a factory or parts of a factory or small parts of a tiny installation. It's all first deconstruct, then reconstruct. Very tedious if there are full chests to be moved. And moving one combinator 2 tiles with all wires still connected - not possible.

With more complex operations of combinators, well, that would be nice, but not first priority if you ask me. More convenience for tinkering with the buildings would be higher priority for me. May be also because I'm used to the current concept how combinators work with its basic logic and arithmetic features. You seem to think more along formulas or even programming languages. As a kid 35 years ago, I played with transistor electronics - combinators are the same concept. You seem to want one technical level above, like using pocket calculators instead of hard wired transistors. It's a design choice by the developers what they offer here. May be higher level circuit features don't align with their vision of the game.

coppercoil
Filter Inserter
Filter Inserter
Posts: 499
Joined: Tue Jun 26, 2018 10:14 am
Contact:

Re: More Expressive Combinators

Post by coppercoil »

Tertius wrote:
Fri Feb 11, 2022 11:08 pm
And moving one combinator 2 tiles with all wires still connected - not possible.
Picker Dollies mod.

robot256
Filter Inserter
Filter Inserter
Posts: 847
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: More Expressive Combinators

Post by robot256 »

astroshak wrote:
Fri Feb 11, 2022 8:25 pm
A SR Latch. Sends a signal out when an input signal drops below some configurable amount, and stops sending that signal out when the input signal rises above some other configurable amount.
This is an excellent example. A very common application with a not very intuitive solution in the current system.
A couple of other devices I could see being useful would be Minimum and Maximum Limiters - devices that take a signal in and set a minimum (if it drops below some amount, output that set amount, output the current signal if its equal to or greater than that set amount) or maximum (if it rises above a set amount, output that set amount, output the current signal if it is less than or equal to that set amount).
Also a great idea for simplifying an easily understood concept.

My most commonly copied "function" is an edge detector. Another really useful function is to output only the largest of the input signals. And of course signal selection, or pairwise multiplication, if input wires can be treated separately.
Bear in mind, that additional creations such as this can only decrease the complexity for specific applications.
This is not always true from a gameplay perspective. More options means players spend more time learning what they all do. If the list gets too long, it will be inconvenient to find the one you want and discouraging to new players. So any added behaviors need to be carefully considered and implemented with an intuitive UX.

astroshak
Filter Inserter
Filter Inserter
Posts: 635
Joined: Thu May 10, 2018 9:59 am
Contact:

Re: More Expressive Combinators

Post by astroshak »

That’s why I said they can only decrease complexity for specific applications.

There are many things that can be done (just look at the Combinator Creations part of these boards!) that these things will not affect at all. And there are plenty of things that they will make somewhat simpler, but an incredibly complex build made slightly simpler is still very complex.

Tertius
Filter Inserter
Filter Inserter
Posts: 904
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: More Expressive Combinators

Post by Tertius »

To really simplify large combinator creations (emphasis on large) , you probably need some kind of a programmable combinator. A combinator that is able to execute some kind of simple script, each script line representing one of the basic operations, so it is able to replace one physical combinator per line (more or less) if it also contains a few registers to store intermediate results and if it has more than 1 input and output.

This would help complexity, because it is easier to understand such a script instead of deciphering all the wire connections. Also later, if you revisit your creation some time after, or want to share and explain it.

I'm not a modder, but if there isn't such a combinator mod yet (I bet there is), I would design a programmable combinator that can be upgraded with input modules (each adds one additional input, each input goes into an internal register), output modules (each adds one additional output for intermediate results that were pushed into a register) and register modules that simply add internal registers. Each register represents a full set of signals. Perhaps a 2x2 entity to support 8 inputs/outputs or 3x3 to support 12 inputs/outputs.

mmmPI
Smart Inserter
Smart Inserter
Posts: 3575
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: More Expressive Combinators

Post by mmmPI »

I think it's fun that the problem is not resolved when i have an idea of the boolean logic, because i tend to think about the abstract part of the problem when i'm not in front of a computer, and then when i play, i know time will fly fast and be enjoyable when trying to implement my ideas. In some way if it was too expressive it would be less of a game and more of a "task".

but to some degree i rely on blueprints of small parts, i use a machine made by Tertius to see the binary representation of numbers, i have a min/max finder made by psznm, i have a combinator contraption that i don't even need the blueprint anymore to load trains known as madzuri's, one to make unsigned right shift i found on the forum, a multiplexer i made one time, and so on. Those are sort of intermediate bricks of logic, a little higher level than just combinators. They can be used to reduce the tedious sometimes, but if i can make things without reusing them it is more fun to me, most likely for the very same reason one could wish them to be partially implemented as a functionnality for a specific combinator. There are some nuances though, the case of the SR RS latch in particular comes to mind, there wouldn't be much "fun" loss to me if it was a single combinator instead of 2, and it would really i think make things easier for either complex builds and beginner altogether.

The possibility to separatly read quantity on red and green wire as input would also greatly simplfiy things the same way for my builds and simpler/beginner builds altogether at the possible cost of cluttering the UI ( not sure for 'experts' builds ) . The suggestion has been posted with different proposed implementation in the "suggestion" part of the forum with some convincing explanations.

There are also severals suggestions on train/circuits relations, including more options to read trains content, composition, fuel, ID , to change schedule, to make them skip stations, and many more. What is "more expressiveness" in a more explicit reformulation ? :D

Otherwise i use picker dolly when i know i will fiddle a lot with combinator placement, or i do without it and copy paste 10 20 50 version of the build one under another in sandbox, to keep a trace of what was working before i tried something that broke it. and it end up looking like a tree with forks here and there.

KeepGridButton wrote:
Fri Feb 11, 2022 6:02 pm
Alot of people have great ideas for solving problems in a unique way, they just need better building blocks to do it
KeepGridButton wrote:
Fri Feb 11, 2022 6:02 pm
I'm sure lots of circuit experts will jump on the thread to explain to me how I'm a idiot and I must be doing it wrong.
i mean no offense, it's not about being an idiot, but in the gameplay help section people will come by and try to propose "solutions", considering that if it works for them, and you think you need better blocks then you are doing it wrong.

In this case people try their best to come up with a "simple" solution so it can feel their disapoitment when it's deemed " too complicated". in this context, it can quickly become a "no it's you who are idiot" which is obviously counter productive even if it was true everytime it was said.

The context is a bit different when it's not about which specific solution is better to which a specific problem but about the pros and cons of a suggested modification of the game. In this case it's more likely the person jumping on the thread will have example of situation where the suggestion would help them to show support and other people saying the game will be irremediably altered. not so much of "my solution is the best you ungrateful person won't spend even 10 minutes trying to understand it". type of answer even if that can happen sometimes :(

robot256
Filter Inserter
Filter Inserter
Posts: 847
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: More Expressive Combinators

Post by robot256 »

astroshak wrote:
Sat Feb 12, 2022 5:45 pm
That’s why I said they can only decrease complexity for specific applications.

There are many things that can be done (just look at the Combinator Creations part of these boards!) that these things will not affect at all. And there are plenty of things that they will make somewhat simpler, but an incredibly complex build made slightly simpler is still very complex.
I misunderstood. I thought you meant the only thing it would do is decrease complexity for some things, and not add complexity to others. You are right that it will decrease complexity for only certain things, and could have a different impact on other things (from the player's perspective).

The key for any addition is to make sure the new behavior and its user interface is much more understandable than the macro it is replacing. For example, I would not want to add a special "counter" block which replaces a single "each = each + 0" combinator with its input wired to its output. But we also cannot add a new behavior that has more than 2 or three inputs, outputs, and options, because it would be too difficult to explain.

A threshold detector which replaces between 2 and 4 combinators would be great. It would give a single pulse output when the input crosses above or below a threshold, to be used as a boolean edge detector or a hysteresis detector. A proper set-reset latch component would also be much better than the current macros (which frequently have the problem of contaminating the output signal with internal variables). Connect the two of them, and you have an intuitive description of a hysteresis latch for factory control, without making a single-purpose entity or too many parameters in one entity.

The set-reset latch entity would also allow closer mimicry of real-life FPGA programming, which is the closest analog to how circuit operates network. Parallel operations where each output is latched by the same synchronous clock are easy to analyze if you know what you are looking at. A few more basic operations are needed to complete the analogy.

I'm looking at the combinator mods that are currently available, and they are quite buggy and have pretty random mixes of features. If we want to make a strong suggestion for the Factorio devs, creating a mod to demonstrate "vanilla-extended" combinator behavior would be the best way to do it.

Post Reply

Return to “Gameplay Help”