The Character AI: An Overview

Hi everybody, Oliver here! Today I’m going to talk about how our characters’ AI works. Our design for the AI has three main layers. Each has a different role, and together they’ll produce a rich and believable Empire for you to grapple with!

The first layer is bottom-up and pro-active: a decision-tree-cum-state-machine for each character, which selects their approach to each of their goals, down to the individual action – there are more than 200 nodes planned currently, with more likely to come as we develop new AI strategies. The innermost nodes on the tree are ultimate goals – to survive, to get rich, to destroy an enemy, and so forth – and, as the character progresses down the branches, the goals get more specific, until finally the character is issued a specific action to perform. However, the tree differs from a conventional decision tree in that, once the action is complete, the character doesn’t return to the trunk to decide afresh; instead, they back up one level, and check whether that sub-(sub-sub-…)-goal is complete. If it is, they back up another level and check again; if not, the node selects another action or sub-goal for them to complete in pursuit of that node’s completion conditions. So as well as being a decision tree, it’s a sort of state machine, too.

The second layer is also centred on individual characters, but is reactive: it looks at the threats and opportunities available to the character, and moves them from one branch of the decision-tree-machine to another in response to those changing circumstances. This layer maps the whole political landscape: it works out who’s powerful and who’s not according to the size, assets, influence, and integrity of their network of allies. It then works out where each character’s attention is pointed: different potential goals bid for their attention (with their current activity having a significant advantage in the bidding process, to maintain stability) and successful bids cause the character to stop what they’re doing and go engage in the successful activity instead. They can also pause what they’re doing to take ‘breaks’ – address minor crises, go on holiday, that sort of thing – and then return to the task in hand!

The third layer is focussed not on the characters but the player. This controls just how much plotting and scheming, how many invasions, and so forth can go on at any one time, to make sure there’s always something going on, but not so much you get flattened with information overload – as well as spotting your go-to strategies and throwing a spanner or two in the works! It will also maintain game performance by controlling whether characters use the full power of the other AI systems, or whether they’re out of sight enough to use lower-fidelity, lower-effort behaviour models instead.

So that’s the plan – I’m super psyched to get this system up and running! Don’t forget to join us next week, when Steve will be talking about character depth. Ave Imperator!



    1. Thanks! So are we, frankly. We’re putting a lot of time and thought into this system, and it will require a LOT of balancing and testing, but we’re really excited about the promise of truly emergent gameplay in a dynamic ‘society’ with characters that feel real and respond to not only you, but your actions, the actions of others, the quadrant at large, and their own needs and desires. If we do it right (as we are planning) you won’t be able to ‘game’ the system – actions you take may have ripple effects you didn’t count on! We’ll do our best to provide help to players to understand the more immediate effects, but with literally thousands of characters among the different civs, no emperor can prepare for everything… 😀


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.