User blog:AxiomsOfDominion/AI In Axioms Of Dominion

Axioms takes a very unique approach to AI. In the final implementation the AI will be completely separate from the game program. The AI and the game will trade data back and forth. At the end of every turn the game will create a data file which can be read by every AI module. Each character will possess a link to their own AI module choice. There will be a default AI written by me and any given character can be marked as using some other AI program. In theory each AI could be marked to use a unique AI implementation, though in the standard scope of the game that would be a bit nuts. In practice you'd probably use the same AI for every character. Less commonly you might have a separate AI module for every different type of character. It is possible to make utilize a character system more similar to something like EU4 or Civilization inside a custom scenario in which case it might be more practical to write unique AI modules for every character. Still there is some value in being able to write an AI completely from scratch if the default AI doesn't satisfy you for some reason.

The AI as a separate program system is not purely about modability. It also enables the obvious benefit of utilizing multiple cores in an easy to handle way. AIs can be made to run during the player's turn because they are separate programs. AI's can therefore avoid having to complete their work in the very constrained time between when the player clicks end turn and when the players gets annoyed at the wait time between turns. How an AI module uses this advantage is up to the programmer. This system can enable a massive speed up to turn times, even with a significant number of characters, when utilized properly. For instance some of the game scenarios that come with the game pre-generated might contain up to 400000 characters, all of which need to make effective decisions for themselves. Essentially a vast majority of the characters will have their decisions ready to be implemented as soon as the player hits end turn. As the actual actions taken by the AI should be rather low in number the processing of the actions would likely take a pretty short amount of time.