Re: Optimization idea: abstraction
Posted: Thu Mar 12, 2020 8:28 pm
How so? Are you telling the devs to make assemblers that only make Advanced Circuits? How are you connecting them? Are these connections pre-built too? Will they accommodate all permutations of logistical delivery? Of course not, right? Then you are wanting the program to identify and abstract on the fly, tasking the program to build and unbuild these abstractions as needed. All that takes processing power too.StephenLynx wrote: ↑Thu Mar 12, 2020 8:28 pmInstead of processing hundreds of entities like inserters, items, belts, assemblers, you process one thing.
Because you can infer the result and you can cache this inferential information. And no, you don't have to account for literally everything in the game. You can limit the cases. I am repeating myself here, read the thread.netmand wrote: ↑Thu Mar 12, 2020 9:49 pmHow so? Are you telling the devs to make assemblers that only make Advanced Circuits? How are you connecting them? Are these connections pre-built too? Will they accommodate all permutations of logistical delivery? Of course not, right? Then you are wanting the program to identify and abstract on the fly, tasking the program to build and unbuild these abstractions as needed. All that takes processing power too.
Yet you continue it by saying that we have to make assumptions which we do not know will be true to implement this, thus inherently changing the mechanics.StephenLynx wrote: ↑Thu Mar 12, 2020 4:02 pmYou should read the thread. I opened by saying this wouldn't change anything at all as far as features or mechanics go.
Sorry, but that's quite offensve. I've modded several stuff, helped improving many mods and libs. And wrote a little mod myself.eradicator wrote: ↑Wed Mar 11, 2020 9:31 amI'm sorry, but as a modder that is all laughable to be polite. No personal offense meant, i realize you're not a modder and just enthusiastic.
Check out your terms: infer, cache, limit. These all take as much if not more processing.StephenLynx wrote: ↑Fri Mar 13, 2020 12:50 amBecause you can infer the result and you can cache this inferential information. And no, you don't have to account for literally everything in the game. You can limit the cases. I am repeating myself here, read the thread.
How does a cache uses "as much if not more processing"? You could argue it uses more ram. But how does it uses more processing? Why do you think we have cached shaders, cached web pages both on servers and clients?
There's nothing to refute. It's all just waffle.StephenLynx wrote: ↑Fri Mar 13, 2020 2:26 pmI know I have enough software development experience to talk about the things I am talking about. Do you know enough to refute it?
Regarding cache:StephenLynx wrote: ↑Fri Mar 13, 2020 2:26 pmHow does a cache uses "as much if not more processing"? You could argue it uses more ram. But how does it uses more processing? Why do you think we have cached shaders, cached web pages both on servers and clients?
And how does a limit would use more processing than not limiting it?
While calculating what has to be added to the cache surely requires processing, it would heavily compensate to the data that doesn't need to be processed anymore due to the optimization. We are talking about dozens and dozens of entities being checked several times per second. Fetching from the cache is trivial because you can index the abstractions by map areas being entered/left. The only merge with the rest of factory that would happen would be putting the abstraction products into a belt. And you can isolate areas that can be treated like some sort of assembling machine. For example: you check if the part being abstracted has to interact with a logistics network. If so, you don't abstract. Mind you, just because you are abstracting entities in an area, that doesn't mean you have to abstract the whole area. It's not hard to see what's interact with what. If the train is just going through the area but doesn't interact in any shape or form with the assemblers, directly or indirectly, then you just ignore the train. And measuring the production and consumption of 1 thing is much faster than processing 30, 100, 200 things. About fluid dynamics, if the flow is consistent, you can still abstract it.netmand wrote: ↑Fri Mar 13, 2020 3:19 pm
Regarding cache:
Adding more data to cache increases processing requirements. The need to "infer" or rather rebuild non-predefined entities to represent pieces of the factory, storing them in cache, tracking which parts are abstracted, then merging results with the rest of the non-abstracted factory presents another level of processing that is not being accounted for here. You can't treat an abstraction like an assembling machine; a train could be running through it. We still need to measure the production and consumption of the items within the abstraction. Dare I mention, fluid dynamics?
Regarding limits:
We can write a function that yields a result, but if the results need to be limited, the function will also need to check values along the way and add processing to yield results within the limit.
I was hoping to have an academic discussion about your idea of abstraction, and how we could use it to optimize the game. It appears I'm not going to get it. When the idea is challenged, you're just saying the same thing over and over instead of having a working discussion that overcomes challenges put to the idea. While you assert your beliefs and brag about your experience, the reality is very very different.StephenLynx wrote: ↑Fri Mar 13, 2020 5:06 pmYou could just perform the initial calculation on the first time the area is a given distance from vision and that would be it. Reusing that data afterwards would be trivial.
Magic makes a lot of things possible. That doesn't mean it's possible. There are existing solutions like clusterio, that's as close as it gets to magic box factory abstraction.My suggestion doesn't change literally anything as far as the player is aware.
Well, I mixed deterministic for "calculateable". You can calculate the throughput of a belt based construction for maximum filled belts quite precise. Versus you cannot do that if you want to calculate the throughput if the belts are below the maximum filled, because the throughput then will flutter too much.Deadlock989 wrote: ↑Fri Mar 13, 2020 6:37 amThis is just a flood of gibberish.
It is literally all deterministic. Because if any part of it wasn't then none of it would be. That's what deterministic means.
You see how many buffered inputs you can have and at which point these inputs turn into a subproduct, like the gears. When you stop the simulation, you place the buffered inputs further from the end as possible to avoid rushing the production. Then you also see how long does it take for items to start coming out of the simulation and add that as a buffer for finished products. The rest is just producting items in the same rate with the same productivity bonus.