[2.0.11] Roboports queue logic 2.0 not working

Post your bugs and problems so we can fix them.
User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 310
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

[2.0.11] Roboports queue logic 2.0 not working

Post by Hares »

After all requests are canceled
10-26-2024, 15-36-29.png
10-26-2024, 15-36-29.png (2.44 MiB) Viewed 546 times
Few minutes after
10-26-2024, 15-38-01.png
10-26-2024, 15-38-01.png (56.82 KiB) Viewed 546 times
Steps to Reproduce
  1. Import DocJade's AutoMall and build at least 8 chunks of it
  2. Ask it to craft rocket silo, or two

kovarex
Factorio Staff
Factorio Staff
Posts: 8194
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: [2.0.11] Roboports queue logic 2.0 not working

Post by kovarex »

Hello, you should describe what do you actually consider to be a bug here.

User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 310
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: [2.0.11] Roboports queue logic 2.0 not working

Post by Hares »

kovarex wrote: ↑
Sat Oct 26, 2024 12:55 pm
Hello, you should describe what do you actually consider to be a bug here.
In FFF-374: Smarter robots it was said that robots should now take into account how many other robots are recharging and want to recharge on the specified roboport:
Surprisingly in this case the issue can be helped a lot by just a small improvement in the heuristic logic. When deciding which roboport to charge at, the robots crucially did not consider the current robots on the way to that roboport, only those already in the queue, and did not factor in how many free charging spots the roboport has open. By adding these two extra parameters into the equations, the distribution of the robots improves quite nicely.
However, what I see is here is the old behaviour of many "vacant" roboports nearby and one collecting a queue of millions of robots to charge.

Tem3dy
Burner Inserter
Burner Inserter
Posts: 6
Joined: Thu Oct 31, 2024 8:19 pm
Contact:

Re: [2.0.11] Roboports queue logic 2.0 not working

Post by Tem3dy »

Agreed, I've had the same problem happening despite having multiple roboports available, I feel like the new behavior isn't very improved, or at least there are some issues with it.

Sometimes the task assigning works unpredictably as well, for example when I was placing down rails (both in range of personal roboport and a roboport network), the bots from my personal roboport were waiting for trees (obstacles) to be deconstructed, and that task was assigned to bots from the other end of the base, meanwhile I had 50 robots available in my personal roboports that didn't take the job

User avatar
Hares
Filter Inserter
Filter Inserter
Posts: 310
Joined: Sat Oct 22, 2022 8:05 pm
Contact:

Re: [2.0.11] Roboports queue logic 2.0 not working

Post by Hares »

Tem3dy wrote: ↑
Sat Nov 02, 2024 6:51 pm
Sometimes the task assigning works unpredictably as well, for example when I was placing down rails (both in range of personal roboport and a roboport network), the bots from my personal roboport were waiting for trees (obstacles) to be deconstructed, and that task was assigned to bots from the other end of the base, meanwhile I had 50 robots available in my personal roboports that didn't take the job
Observed such behaviour too.

AndrolGenhald
Long Handed Inserter
Long Handed Inserter
Posts: 53
Joined: Tue Mar 22, 2016 6:35 pm
Contact:

Re: [2.0.11] Roboports queue logic 2.0 not working

Post by AndrolGenhald »

I've seen this a lot as well, my guess is that it's due to the last change in the FFF, that robots must always charge at a roboport closer to their destination than they are. Perhaps this needs to be relaxed a bit somehow? Maybe rather than having a selection criteria of "closer to destination" it should be "closer to destination OR within single charge flying distance of destination" or maybe some heuristic like "closer to destination OR within single charge flying distance / 2 of current position"?

mrvn
Smart Inserter
Smart Inserter
Posts: 5795
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [2.0.11] Roboports queue logic 2.0 not working

Post by mrvn »

That "closer to destination" logic, neigh the whole recharge logic needs to be redesigned.

When the bot leaves a roboport (or takes on a new job) it should check how far it can go before running out of fuel. If that is before the destination then it should look for the best roboport to refuel from there and then set course directly there without going zig-zag all the time.

