go2starr / CS-638-BWAPI

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

Resources used not considered for continually training units #32

Open jmloethen opened 12 years ago

jmloethen commented 12 years ago

Since structure agents once in the train state, will continually training the same unit, the unit trained is never placed in a queue and thus the resources used are taken at will.

A trained unit may then take the resources needed by another unit to be trained or another building to be built. So sometimes an SCV sent to build a supply depot still may have to wait for enough minerals, all the while sitting idle.

If all training orders are sent through the build manager then this should fix this issue and once a unit is trained the structure agent goes to idle, which currently falls through to train.