0.13 Smart supply-train loader + other solutions

Smart setups of railway stations, intelligent routing, solutions to complex train-routing problems.
Please provide - only if it makes sense of course - a blueprint of your creation.
MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

Re: Smart supply-train loader

Post by MindChanger »

For me simplisity is when you don't have to think much about solution :)
Also I don't check actually what is in wagon

________________________________________________________________________________

Okay I did small test for the given items as example:
Image

My first solution with robots: 1:06.15

Results for high tech (without robots):
XKnight's solution: 0:17.36
My 2nd solution: 0:22.91

My 2nd solution probably will be faster with lower tech, as it is not optimised and "randomness" with smaller amount of items will be easier to get desired amount.
XKnight's solution is faster but harder to implement (I mean not placing blueprint, but setting constants for techs if not maxed tech) and keep up with tech upgrades.

XKnight
Filter Inserter
Filter Inserter
Posts: 329
Joined: Thu May 28, 2015 10:40 pm
Contact:

Re: Smart supply-train loader

Post by XKnight »

Your measurements gave me an incredible idea.
There is one thing I enjoy very very much - The Challenge. The Challenge is an event when several people (or groups of people) have the same requirements and they have fixed (or at least limited) amount of time to complete The Challenge.
Lets make a small supply-train challenge: completely fill a single vertical wagon with a different items (they should be agreed by participants) without moving this wagon. You can use everything you want and each solution has its own score = loading time + 5 second for first combinator + 10 second for second + 15 seconds for third and so on + 1 minute for first inserter + 2 minute for second +... (or maybe I should use larger/smaller numbers?)
Only 3 rules:
- wagon should be filled
- all techs should be supported
- no mods

Case
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Tue Jun 28, 2016 9:25 am
Contact:

Re: Smart supply-train loader

Post by Case »

Ok you got me :)
Cargo
stack inserter Condition
long handed Condition
Its not fully finished but it should show the concept. The trick is the long handed inserter takes the "hold item" out of the stack inserter.

I will fiddle with it a bit later but you said every solution has its own score :) .. I'm to overtired for now

MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

Re: Smart supply-train loader

Post by MindChanger »

XKnight wrote:Your measurements gave me an incredible idea.
There is one thing I enjoy very very much - The Challenge. The Challenge is an event when several people (or groups of people) have the same requirements and they have fixed (or at least limited) amount of time to complete The Challenge.
Lets make a small supply-train challenge: completely fill a single vertical wagon with a different items (they should be agreed by participants) without moving this wagon. You can use everything you want and each solution has its own score = loading time + 5 second for first combinator + 10 second for second + 15 seconds for third and so on + 1 minute for first inserter + 2 minute for second +... (or maybe I should use larger/smaller numbers?)
Only 3 rules:
- wagon should be filled
- all techs should be supported
- no mods
Interesting idea, but I don't know how it will be about time and I think I am not as good as you in creating algorithms, so will lose :D but for sure we can try in this topic creating better and better system by competition (all players, not only us) :)
Case wrote:Ok you got me :)

Its not fully finished but it should show the concept. The trick is the long handed inserter takes the "hold item" out of the stack inserter.

I will fiddle with it a bit later but you said every solution has its own score :) .. I'm to overtired for now
Wow it is now nice idea! I will try to make it work too, if you don't mind!

Edit: tried it with stuck detection, it doesn't do the trick (it picks up from the train, not from inserter)

I got another idea. How about not filling to 100%? That's really low possibility that the player will need exactly full stacks and the loading times can go off a lot in this situation, which is good.

Code: Select all

If (isInsrterStuck()){
setItemsToStopBeingSupplied()
}
else{
supplyItems()
}

[...]

when [train comes]{
clearBlockedItems()
}
Okay, did it. Test (same as previous) - 00:09.49, so it is fastest way so far :P to full stacks 1 yellow and 2 red belts missing

Code: Select all