And since the bot is at a roboport (unless it gets retasked mid flight where you just skip the closer test) the choice of the next roboport to refuel can ignore that roboport and any further away from the goal while still picking a roboport that isn't overcrowded. It also means the bot can travel half it's charge and recharge at some closer roboport instead of trying to go all the way and then ending up at an overcrowded roboport because any other roboport would be out of range of the remaining charge. Planing ahead where to refuel gives a lot more options.

Skyl3lazer
Manual Inserter
Manual Inserter
Posts: 1
Joined: Thu Nov 07, 2024 1:48 pm
Contact:

Re: [2.0.11] Roboports queue logic 2.0 not working

Post by Skyl3lazer »

This occurs for me as well in 2.0.14. Whatever roboport is closest to the center of traffic will end up with a queue of hundreds of robots, rather than spreading around to other chargers.
11-07-2024, 08-49-30.png
11-07-2024, 08-49-30.png (126.28 KiB) Viewed 247 times

GenosHK
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed Jan 27, 2021 12:16 am
Contact:

Re: [2.0.11] Roboports queue logic 2.0 not working

Post by GenosHK »

I came here looking for answers as well.
11-07-2024, 15-22-05.png
11-07-2024, 15-22-05.png (1.37 MiB) Viewed 228 times
11-07-2024, 15-22-26.png
11-07-2024, 15-22-26.png (103.91 KiB) Viewed 228 times

Xellnix
Burner Inserter
Burner Inserter
Posts: 11
Joined: Fri Nov 08, 2024 7:55 am
Contact:

Re: [2.0.11] Roboports queue logic 2.0 not working

Post by Xellnix »

same at my end, while they have options (black circles) to recharge, they stack at these 2 roboports
(i use basice logistic bots with +825% speed +3 capacity, also basic roboports)

so even if they would move slowly to the circled ports they would be faster than stacking and waiting for recharge

but, not all stack there, some move away, so i would guess like the others suggest, something to do with destination?
roboports.png
roboports.png (719.7 KiB) Viewed 178 times

mrvn
Smart Inserter
Smart Inserter
Posts: 5795
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [2.0.11] Roboports queue logic 2.0 not working

Post by mrvn »

GenosHK wrote: ↑
Thu Nov 07, 2024 9:22 pm
I came here looking for answers as well.11-07-2024, 15-22-05.png11-07-2024, 15-22-26.png
First I wonder why you have big miners going into requester quests, seems kind of backwards.

Second the bots do split between the two closest roboports. If they just delivered the items requested by all those requester chests and are looking for a place to rest that might be different to the normal recharging logic. Is this a case of bots looking for a resting place?

The other roboports seem to be far away so the distribution logic might not trigger there. But bots should compare the total time (travel + wait in queue) for every roboport as far out until travel time exceeds the best roboport found so far (as in I think they should, not that they already do).

GenosHK
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed Jan 27, 2021 12:16 am
Contact:

Re: [2.0.11] Roboports queue logic 2.0 not working

Post by GenosHK »

mrvn wrote: ↑
Mon Nov 11, 2024 7:25 am
First I wonder why you have big miners going into requester quests, seems kind of backwards.
I set the chests to automatically trash non requested items, so the bots come and take the scrap to storage automatically. I've since swapped to training it all out since the robot charging shenanigans were ruining this method.
mrvn wrote: ↑
Mon Nov 11, 2024 7:25 am
Second the bots do split between the two closest roboports. If they just delivered the items requested by all those requester chests and are looking for a place to rest that might be different to the normal recharging logic. Is this a case of bots looking for a resting place?
They do split between the two roboports, but they will eventually stack up to ONLY those two roboports to charge. Over 7000 robots trying to charge at two roboports instead of spreading out to the other roboports just across the gap seems like the queue logic isn't working.
mrvn wrote: ↑
Mon Nov 11, 2024 7:25 am
The other roboports seem to be far away so the distribution logic might not trigger there. But bots should compare the total time (travel + wait in queue) for every roboport as far out until travel time exceeds the best roboport found so far (as in I think they should, not that they already do).
They obviously aren't that far away since they are in the same network. It's slightly more than what large power poles can span. I agree that they made it seem like total wait time should be the determining factor, but I assume it has something to do with wanting to be moving toward their goal. A lot of these charging aren't holding an item making it seem like they are trying to be nearby to their destination, but when 1000 robots are waiting to charge, you'd think it'd be able to tell that it's not the best solution to become number 1001 waiting in line with 30 alternate roboports that close.

