Hello. I've finally completed my AI for tool management, and would appreciate any feedback. I've tested the code with jh's AI code, using an older version, so you'll need to copy and paste my code out and ignore the rest :)
In the header file, there are just a few parts, prototypes for the ManageTools, ManageDistribution methods, and an enum called TOOL_STATE.
In the cpp file, all my new code is at the bottom of the file, namely the above two methods. You will want to run the two methods (in the order of tools first) every now and again, say 1000GF. The distribution method only alters iron right now, but can be expanded for all resources later on if required.
You'll probably want to add a metalworks to the AI's build queue, to see the results.
Here are the files:
http://rapidshare.com/files/271842695/ai1.zip