go2starr / CS-638-BWAPI

Starcraft: Broodwar AI bot
GNU Lesser General Public License v3.0
9 stars 7 forks source link

BuildManager should be able to build things concurrently #7

Open bploeckelman opened 12 years ago

bploeckelman commented 12 years ago

Currently if BuildMgr has something at the top of its build stack that can't be constructed for whatever reason (not enough resources of a certain type, not enough supply... whatever) it can stall other build orders that should be able to run.

For example, if we have 1000 minerals and no gas, and a firebat is at the top of the build stack, BuildManager stops building things entirely until we get enough gas to fulfill the request to build the firebat.

Requests on the build stack should have priority, but if there is a holdup with something, the BuildManager should still be able to look through its queue and find the next thing it is able to build and get started on it (like marines or supply depots in the example above).

go2starr commented 12 years ago

Mostly working, although sometimes overbuilds a requirement.

Still requires a smart build order - i.e. 2 barracks, then marine, firebat will build concurrently, while marine, firebat, 2 barracks will not