go2starr / CS-638-BWAPI

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

BuildManager continues producing depots when supply is maxed #11

Closed bploeckelman closed 12 years ago

bploeckelman commented 12 years ago

Late in some matches, when we have 200/200 supply, the BuildMgr keeps adding new supply depots to the build stack (I've seen over 100 of them sometimes), and nearly all resources gathered are put towards building new depots (I've seen almost half the map full of them if the match lasts long enough)

go2starr commented 12 years ago

There was a missing break in the BuildManager loop which assigns idle agents to build tasks. This led to repeat builds of a building when the BM had multiple idle units.

This led to overproduction of Supply Depots for a single order (i.e. 1 request becomes >1 depots), so the SM was incorrectly calculating its planned SupplyCount.