mrvn
Smart Inserter
Smart Inserter
Posts: 5795
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [2.0.11] Roboports queue logic 2.0 not working

Post by mrvn »

GenosHK wrote: ↑
Mon Nov 11, 2024 2:10 pm
mrvn wrote: ↑
Mon Nov 11, 2024 7:25 am
First I wonder why you have big miners going into requester quests, seems kind of backwards.
I set the chests to automatically trash non requested items, so the bots come and take the scrap to storage automatically. I've since swapped to training it all out since the robot charging shenanigans were ruining this method.
Ah, so those requester quests are actually all active provider chests. The big drawback of this method is that the ore will fill every storage chest you have and then deadlock all your bots before the miners will stop mining. I can't see that ever being useful. Just use provider chests and let the bots fetch ores you request somewhere else.
GenosHK wrote: ↑
Mon Nov 11, 2024 2:10 pm
mrvn wrote: ↑
Mon Nov 11, 2024 7:25 am
Second the bots do split between the two closest roboports. If they just delivered the items requested by all those requester chests and are looking for a place to rest that might be different to the normal recharging logic. Is this a case of bots looking for a resting place?
They do split between the two roboports, but they will eventually stack up to ONLY those two roboports to charge. Over 7000 robots trying to charge at two roboports instead of spreading out to the other roboports just across the gap seems like the queue logic isn't working.
mrvn wrote: ↑
Mon Nov 11, 2024 7:25 am
The other roboports seem to be far away so the distribution logic might not trigger there. But bots should compare the total time (travel + wait in queue) for every roboport as far out until travel time exceeds the best roboport found so far (as in I think they should, not that they already do).
They obviously aren't that far away since they are in the same network. It's slightly more than what large power poles can span. I agree that they made it seem like total wait time should be the determining factor, but I assume it has something to do with wanting to be moving toward their goal. A lot of these charging aren't holding an item making it seem like they are trying to be nearby to their destination, but when 1000 robots are waiting to charge, you'd think it'd be able to tell that it's not the best solution to become number 1001 waiting in line with 30 alternate roboports that close.
Indeed, a whole lot of bots without ore in hand. So they went to recharge on the way toward the chests. And close to the target as well. So the code that is supposed to prevent bots from not making progress might really be interfering with splitting the bots to more roboports. Be aware that when the bots decide to refuel is when they are nearly out of fuel. The distance they can still travel fast is very limited. They would have to slow crawl to any but those two roboports. Quite likely the distance is simply to far even without a "must be nearer" logic going wrong. But only the devs would know the real internal logic there.

The current method looks something like this (purely from watching gameplay):
current-refueling.png
current-refueling.png (720.6 KiB) Viewed 96 times
The path of the bot is drawn in black. The green/red background signifies the cost of refueling. The further away the bot has to go the longer it will take. As you can see most roboports are fully red and the bot would never go there.

As I said before the decision to refuel should be taken where the bot leaves and not when it runs out of fuel. First the bot just looks at the direct path (grey). If it can't reach it's goal it looks for a roboport to refuel at. This is the same spot as before, just now the bot searches for a roboport before it leaves instead of later when it actually runs out of fuel. And since the bot hasn't actually left yet the cost of picking a roboport differs a lot. It could pick any roboport within a circle where the grey line is a radiant. But anything not along the grey line means the overall distance is longer so cost rises. And you want to recharge as late as possible to minimise the number of stops. So a very rough sketch of the cost function done in a minute in gimp is something like this:
plan-ahead-refueling.png
plan-ahead-refueling.png (1.09 MiB) Viewed 96 times
As you can see the cost function is no longer a circle but more spread out along the path and fewer roboports are fully red. Actually none but the starting roboport (and anything to the left of it) should be disallowed.

On top of that add the wait time for each roboport from the (number of bots registered to stop there) and pick the cheapest. Instant balancing of bots and no wasted zig-zaging of bots.

Post Reply

Return to β€œBug Reports”