In the last installment of the AI series we got a general introduction of how we intend to structure the AI. What modules will it include what resources will it have access to. Today we’ll look in more detail on the different AI modules.
Strategic AI – The strategic AI is the AI that controls the whole empire, i.e. it handles all strategic decisions and resource management but it’s up to the sub-AIs or the individual assets to try to fulfill its wishes. At the start of each turn it collects requests from all underlying sub-AIs. Each type of request has a variable that gives it a basic importance (low = unimportant, high = important). This importance factor is cumulative, i.e. several unimportant requests of one type can become more important than a single important request.
When this is completed we add the AIs personality traits to each type of request and when this is done we use each request type total value when deciding what to prioritize during the turn. The AI also has a constant wish to run a small number of long term objectives and what long term objectives it strive for is affected by the requests (a settlement requesting more civilians can lead to an objective with this target). The strategic AI can also select other objectives depending on its strategical/diplomatic situation and personality (an aggressive AI will perhaps try to attack a neighbouring empire).
The strategic AI also controls all research decisions and will handle all diplomacy although diplomacy will be added first at a later stage.
Scout AI – The scout AI is an independent AI module which handles all exploration of new territory and patrolling of already explored territory. Due to the fog of war explored territory must be re-explored at regular intervals to keep track of the expansion of other empires and also try to avoid being surprised by enemy attacks. It can send requests for more resources (i.e. scout armies) to the strategic AI which decide to agree or not to these requests, but except for this the scout AI operates on its own.
The scout AI is tasked with keeping information about all bodies of land (continents and islands, but let’s call them landmass) and what assets are located on each landmass. This information can, for example, then be accessed by the other AI modules when they plan movement of armies.
The main asset of the scout AI is its scout armies (armies which only include scout companies). These are fully and 100% controlled by the scout AI. But the scout AI also temporarily take control of all military armies which isn’t connected to any other AI modules, i.e. most military activity during peace times will also be controlled by the scout AI which will use these armies to patrol the land around its settlements.
If the influence map is how the strategic AI view the world the scout AI is the module responsible for keeping the influence map updated.