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

Planetary Fortress: Work distribution #11

Open
lladdy opened this issue Mar 19, 2020 · 5 comments
Open

Planetary Fortress: Work distribution #11

lladdy opened this issue Mar 19, 2020 · 5 comments
Labels
Terran Improves Terran bots

Comments

@lladdy
Copy link
Contributor

lladdy commented Mar 19, 2020

See this game: https://aiarena.net/matches/153533/
For some reason after the planetary fortress is built worker distribution sends workers back to the main base instead of having them mine at the PF.

Is this intended?

@merfolk
Copy link
Collaborator

merfolk commented Mar 19, 2020

Sending workers away from a base with a Planetary Fortress is definitely not intended. 😄

Worker distribution probably does not consider PF as a proper base. The bug might also be part of Zone class.

I can take a look into this perhaps later today, unless someone else finds the cause before that.

@merfolk
Copy link
Collaborator

merfolk commented Mar 19, 2020

Zone.our_townhall looks like it should take PFs into account.

Can you debug PlanDistributeWorkers class and its get_worker_to_reassign() method? That's my primary suspect.

@lladdy
Copy link
Contributor Author

lladdy commented Mar 20, 2020

I did some brief tests. I'm not convinced this is actually to do with the Planetary Fortress anymore.
I think it might possibly be something to do with the main base being prioritized for worker distribution?
It seems to send the PF workers to mine gas commonly in the main base. Unsure why.

@merfolk
Copy link
Collaborator

merfolk commented Mar 20, 2020

Okay, so it might just be that the PlanDistributeWorkers is not optimized for cases when the bases are far apart.

When I was originally implementing PlanDistributeWorkers, I thought about taking into account the distance a worker needs to travel but it's not considered ATM.

@DrInfy
Copy link
Owner

DrInfy commented Mar 20, 2020

My guess here is that the system takes workers out of gas to build new buildings, which results in distribute workers pulling workers from mineral mining without considering distance. The same happens with just mining happening in natural.

@merfolk merfolk added the Terran Improves Terran bots label Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Terran Improves Terran bots
Projects
None yet
Development

No branches or pull requests

3 participants