Metal Maker AI

Under the spring engine and under total annihilation, there was a class of unit called the metal maker. This unit would take a large amount of energy resource and create a small amount of metal resource, and it would do this continuously. In Total Annihilation it would consume 60 energy per second and produce 1 metal per second.

Because of the large energy requirements, metal makers were expensive to run, however they allowed an infinite resource and expansion economy. You no longer had a maximum income based on the map. Some players found they could maximize production by building too many metal makers, then turning them on. Just before their energy ran out they would turn all their metal makers off and wait for their energy to recover, and repeat the process, allowing more metal to be generated.

In the spring engine the original creator of the engine built a groupAI that automated this process called the metal maker groupAI. Sadly the efficiency of the algorithm used was poor, so I created the Advanced Metal Maker GroupAI.

This AI would perform the same trick, however, it would allow the metal makers to run for longer periods, as well as safeguarding a minimum amount of energy to prevent energy running out should energy usage spike, or storage be low. The longer bursts of on and off phases allowed more metal to be generated and more efficient usage of any storage structures built.

Both AIs would only turn fof enough metal makers to shift energy usage from the red into the green, however the original AI also had a problem of indiscriminately turning metal makers off regardless of efficiency. Also in some mods, metal extractors cost a lot of energy to run too and can be turned off. To combat this I turned off the most inefficient metal maker unit types first to maximize production, and I allowed any metal producing unit that consumed energy and could be turned on and off to be used by the algorithm.

The AI was succesful, and was the preferred AI of choice for a very long time. In the last year however a lua GUI widget interface was added to the spring engine. A lua version of the AI was created which didnt need to be turned on at the start of the game or recompiled with every new spring release, and it quickly became popular, obsoleting my AI.

Leave a Reply

Your email address will not be published. Required fields are marked *