Hannu wrote: Fri Jul 09, 2021 11:08 am
Bots could be assigned to certain routes, target choosing priorities could be configurable etc.
Already possible, but a) it’s a mod
https://mods.factorio.com/mod/LogiNetChannels b) it works differently as you think.
Because the bots don’t decide how to fly. The logistic network looks “oh, here is a request! Can we provide that request? Yes! Is there a bot, that can do that within my network? Yes! Super! Bot: you go to chest A at xy and pick up z items of w. Then go to chest B at xy an drop it. When ready you let me know.”
Bot: “Ayeaye!”
The bot is super stupid, most things are done by the logistic network controller. This is because if every

could control himself this would lead to situations, where a new requester chest is placed, all bots would like to fulfill the request at once, which leads to game getting stuck for a second or so. Having a controller per logistic network allows to handle ten bots per tick (600 per second). That’s the reason, why placing a new requester chest leads to this “snake of robots” coming out of the roboports.
All they can do is go to xy and pick up, go to xy and drop, searching for a loader, if charge is needed and when orders are done search for a roboport to park. Maybe I forgot some things, but that’s basically it.
Now: what to add? What commands should be added to the bots, that a controller can tell them what to do?
All that would be very interesting challenge in simplified game format. Current system is very stupid. Operation is very much random (based on order of some internal object lists in memory)
It looks random, but isn’t. It follows a very simple and clear algorithm.
Only solution is to spam more and more.
No, that is absolutely not right, because there is an optimum of bots in a network. This follows out of what I explained above: the controller assigns only a limited number of bots per second. So there is a natural limit. The second natural limit is, that you can charge only X bots per second in a network. But this subject is already discussed a lot in the last years. The simple conclusion is: bots are extremely useful for peak transport (filling up players inventory, construction) over relatively short distances. Out of that scope you soon begin to find the problems that leads to thinking about needing more control over the bots.
I do not argue against that. But I argue that there are situations in which 10 times more computing would improve efficiency much more and total effect would be good. Or what is more important, it would save my time in real life if there were less waiting.
Aha! That’s the point!
The reason why I explained a bit how the bots work internally is, that with knowledge and careful watching and measuring it is possible to find strategies, which will effectively help to go over these limitations and make things much faster. Some are already mentioned in this thread. But this needs
you to change. Not the game.
Two types of bots would give both possibilities without much cost to devs or players. Devs can say that they do not expect it to be economically feasible if they take programming costs and increased sales and customer happiness into account but saying that another clever type of bot would increase CPU load even player decide to not use them is not true.
Well, instead of this theoretical discussion I recommend to make a much more
specific suggestion in the suggestion-board, which can be better discussed, because what I also see in this discussion is, that there are different ideas, what “control over bots” should mean.
Molay wrote: Fri Jul 09, 2021 8:30 pm
I just want one feature, and it would apply to the whole network if enabled (feeding a constant to a roboport, or a GUI toggle on a roboport), and that's "restrict flying to roboport zone". I.e. bots can't fly beyond the construction zone. This would imo solve many issues that can arise with irregular bases. Bots trying to fly through no-mans-land to reach a perimeter, having to constantly turn back, or bots flying over enemies in concave bases (like L shaped for example). Not sure how realistic to implement. Presumably bots would need to find a path on a graph where nodes are every roboport, and take that path. Simple pathfinder in principle, yet magnitudes more work than the current implementation.
A very good example of what’s not will be possible. This means, that the bots need to constantly look up a table of “restricted areas”. A function takes their coordinates and looks for every tick: am I in a restricted zone?
It cannot be controlled how many restricted zones there are and the algorithm effort is dependent on the number of bots multiplied with the number of zones.
A good new order for the bots is calculated only once (e.g. when a bot needs to go to a coordinate he needs only to calculate the exact vector). He needs to do this only at the begin of a new command. Once and not every tick.
You can argue, that they already do change their coordinates every tick and look up, how many charge is left, yes, but this simple operations runs so fast inside of the cpu, that it will take only a microsecond for 10000 (or so). What runs fast, what not? You need to transfer the code plus as many bots as possible into the internal CPU-cache, then run, and transfer the results back to memory. So if it runs on the Cpu, it’s fast enough. A lookup to the map is not, because the map is BIG.