My name is Peter Norberg and I've been working on a strategy game together with my brother since early 2011. Now that we are getting closer to launching the multi-player version we're starting to look at an AI for a single-player version. This is currently a side-project but I thought I would share our progress if anyone is interested. When I've searched for information about game AIs I've had lots of help from other sites and blogs (for example the blog by checkmarkgames also discussed here).

To be honest I must say that designing an AI is very rewarding. As you step by step see how the computer are able to manage more things in an empire, how it actually do things as you intend it to do, it feels great. At the moment there isn't much to see as only scout armies move around on the map. But I'll try to see if I can make a movie of it and post it on the blog.

I've now completed the article about the strategic AI. This is an utility-based AI with the capacity to perform multiple actions each turn, all depending on the available resources. We haven't implemented economy in its reasoning but when that's complete we'll have an AI that can control its empire with some sucess.

Time passes quickly around christmas but work continues on the Rising Empires AI and I'm proud to say that the first version is completed. I've run a number of simulations to test it's features and abilities and summarized it in this article: http://www.risingempires.com/netherlords/?p=430.

So far I've only been checking some global statistics when I've been running my simulations in order to see how it changes as I optimise the different sub-AIs performance. When I start to run simulations for the next version of the AI which will be capable of attacking and defending itself I'll need to check the performance of the individual AIs as well. Note that these simulations is done to test and optimise sub-AIs and I've yet to come to optimising the strategic AI. This will first be done when there is plenty of more actions that it can perform.

Before christmas I told you I would write an article on my AI class and I finally got around to actually doing it yesterday. The article goes through the AI class but more importantly we take a closer look the AI.update method, the method that runs the AI process, and in which order all sub-AIs and advisors are processed.

This is important as, for example, the scout AI generates information that later is needed by other sub-AIs. The article can be found here:

I've also 'completed' how the AI attack other empires cities and towns and is now trying to make the AI able to react to attacks as well. If it sees an enemy army coming it must be able to rush some armies to defend it or in the worst case mount a counter attack to retake the city. This is fun to do but also rather complex. When a city is captured we must create a dedicated garrison army for it. Might sound easy but I must go back and change the code for how settlement AIs and the planner work with garrisons as the best choice it to split off a part of the conquest army to create the garrison, not create an objective with the task of building a new army and sending it to the captured city (which gonna take a long time).

The AI is now halfway to it's fourth version and can do plenty of different actions. It has not been trained yet which mean that it has trouble selecting the best action every time (= it's quite dumb ). Anyway, if you are interesting of giving it a try we value all opinions about the AI and GUI and all else.

It seems that the Rising Empires GUI is a little tough to get into. We should, of course, has anticipated this but better late than not at all. I've written a short tutorial over the buttons and things a player need to do in the first turn of playing Rising Empires. It can be found on our blog:

The work on our AI for Rising Empires goes forward and today we release the 4th version. The articles on my blog do not contain much code snippets at the moment but if you're interested in my thoughts as the AI gets more and more complex head over to 'Words of the Netherlords':