[0.17.2] Bots get confused when upgrade planner is used twice
Posted: Thu Feb 28, 2019 3:32 am
Details:
When using the upgrade planner on something that has at least two upgrades, like a yellow belt (which can be upgraded to a red belt and yet again to a blue belt), if you select those belts for upgrade a second time while the first upgrade is in progress, some of your bots will get confused and stay motionless, hovering over belts that are not marked for upgrade in a perfect grid as if they had arrived at their destination and there was no work to do. They will stay there until they get low on power, at which point they will fly to the player (assuming you're using bots from your personal roboport) and recharge, but they will not leave that position. You must mine them for them to return to you.
Reproduction steps:
With personal roboports and construction bots on your person...
Expected behavior:
Bots should not be confused.
My own musings
It's just a guess, but all the bots that are confused are holding red belts, so it appears that they're trying to replace yellows but they went to the wrong spot and they don't update where to go. But all of them are above red or yellow belts (until they go to the player to recharge) so two bots may have been tasked with the same location. However, this problem does not occur if the upgrade planner's initial use is allowed to complete fully before issuing the second one or using the deconstruction planner. So maybe the subsequent use of the upgrade planner tasks another bot to a location even if a bot was already intending to go there. One of them gets there and does the job and the other one gets there and doesn't have anything to do. The deconstruction planner could similarly not realize that bots were already heading to upgrade a belt and instead remove it. When the upgrade happens, there's nothing to replace.
When using the upgrade planner on something that has at least two upgrades, like a yellow belt (which can be upgraded to a red belt and yet again to a blue belt), if you select those belts for upgrade a second time while the first upgrade is in progress, some of your bots will get confused and stay motionless, hovering over belts that are not marked for upgrade in a perfect grid as if they had arrived at their destination and there was no work to do. They will stay there until they get low on power, at which point they will fly to the player (assuming you're using bots from your personal roboport) and recharge, but they will not leave that position. You must mine them for them to return to you.
Reproduction steps:
With personal roboports and construction bots on your person...
- Lay out an array of yellow belts such that there are more yellow belts than you have robots but the belts are all within range of your personal roboports. The more belts the better.
- Use an upgrade planner to select all the belts for upgrade.
- After some of the belts have been upgraded but before all of them have, select all the belts to be upgraded again (even the ones that are still pending upgrade and those that have already been upgraded).
- Observe that some of your bots get stuck at a belt that is not marked for upgrade and just stay there until they return to the player for a recharge. Observe that some of the belts are still yellow and have not been upgraded at all.
Expected behavior:
Bots should not be confused.
My own musings
It's just a guess, but all the bots that are confused are holding red belts, so it appears that they're trying to replace yellows but they went to the wrong spot and they don't update where to go. But all of them are above red or yellow belts (until they go to the player to recharge) so two bots may have been tasked with the same location. However, this problem does not occur if the upgrade planner's initial use is allowed to complete fully before issuing the second one or using the deconstruction planner. So maybe the subsequent use of the upgrade planner tasks another bot to a location even if a bot was already intending to go there. One of them gets there and does the job and the other one gets there and doesn't have anything to do. The deconstruction planner could similarly not realize that bots were already heading to upgrade a belt and instead remove it. When the upgrade happens, there's nothing to replace.