H4sIAAAAAAAA/81X3Y6iMBh9lQmXG7qRCo6TWTaZ55hsSAc+pVlo2VLMGOO7b1sULQMIuCbrjSHl+zs957Qk/CnjMcmeovAATFJJoQwPB0ZyCB1BaIZKumUk
c9yCl2qVs/DwGaL198Ddh2j5PTi6CRUQmxXsxpxJwbPoA1Kyo1yEh5iKuKIyijNeQlQnCzckK8E9LwkgyXlFigqOOg2rc6pm3h3P+RUetgJAFa+73Ec0Cb3l
Uf/cU7dStctQKXnRanalW/WvG101QWbEODWRHYP2zNmEl7roNpVI52ljpCPx9LjVzDh/ZhyeF7eYFzaz2szhZmI5uHU5yTIEmVoQNEYFz6C9gYY0C82ZkURW
yS9PeGHROuNbWkpVKU6hlIiobDtAheA7moBoodRUbsI3NJMgEGUlCNn9Pjq32iPdnCcQ8U3ECxDEhHpjJ8O4Ubl+sgZTGUpJmEQxzz8oI5K3urvC8Uq6YzF9
tkFdzamNuoq3UKoB1qZ5srCD3BeqBJWQO25jTawsuJDoAzLpaPQqJkPPpSyBT7P//cEborb9RgY8mMEQvB2izXMslisLS29tYamAjH+jQZ4FnWj60zhnnxcp
YUmk41VfpTk2mnWzZF7SWfrIKiAZoGpLkr69dnQ7CTcgWwF/KvXfDYwl2Nv+sjBB3gR/WdrTrFvTXLVNBJVpDqbxHmlgUx53OcYlWm9NQk+NbagoZWTzc0eF
rPRxe5raLCLTu6Fqrc8Qee6FAs43x+WVLKpJyUbTHD+3zcp9d3DPuwMYJhBra+4FcGkAXN6SwinNTCTfbBQD9ZAXROhuQufHJBxhB2IvU8q2Jmexj4yTRBvB
84gylaa+to3TmXaPDvnYErsG/4tQ29B3iTGYZvfLi6SGr7N9bj+0Cdp1ffziv6ye8UvQeP54XrbdZwLX/LNYH8k1whp6lKBTTGDohZQ/J5Hy7ZFcXA64/w1f
8AdOEXyX767OtvEA3wUSp//Kdutc49m9noDurFucN+8GiQO7Mde+EU1RYX1k+l1bd5/yvpyXizskdUnWJSvzzf6YXfXu9bf/HdkRJ+gQvMNXVTxwucPd/uYN
xC/uPHrtW1TLAYOvO310aWyGvf0Bczk5XwXISrCn6BVY8heCbLYexBIAAA==
But I see it can stuck if it supplies to fullstack (due to filter limit). So I have to create timer for when it doesn't have anything and delete the last item type from the filters for this inserter.
Last edited by MindChanger on Thu Jul 07, 2016 7:23 am, edited 1 time in total.

Case
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Tue Jun 28, 2016 9:25 am
Contact:

Re: Smart supply-train loader

Post by Case »

uhh .. yes this is a good example that you should not post when overtired :) (I could barely type at this point)

I thought I give it a quick try and it looked like it worked. Unfortunately it was working because I forgot to set all research to max and so I had only stack bonus 2 for the long handed inserter. And it looked like as the long handed inserter would grab from the stack inserter.

Sorry mate for misleading you here.

I will see if I can come up with something a bit later.

MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

Re: Smart supply-train loader

Post by MindChanger »

Case wrote:uhh .. yes this is a good example that you should not post when overtired :) (I could barely type at this point)

I thought I give it a quick try and it looked like it worked. Unfortunately it was working because I forgot to set all research to max and so I had only stack bonus 2 for the long handed inserter. And it looked like as the long handed inserter would grab from the stack inserter.

Sorry mate for misleading you here.

I will see if I can come up with something a bit later.
No problem! I think I created now the most optimised solution (up) for no fullstacking. But for fullstacking we can think about faster ways, but it will be always slower than my new idea I think.

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart supply-train loader

Post by siggboy »

XKnight wrote:And again, how can simplicity be measured?
What is simple and what is not?
Is placing down blueprint from the book simple or not?
Simplicity can be measured by the amount of information that is required to reproduce the system.

If you need 1000 bits to encode a system it's more complex (= less simple) than if you only need 10 bits.

Placing down the blueprint is simple, but the placement of the blueprint has the same complexity for any blueprint that you place. So this makes no sense when thinking about the simplicity of the solution.
I am 1000% sure that every @siggboy's requirement can be done without breaking the others, but for me it is just a question of joy or necessity. To be honestly, I've listed all things which is not important for me in my own build... I feel like I've tricked you, I apologize.
No, you haven't tricked me. I don't care for what reason you listed those requirements, and also after all I've answered "not important" to most of them, so we seem to agree on most principles anyway :).

