Overmind
Overmind copied to clipboard
fillers of "BootstrappingOverlord" get stuck at filled extension
Issue summary
Description of issue:
When a colony of around RCL4 enters a bootstrap mode, the filler generated will only fill 1-2 extensions once the whole AI module is rebuilt.
I've met this twice: at RCL6 (died at last), and RCL4) (made some changes, including "say something when calling set Zerg.task", and was saved with the quick fix)
In the files (master & dev), the arrays of valid energy sources/destinations only get filtered once the BootstrappingOverlord object gets constructed, and is assigned to the fillers according to the distance.
Therefore, once an extension is filled, the filler will be kept in a loop:
- get the same full extension by
filler.pos.findClosestByRange - get a new
Tasks.transfer(target) - the task is invalid because the target is full
- filler zerg
isIdleagain - go back to step 1 until global reset
Steps to reproduce:
Just go into emergency recovery mode, and watch the filler step once for several ticks - maybe keeping spawning invaders or making all creeps suicide will work? Once a filler carries some energy and try to fill a filled extension, it won't move again.
Error message:
Nope, everything goes exactly what the code says. It's an issue of code logic.
// Offending lines:
// src/overlords/situational/bootstrap.ts
Suggested fix (optional):
I've made a quick fix about this bug: only fetch all possible structures in constructor(), and call the filters at the tick which one of the fillers is idle. the PR is on the way.
Other information:
- Overmind version: 0.5.2 (global.VERSION both in
v0.5.2.1tag and latest dev branch)
Maybe a more severe issue is "what caused these emergency bootstraping situations" - maybe some deadlocks in logistic network? have no idea how to reproduce this, though.