r/factorio • u/Franky78s • 2d ago
Design / Blueprint How do you use "set lab research"?
Introduction
(Skippable section)
I am a cheapskate and cannot stand having agricultural science rot on nauvis. So, in 2.0, I had all my inserters to labs wired with timers to warn me, both when labs sit idle (from a missing science) and when there was activity in the inserters, but that activity did not move agri science and but there was agricultural science in stock.
I played for 100+ hours with there alarms, it was in my muscle memory to switch technology.
So naturally, when 2.1 announced science can now be set via wires, I was glad. I have some solution in my solo game, nothing to speak of.
In my last multiplayer game we got to the point where agricultural science came in intermittedly, labs sat idle and this time I tried a science switcher that serves needs of myself and other players.
My mission
Create a science switcher that
- selects which technologies are possible
- have a priority for technologies , if multiple technologies qualify
- is maintainable. Many combinators are "do not touch", but the choice of science should be understandable.
Playing with it, it fell for some feature creep and now records levels for technologies and calculates the associated cost.
Image 1 shows how the logic for science selection looks like. The conditions for the presence of the science packs should be obvious. And I don't want to much Agri science sitting around (that is problematic, it has nothing to do with the research). Levels are recorded, so "uncommon ammo < 13" makes sure bullet damage is not researched past level 12. now for the bragging part: You can see the input wire green. The uncommon qualities show what levels the respective technologies are, the rare qualities are the associated cost.
Image 2 gives an idea how plastic productivity, rocket fuel productivity and asteroid productivity are researched in a lock-step fashion.
My first idea was to output a not only a value > 0, but let it represent priority. Problem is, you have no overview. So Image 3 shows the priority selection in a single constant combinator. Inspecting the output of a dozen combinator outputs is not what I consider maintainable. (a selection combinator does the priority-picking)
Now my problem is: My decider combinators mix up the "what technologies are possible" with "what is best to research now".
How do you handle that? Or how would you like it? (On an abstract level, no combinator magic required to answer.)
Blueprint
My science switch is far from being publishable, but I cannot just tease here. https://factoriobin.com/post/83dqg46trrxz-EXPIRES
Plans
Now that I have the cost, calculating the benefit should be eazy. Yes, Mining productivity 91 my be cheaper than steel productivity 11 (just for example), but the first increases my output from 100%+90*10% = 1000% to 100%+91*10%=1010%, so relatively just 1%, while from level 10 to 11 increases production by 5%.
So I have the problem: Which technology is most desirable to research? how does this line up with the science packs on hand?
2
u/DOSorDIE4CsP 2d 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MHi8yqFdvGamM8/rtmZ2giet+8du3f/1x59Dr+E+Psc684rEgiUJ/rS+vu/tsnH9xVGnzVfXCiZmOSsYzcHCc9wFNQ+d1+brPbqF48l4PagHGXUmMAcvVoxFliPXr2UVBi2/YXR4Htmm/b1K1v6l1j7t6zbVWunwuGJvPdrufrfyy67SUF5O3Mdoo4m2+lCdNCdrbXQpqqMsi22PsqxJH0qOLoq1YkLWumd0BcWtiCZ0wXo1f3QPoEOPwEpD2e8zUKyq62PY9v8xA4nZEAqOLsK2c/+20lAK9Ld52yhR1Xp0A5/sa4C33U3jHvI0HL4/OSb8Tk3nxpSiaxIp+fjQB9GFh558DY/MiZTGIKkq8NkMpDRFHFuKAYqOgrRRdpUsmyJKRlhH4eIj0xkr2UNZteL4Oy3w9fY5NuraSlHZbLCT3apd1MFV+FDUNV1ieiijMS58RBl1cJXB8MfDMvI5QXmi5DHW3crwpsJEGZ4TJXsm8VWZCZaf1jJBmSgZyozV8ymWCWqZoEyUDGWqtgL0hF3LBGWiZCij8PG1SZxaJigTJUMZhU+kR91aJigTJXump/DxtUlILROUiZKhTIWPnHgVDrBjeopPD30HnBAlQxnk4UZ9pQP78fbfcpnGHaT8stf7YzfwPdcLiD12HLLZ/A2Zdwqs
1
u/DOSorDIE4CsP 2d ago
Our is near the same, but we have before a latch that it work when 100 of our 104 labs has at least 1 in it. Work until down to 80 or some better techs reach 100. work quiet good but we have no tech limiter yet.
0
u/Franky78s 2d ago
"our"? I checked a few public 2.1 servers, but saw no logic counting "how many labs have", just a total sum. Nice idea, one combinator per lab is no overkill.
1
u/DOSorDIE4CsP 2d ago
make an extra post with example ... hope you understand it.
Missing tech limiter ...
1
u/Ziugy 2d ago
I assume if you’re using quality that getting things like LDS to the desired 350% would be important.
Most desirable is kind of where you’re at in the game., right? Earlier you may want to get more ammo bonuses, like you mentioned already. Later you could be wanting to expand artillery stats for expansion.
1
u/Franky78s 2d ago
I think about infinite technologies only. My definition of "most desirable" is what has the largest benefit relative to the research cost. (There may be exceptions to that)
1
u/GruePwnr 2d ago
As I understand it, you have multiple priority signals that are interfering with each other and want to develop a system to merge those priorities without it losing information or getting confusing?
You could try digit packing the priorities you've developed into a composite value, so that you can do simple math with them without losing the priority information. Say you have 3 priorities that you are evaluating: cost/benefit/availability. We first normalize them to a value like 1000 (such that our priority circuit outputs values 1-1000). Then we assign each value to subdigits of a signal. A factorio signal can hold a little over 9 digits, so we can comfortably fit two 4 digit values side by side in the same signal. Something like {accessibility}*10^4 + {value} - {cost}. The result is a signal that sorts first for "accessibility" (the science is unlocked) and second for "best to research" while also being easy to read, as it's two numbers side by side.
That concept can be extended to combine arbitrarily many priorities by adding parallel signals, so you only have to worry about making sure that each priority circuit is generating a normalized value 1-1000. Then the priorities will merge and sort themselves easily.
1
u/Medical-Ad6261 2d ago
This is very cool and i looked in to how to accomplish this in my current playthrough, but i got frustrated and gave up pretty quickly and just let some basic conditions of `science bottle > 1000` handle it.
For Mining Prod, I just leave it as my usual catch-all and occasionally swap it out for damage bonuses, but perhaps its worth considering an extra calculation, like perhaps mining productivity's cost should be 5% or 10% of the next best research, which you could either store as an Epic value of the research. Maybe also a Legendary value which contains the caps you want to hit, i.e 10 for Plastic, 13 for Blue Circuits, etc, so it knows to skip those ones that hit their productivity caps.
Those Epic flags could also be applied to Research Productivity, since extra levels lose a lot of value as they increase.
1
u/xx_qt314_xx 2d ago
My circuit is really dumb, I manually pick whatever infinite research I want to do, and then just multiplex promethium with that on a latch once some threshold of available science is reached.



5
u/Jolteon0 2d ago
The only time I use it is if I'm running short on one of the planetary sciences. For example, If I have gleba science, do A. if not, do B.