Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fillers of "BootstrappingOverlord" get stuck at filled extension #196

Open
YukkuriC opened this issue Jan 10, 2021 · 1 comment
Open

fillers of "BootstrappingOverlord" get stuck at filled extension #196

YukkuriC opened this issue Jan 10, 2021 · 1 comment

Comments

@YukkuriC
Copy link

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:

  1. get the same full extension by filler.pos.findClosestByRange
  2. get a new Tasks.transfer(target)
  3. the task is invalid because the target is full
  4. filler zerg isIdle again
  5. 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.1 tag and latest dev branch)
@YukkuriC
Copy link
Author

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.

@YukkuriC YukkuriC changed the title fillers of "BootstrappingOverlord" gets stuck at filled extension fillers of "BootstrappingOverlord" get stuck at filled extension Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant