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

[WIP] Build order support #18

Open
wants to merge 82 commits into
base: master
Choose a base branch
from

Conversation

reypader
Copy link
Contributor

Implemented build order to be as close as possible to what a human readable build order looks like.

Reynald Pader and others added 25 commits January 26, 2018 10:58
To be concise, only the condition must be checked to decide whether
the action would be done. Checking `can_afford` is the responsibility of the action.
This would allow easier analysis of expansion location resource density
Gas would be prioritized over minerals when allocating excess workers.
This relies on Python's falsy/truthy treatment of integers.
This would simplify the build order declaration by instead declaring how many
workers is desired. This works under the assumption that in the early game,
the bot needs to keep making workers.
The commands are not coupled with the build order anyway.
Fixes Dentosal#7
@reypader reypader changed the title Build order support [WIP] Build order support Jan 28, 2018
@reypader
Copy link
Contributor Author

reypader commented Feb 6, 2018

Still marked as WIP because as of the moment, conditions are very verbose. That is, we have to specify a lot of conditions to make sure that a build order step is executed at the right time.

The current implementation in this PR, in my view is rather naive. What I'm trying to achieve is a build order that satisfies the following:

  • Concise code to declare a build order
  • Build order should be recoverable
    • If an attack destroys one of the required buildings in the build order, the bot should be able to rebuild it.
  • Build order should be switchable
    • If the bot is doing an economic build and it scouts an aggressive build, it should be able to switch to a more aggressive build using the existing buildings

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

Successfully merging this pull request may close these issues.

None yet

1 participant