AI Fort Construction

Previously the AI could only replace individual struts, devices and weapons that it was given in the original map. This meant that for there to be any meaningful battle with the AI the starting fort had to be well armed and have an already developed economy. This is not good for practicing development of economy and fort building.

So I’ve just added the ability to record the construction of a fort to lua script. The game selects one of these scripts randomly for each team for the AI to follow. It will start at the beginning and retry each step until it has the resources to succeed and continue, stopping when it reaches the end. If it discovers missing joints, it will start a thread which tranverses the previous steps, re-executing any instruction involving that joint. There are a few other technicalities, but that’s the guts of it. It has meant we have a more or less fully functional AI in a very short time. Sometimes the AI gets stuck, or it builds something poorly, causing some structure to collapse; more time will have to be spent ironing out these fine details.

We are looking forward to the development of a single player campaign featuring the new functionality.