Some things are also simply a matter of taste (much like what editor to use or what indentation style or how you name your variables). I personally don't like the liberal use of constant arrays and integer magic in order to solve problems (in Factorio). Even though that makes some amazing stuff happen, it simply breaks the spirit of the game and the low-fi nature of the combinators. A.k.a. it's not "supposed" to be possible...
Of course, many things are simply impossible if you don't use these kinds of tricks.

As I've said above already, for me the most important thing is that the solution is practical -- and that includes that it's easy enough to understand, as well as it does solve a real problem.

Best possible example for this: The Smart Loader (Madzuri's version, that only requires 1 combinator). This is the textbook example for an elegant solution that is simple and solves a very real problem. It could not be any better than this.

Some designs are completely impractical and/or don't solve a problem, but they're still beautiful and nice to look at. However, I don't really care about those because it's not Factorio.

Example for this: Tetris. You made an awesome Tetris, but the interesting thing is not that it's Tetris, but what principles you used to implement it (for example how you store the game state by spreading the bit-field over a number of symbols in a register).

For me, the real and interesting challenge would be to learn how to apply some of these principles with combinators -- what I really don't find appealing at all is to actually build these things with combinators. Because building them is not interesting anymore as soon as you know how to apply these very advanced techniques in principle.

If the problem becomes complex and interesting enough itself, I'd rather solve it with a programming language that I actually enjoy using, and not with combinators in Factorio.

Or I build an actual real life circuit with an Arduino board, because that would be something that I impress my friends with, who couldn't give a fuck about Factorio, :lol:

After you've built Tetris or Conway's Game of Life you know that anything is possible and that you could, in principle, do it. That part of the game is over, then. Quest chain has ended.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

Re: Smart supply-train loader

Post by MindChanger »

Well, in programming we use tricks too. Why not in factorio? it requires thinking too :)

Beside that I am working now on my last idea. Easy setting materials to get by robots and making system without danger of being stuck. So far goes well, it will be big system but will allow a lot of different types to be put in the train.

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart supply-train loader

Post by siggboy »

MindChanger wrote:Well, in programming we use tricks too. Why not in factorio? it requires thinking too :)
Solving a tricky problem by applying a nice idea is always satisfying, there's no question about that.

However, in Factorio we're in a simulated game world, and then part of the satisfaction also comes from staying true to the spirit of the game.

In other words, "bending the rules" can take away some of the fun if you take it too far (even if that requires skill of some sort).

A very simple, and good, example, is chaining underground belts of different speeds on top of eachother, so you can basically run three separate belts on the same row of tiles. This is super useful for making compact designs, and a clever solution, but many players simply refuse to do it, and they consider blueprints with that technique to be "sub-par", even though they might be more compact and efficient.

Because this is "bending the rules" and it just doesn't feel right.

Let me give another example: many speed runners in action games abuse "glitches", like falling through the floor, in order to reach the goal more quickly, or skip entire levels. This often requires a lot of skill and intense practice, but if you're doing that you're simply not playing the game anymore as it was intended.

Now, if we create a general purpose CPU in Factorio with all sorts of advanced features like interrupt handling and instruction pipelining, then that's without a doubt an impressive feat. Now you proceed to run the entire factory with the CPU, by using programs written in assembly language that were translated into machine code with a LUA script, because feeding the machine language directly into the combinators would make you literally insane.

Is that still Factorio? I'm not so sure about that.

Take my train scheduler: right now it's simple enough that people can understand it and use them in their games while still having a feeling of agency and control over what their factory does. It would undoubtedly be better if somebody gave them a high performance general computer and an assembly program that runs the train scheduling for them. That would be a lot less satisfying because then a huge, opaque, machine would be doing all the work, and it's not your own world anymore.

That's also why mods should not be too OP, or else there's nothing left anymore for you to do.

This is a grey area, and everybody has to find out for themselves what they enjoy.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

Re: Smart supply-train loader

Post by MindChanger »

Yeah it can be like you say, but well, everybody got another taste. Adding mods, even op is adding content to the game, those mods are not installed from the start, you can choose to install them. I think factorio is still factorio even if you do computer there. There are no rules about using environment. Ofc some games have glitches, but Factorio is another kind of game, I think. If it lets you do computer with all the parts it is not glitch or anything like that, for me. For me it is using environment like in real life, like in real programming. But this is my opinion and everybody have right to have theirs :) I personally don't like to use mods if I can accomplish something by in-game mechanics

