Settlement AI

In the last posts we’ve covered the general design/architecture of the AI and then we went into a more detailed view of the scout AI, one of the sub-AIs that control exploration and gather knowledge about the world. The scout AI is far from complete; we still haven’t implemented the influence map and patrolling of already known territory in order to update our information. We also need the AI to build watchtowers to increase what it sees of the world. But we’re satisfied for the moment and have decided to move forward and work a bit on the settlement AI.

Now, what is the settlement AI and what purpose does it have?

Or perhaps more importantly, what is a settlement? A settlement is a town or a city with a population. It collects taxes from its population and is able to construct buildings that will improve its output (food/production/taxes/research). Settlements also build new companies (i.e. armies) and squadrons (i.e. fleets). Each population group (race) in the settlement has a loyalty value towards the emperor and as in many other games a loyal population works better than an un-loyal population. In a city there can be races which are loyal and at the same time other races that are un-loyal. A settlement is static, i.e. it can’t move around in the world, and needs to be defended against enemy armies. And let’s not forget, settlements collect research points for the empire.

Running a settlement is a bit complex.

The settlement AI will control most of the above. The only thing that the settlement AI won’t control is company and squadron production. This means that the settlement AI needs to make sure there is food for the whole population, value different types of buildings according to the wish of the Governor, make sure that the population is happy and make sure it’s defended. It also needs to tell the strategic AI when it needs better food technology, a new garrison or if it wants more population and much more.

Well, it’s a bit complex. But we’ll break it down into smaller pieces and work with one at a time. I decided to start with the food situation and that’s what I’ll talk about in the next update.

Leave a Reply