troycheek wrote:Central Build AI works like a "Common non-hierarchical permanent queue" for all the units in that CBAI. That is, unlike the "normal" queue you are used to in the default system, it does NOT have a queue "order", there is no 1st 2nd 3rd, just... orders... and any unit able to perform that build order will start to serve the request nearest to it. When, in a group of units, only one is capable of performing a build order, all the others will auto-guard that unit, until it finishes building. Adding things to the queue doesn't mean it will be performed after or before any other order. Several CBAI groups can be created to satisfy different build priorities. Cobbled from http://springrts.com/wiki/Central_Build_AI
In other words, I could define a group of three T1 builders at the start of a XTA game, assign them to the CBAI, and tell them to build 5 metal extractors, 2 metal makers, 10 solar collectors, and half a dozen missile towers at various locations around my base. I could then go back to micromanaging my flash rush while CBAI constructed those items, each builder starting its own construction, then moving on to another item in the list or assisting another nearby builder when finished, in no particular order but generally building from their current locations outward.
Later in the game, I could add some T2 builders to that CBAI group. If building something outside the capabilities of the T1 builders, those builders would just assist the T2 builders. That way, I wouldn't have to keep track of what builder could build what items or worry about idle builders getting lost and unused somewhere.
You could also give orders to individual members of the group. For example, build this solar immediately or move to this location. The individual would perform that action then rejoin the group. This was useful for a quick build or to move the builder out of harm's way. Sometimes the builder would barely start the action then rejoin the group before finishing, but I think that was a bug.
The CBAI appeared to start by simply cycling through the list of builders and assigning each one singly to the nearest new construction project within its capabilities. As builders became idle again, it would then assign them to new construction or to assist another builder in the CBAI, depending on which was nearer. Builders which couldn't build anything on the list would get assigned to assist other builders. All builders were doing something pretty much all the time, as long as there were any build items left.
I hope that explains it.
Considering the advantages of this mechanism, what would be the optimum number of 'groups' to maintain in an AI based implementation?