XKnight
Filter Inserter
Filter Inserter
Posts: 329
Joined: Thu May 28, 2015 10:40 pm
Contact:

Re: Smart supply-train loader

Post by XKnight »

siggboy wrote: After you've built Tetris or Conway's Game of Life you know that anything is possible and that you could, in principle, do it. That part of the game is over, then. Quest chain has ended.
Very, very and very reasonable, after reading your post I even think a bit why I am playing with combinators, why I am playing Factorio, or why my job is what it is. And I came to the next answer: result is important, but the process is even more important.
I enjoy solving problems and searching for the efficient solution in a way that no one can even imagine, combining not combinable and using not usable, that is my lifestyle. I will never say that something is finished or something can not be improved, if I don't know how to do it - it doesn't mean that it is impossible.
siggboy wrote:Best possible example for this: The Smart Loader (Madzuri's version, that only requires 1 combinator). This is the textbook example for an elegant solution that is simple and solves a very real problem. It could not be any better than this.
Madzuri's smart loader is great, no one doubts, but if we apply the same approach here we will end with 24 long-handed inserters or wagon loading by 1 item. Yes it is simple, yes it meets all your requirements, but will you enjoy creating or using such thing?
MindChanger wrote:Yeah it can be like you say, but well, everybody got another taste. Adding mods, even op is adding content to the game, those mods are not installed from the start, you can choose to install them. I think factorio is still factorio even if you do computer there. There are no rules about using environment. Ofc some games have glitches, but Factorio is another kind of game, I think. If it lets you do computer with all the parts it is not glitch or anything like that, for me. For me it is using environment like in real life, like in real programming. But this is my opinion and everybody have right to have theirs :) I personally don't like to use mods if I can accomplish something by in-game mechanics
Totally agree, if I would like to write some real program, I would write it using programming languages.
Where is fun in using mod with one super-puper assembler that is able to produce everyhing you want immediately wihtout any resources?
And devs always should be very careful with changing in-game balance, while modders can do what they want.

Meanwhile, I decided to add this lower tech support... actually, original target was speed and low tech support is a spin-out, but it doesn't matter. I didn't perform any measurements but it should be faster (at least because all inserters are stack inserters), also I won't describe how it works, because I've already waste my time on this thing. If you are interested you can try it by yourself, but I want to warn you - some dark magic was used there and it may harm you. Every time this contraption is built you need to sacrifice one combinator to the Dark God (actually there are two dark essences inside, but they will share your sacrifice).
Build
Last edited by XKnight on Thu Jul 07, 2016 1:08 pm, edited 1 time in total.

MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

Re: Smart supply-train loader

Post by MindChanger »

Nice! Will post it in my first post if you don't mind. I will test it for sure.

