Page 1 of 1

Bot stuff

Posted: Mon Aug 12, 2019 9:12 pm
by mpatoulachik
Hi,
An issue I have at the moment with robots (mostly construction) and their logic:

1. When removing trees, the construction robots seem to always choose a storage chest that is literally on the other side of the base (and always the same at the moment), thus having to fly for minutes to get there, when there are plenty of empty storage chests that are way closer from the tree removing site.

2. Robots have a tendency to try to fly over large areas without coverage (big lakes or empty spaces). When deep into the no man's land they are running out of battery, they turn back towards the nearest roboport, fly back slowly, recharge, and just retry to cross the same empty space, run out of battery, return and get stuck in this loop forever.


When 1 and 2 are combined it leaves to very frustrating unfinished blueprints and stuck robots.

I enclose my log file and my save with 4 markers.
Trees are removed at the south east and the robots want to put them in a chest at the north west. There is also a bunch of robots stuck over two lakes (I could rescue those that were stuck earlier over land by building roboports under their path but this is not ideal).

I understand this is not a show-stopper but this is definitely unwanted and quite frustrating.

Anyway, thanks for a really cool game and interesting insights in your FFF's!

Re: [0.17.64]

Posted: Mon Aug 12, 2019 9:54 pm
by Koub
If I remember correctly, bots choose preferentially a chest that already contains the item they want to store.
Never tried to trick them into dropping the wood in a closer chest, but you could try to add a storage chest, drop some wood into it, and then order for some wood chopping.

Re: [0.17.64]

Posted: Mon Aug 12, 2019 10:07 pm
by 5thHorseman
In spite of what many people say, bot networks require work and thought to set up correctly.

Your bot network is too big and/or you are not utilizing buffer chests and circuit networks to their fullest. You are in charge of making things easy for your bots, not the other way around.

Wube can't add these kinds of things to the bots themselves, because it would tank your updates per second and you'd only be able to use a fraction of the thousands of bots you can use now before slowing your game to a crawl.

Re: Bot stuff

Posted: Tue Aug 13, 2019 8:40 am
by Eiermann
Fixing those "issues" would add a huge amount of overhead.

1. They always look for an existing (incomplete) stack of the item in any chest. Scanning for the nearest chest (with empty slots) would require more CPU time and would also cause huge a lot of half empty / full chests.
2. Robots always fly the direct path because they cant collide with anything. Calculating the path and movement is simple vector math (eq. current-position + (direction * speed)). Adding additional logic - such as planing the next stop for recharging the robot - would require more work to be done.

Factorio is about improving your own factory. Placing down roboports on paths / bottlenecks can highly increase the efficiency of your robots. You could also use buffer chests or separate your robo-networks into smaller grids / layouts.

Re: Bot stuff

Posted: Tue Aug 13, 2019 6:06 pm
by mpatoulachik
I tried the trick to add some wood in an empty buffer chest and it did the trick! At least until it got full and then another chest was chosen. But fair enough, at least I understand why it happens and I guess Murphy's law dictates that the chest he robots will choose will be really far away..

I understand that path calculating is CPU-intensive and is not needed to fly straight. But I wish there was a way to get the robots to not fall in an endless loop (like if you already recharged three times in a row at the same roboport, then something is wrong and you should try another one next time).

I have buffer chests and storage chests here and there, but I can't choose where the robots come from when I lay a blueprint. Buffer chests or not. The same if they decide to put all chopped wood in the chest that is on the other side of the lake.

Re: Bot stuff

Posted: Wed Aug 14, 2019 8:56 am
by Zavian
mpatoulachik wrote:
Tue Aug 13, 2019 6:06 pm
But I wish there was a way to get the robots to not fall in an endless loop (like if you already recharged three times in a row at the same roboport, then something is wrong and you should try another one next time).
Simply don't have large holes in your logistics network.

Re: Bot stuff

Posted: Wed Aug 14, 2019 5:45 pm
by slippycheeze
mpatoulachik wrote:
Tue Aug 13, 2019 6:06 pm
I tried the trick to add some wood in an empty buffer chest and it did the trick! At least until it got full and then another chest was chosen. But fair enough, at least I understand why it happens and I guess Murphy's law dictates that the chest he robots will choose will be really far away..
It isn't a "trick" as such, but rather, the way the rules work. You can plan for and understand them, and they work the same way every time. This is part of designing an effective logistic robot network. If you don't, you will encounter the problems you have described: robots trying to do their job across large gaps such as the lake, robots storing things in places you don't want, low performance.

This is no different to using belts, or trains: if you do that inefficiently, you are going to have an inefficient system. Running ten trains on a single track with two signals -- one each end -- is never going to perform well. Likewise, a logistic network that crosses a huge lake, is never going to perform well: you have a similar situation.

You wouldn't expect belts to magically solve the problem if you laid them around the lake, and they took time to move things. Robots are exactly the same.

Re: Bot stuff

Posted: Thu Aug 15, 2019 1:33 pm
by BlueTemplar
You can also filter storage chests.

Re: Bot stuff

Posted: Fri Aug 23, 2019 9:19 pm
by slippycheeze
BlueTemplar wrote:
Thu Aug 15, 2019 1:33 pm
You can also filter storage chests.
Yup. A logistic filter on a chest makes it the second choice destination for items: first, a chest with the item already in it, second, a storage chest with the item in a filter, third, the earliest chest placed that is not full.