I created meanwhile system that works with any tech, with a lot of different type of items and it is fast as hell (9 sec using stack inserter, your first was 17).
It is easy too to setup items to be picked up etc. It just detects blockade, gets items back and doesn't let putting new ones. It will be never full stack, but due to that it is fast a lot.
I put there purple inserter, but can be changed for faster stack inserter (I did put purple for guys that didn't discover yet stack inserter).

Code: Select all

H4sIAAAAAAAA/+1abW/jKBD+K5U/nuyV39tozyft71idLGqTBK0DPkyiRlH+++GXOIEYG+ykvZWuX6qKzDDMPPPMA2lOXgqSgeIlTU4QM8QQrJLTCYMdTCwK
UOFUaINBYdklqfgqwcnpI3HevkX2MXGib9HZzhGFWbPi2xnBjJIifYdbcECEJqcM0WyPWJoVpIJp6yxZg6KC9mWJQpBfVhjdw3PtBrc+eTA/Lc/6OzltKIR8
8zbKY4ryxAvO9Y/dRct4uNipGCmlYOM61Pg20Lg3ao6YbRvLgYMqztmbV/Wmmy1zaj9yjmrL0NwunmkXzrTz59m588xm7jbzcDNzOVq6HSgKBxZ8gaLMKUkB
5QK2oPFq0GgimXu/+Wsl4LogG1QxvlW2hRVzAPd2gE5JyQHlkEppum7d269RwSB1EK4gZQoDv4tV0bw7ksOUrFNSQgoaU0/3aH7Q93n9l3CyikFYtMcSo4om
MkhhLm7yeruJx3e4DyQIpc/cBAIoYtsdbJJMdu8IA0akRHVF9YfSdDVP+WKOumDXiFbsQmwndiz5TgdE2b5mmS4DzaIDQba1Gs8VA5jxk9vXVFt/WDbZs3Jv
4uusW5/Al+tj/7R8BUzfhKyNAiu6Ada1jUIzkIkjYgtwXieY8YiqZlL0681S86Haiwqdd7AJREjcNqEfTUPKexVzZyshKeF+kkLcNnuuAYUEwvZiWUW05zCr
mUMJda/Z3JuqW+dmLuQPkB7ZFuENB34Faydadj+aPtmVgNaBJ9afRs3RWpdHHvQes3RNyS5FmFu3wkOb1NyRwnujPSSaSphbqYt24YaJqrWQGS9c27e1zNNP
Gc9WEvqrcBW/+qvIRjiHH02EszImHjvw1K2iwcx+c3D3KcTcHORRzNw506dmV5+al/R78Bn9/kPMYrSgiQXqMO5meQjwoaYG4zDvi7PhtjCy87uyDE2RyKzR
g8FGH7p7fUmjy3PTAIjhpZOfCUSAHzF2/nr+2BkA6iAYwxHdMk4acq3sEW1kKvw05pDx7ULOSOgawStWD4qFWkaS7+4CqPS+htDSvJvowiU20fLSJZPCf/b8
93Bt3addFtuC2t3u6ZW/Ohqy+5ceXJWEMucdFvzq2LFWbKxxgy+cecmjZ54JOIJYYokhYvkk+dHqt8GL9bL034m3JX15dWaa+2V3bn+xsHsyyG/m6UMS7T4E
4GNXexH8E9e1OQrmv47lB5OJ/MSnfodQEI2vtvdWIzfkpco7GLmUevKTopn+8T5f/mg/YvpTkf3O75mC7JnImInoed4LebDSEj1rwEN8gPJpx234ew2FR8sf
jUv+nURSouru2W7SmzGdBJ9PJybNET7vRuBpNQf8KCmsKp3+mHxfia9HmveOihjcWSNd2z+zxP3ziq31QvNegOxXb+5drBea+8vMg2Xm4TLzSDUZBtBtS7ga
alPDt7hYtzt1sPIcmLjLYOIug4m7DCbuMpi4xjARvyWWtKykRWNxVfoC7nVY677NAVj0GIApWPJ/PvoCPqpV3xABtfg42yhrrEeq2fzbyllZstuPDmjCi2Et
bL5TyPYUv6TfIc7/BeOe4PASJgAA

XKnight
Filter Inserter
Filter Inserter
Posts: 329
Joined: Thu May 28, 2015 10:40 pm
Contact:

Re: Smart supply-train loader

Post by XKnight »

Sounds promising, but I left the idea of using nut full stack after thinking on roboport (full stack is 5 items).
Also, filter inserter cannot have more than 5 items in filter (can this cause any problem?)
Edit: nevermind, wooden poles is an issue :D

MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

Re: Smart supply-train loader

Post by MindChanger »

XKnight wrote:Sounds promising, but I left the idea of using nut full stack after thinking on roboport (full stack is 5 items).
Also, filter inserter cannot have more than 5 items in filter (can this cause any problem?)
Edit: nevermind, wooden poles is an issue :D
Yes, filtering can cause problem, but I got it to work by setting temporary data about materials :)
The only thing that is left to do is checking amount of items avaible by roboport, but I think it can work without it too if there is at least 1 item per type to be loaded.

XKnight
Filter Inserter
Filter Inserter
Posts: 329
Joined: Thu May 28, 2015 10:40 pm
Contact:

Re: Smart supply-train loader

Post by XKnight »

Ok, and what stops us from creating the Holy Grail of train loader?
Lets do it!

MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

Re: Smart supply-train loader

Post by MindChanger »

Yeah :D updated my first post. I wonder if there is posibility to make this system smaller without breaking the system. Also I would like to think about some future that gets amount of items avaible from roboport and if there are no items in the system then it would just shut filtering for items that are no possible to be delivered

XKnight
Filter Inserter
Filter Inserter
Posts: 329
Joined: Thu May 28, 2015 10:40 pm
Contact:

Re: Smart supply-train loader

Post by XKnight »

MindChanger wrote:I created meanwhile system that works with any tech, with a lot of different type of items and it is fast as hell (9 sec using stack inserter, your first was 17).
It is easy too to setup items to be picked up etc. It just detects blockade, gets items back and doesn't let putting new ones. It will be never full stack, but due to that it is fast a lot.
I put there purple inserter, but can be changed for faster stack inserter (I did put purple for guys that didn't discover yet stack inserter).
I found an issue in this build:
Const combinators: 30 yellow belt, 30 red belt, 30 blue belt, 30 yellow underground, 30 red underground, 30 blue underground.
Wagon storage (this means train arrives to the station not empty): 50/50 yellow belt, 50/50 red belt, 50/50 blue belt, 50/50 yellow underground, 50/50 red underground and 30/50 blue underground.
As a result topmost filter inserter recieves only 5 first items in filters, and blue undeground belts are not loaded into the wagon.

MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

Re: Smart supply-train loader

Post by MindChanger »

Thanks for testing! Will check it. Probably filters failed somehow

Okay I seee. My temporary data wasn't cleared. This is one problem. Another problem is when there is full stack already in the train. I will have to do some work with filters to do the work.

Edit: it should be working now, tested several times. Sadly had to put stack inserters due to no signal prioritisation.
I uploaded new blueprints in first post

User avatar
siggboy
Filter Inserter
Filter Inserter
Posts: 988
Joined: Tue Mar 29, 2016 11:47 am
Contact:

Re: Smart supply-train loader

Post by siggboy »

XKnight wrote:I enjoy solving problems and searching for the efficient solution in a way that no one can even imagine, combining not combinable and using not usable, that is my lifestyle.
Solving the problems and having the right idea is the most important thing. The result is really not that important, but of course you always need a goal, which is the result, or everything becomes completely pointless.

What I enjoy most is when I have a good idea, and it works, and then later on I realize there is an even much better idea. The feeling that you can improve beyond a point where you might have thought earlier is not possible, that's really great.
I will never say that something is finished or something can not be improved, if I don't know how to do it - it doesn't mean that it is impossible.
Proving that something is not possible is also a valuable skill, and a very analytical way of thinking. It's often required that you first learn what is certainly not possible, so you won't waste time looking for solutions that you will never find.
Madzuri's smart loader is great, no one doubts, but if we apply the same approach here we will end with 24 long-handed inserters or wagon loading by 1 item. Yes it is simple, yes it meets all your requirements, but will you enjoy creating or using such thing?
That method would not meet my requirement of being elegant. Most brute force methods are simple, but simple alone does not make it effective, beautiful, or elegant.

My favourite design principle is related to Occam's Razor: take away things as long as you can, but never too many.

In Factorio, normally my top priority is "use as few combinators as possible", and never brute force anything. I'm even willing to take out functionality, if I don't consider it important, if it will make the circuit simpler (i.e. smaller).

That is why I love the 1-combinator Smart Loader so much. We did have the 2-combinator version, and then by applying this single idea of dividing by a negative number you cut the combinator count in half without sacrificing anything.

The elegance comes from the perfect trade-off of complexity and functionality. Sometimes realizing that a feature of your system is not important enough, and that by eliminating it you improve that ratio of complexity to functionality, sometimes realizing that is just a good as inventing something really clever. ("Re-negotiating the requirements.")

Many of your efforts are also in that direction, I was very impressed when I read the digital display thread where you managed to shrink the circuit past the point where I thought it would be possible. By the way it would have been great to read some explanation how you did it. In general you should try to describe a bit more how you solved things, like you did in this thread, it's really very interesting for many of us.
Is your railroad worrying you? Doctor T-Junction recommends: Smart, dynamic train deliveries with combinator Magick

MindChanger
Fast Inserter
Fast Inserter
Posts: 110
Joined: Tue Jul 05, 2016 6:53 am
Contact:

Re: Smart supply-train loader

Post by MindChanger »

Well, I understand that someone (not talking about XKnight, but overally) is not willing to describe solutions if they are complicated, solving issue is enough time consuming to lose willing to describe it all :D
Maybe it would be easier with some kind of notes in Factorio, so during creating algorithm we could just write down ideas about algorithm without need of minimalizing the game. Then copy paste and here we go without spending time on describing again whole pattern.

Post Reply

Return to “Railway Setups”