Install this theme
A poster summarising my project.

A poster summarising my project.


My dissertation is now complete and handed in, unfortunately this blog was kept up to date, however here is the finished product :

AI analogies

In the past month I have constructed a dynamic scripting AI and I have almost completed the “new” DAL system I’ve made. But I’ve also been thinking about how to explain the context of each of the AI systems I’ve created, so heres my attempt:

Each system represents an actor in a film and how they act.

Static scripting: Follows its script to the letter, with no deviation under any circumstance.

Dynamic scripting: It has several scripts, one of which it reads at a time. Each scene it will choose the script it thinks performed best in an identical previous scene.

DAL scripting: It doesn’t have a script, it determines what its wants to do then does it using the best line it knows for the circumstances or if makes up an entirely new one!

Optimisation and machine learning

In order to begin machine learning several scripts had to be created designed around some typical strategies in RTS game namely;

  • Offensive - focuses on attacking resource points closest to enemy position, denying them of resources then building up an attack force.
  • Defensive - focuses on securing its own resource points and slowly building up and small but effective attack group.
  • Distraction - patrols between outlying points to distract the enemy while building up a large attack force elewhere.
  • Beehive - constant motion and disorientation are the key to this strategy and not having a central group of units, enalbing the AI to launch a mass atack from all over the map when its ready.

Once these strategies where created I began testing it against a static scripted AI which used these strategies and its own general puropose script, however it became apparent that the application was far to slow to run through hundreds of games, which are required for it to learn which strategies are effective and when.

So after downloading and using the trial of the fantastic software ANTS ( I identifed areas within the application which required optimisation in order to properly run tests.

This video shows the Static scripting system for the application. This AI follows a series of commands (or script) contained in a text file. I’m now working on an implementation of Spronck’s dynamic AI system, which can select from a database of scripts during each ‘phase’ of a match.

Scripted AI

The basis of the scripted AI is now finished. I will now detail how it works:-

First off I declare a Static_AI object, which controls the AI opponent units and uses its resources. The Static AI system simply tells the application which units to build, where to attack and what to capture, everything else (such as pathfinding, shooting, etc..) is handled by the application.

So the Static_AI object reads a text file which contains the orders to be undertaken and come in the following two formats:

-B 1 3 (Build, type, amount). which is build 3 units of type one (infrantry).

-A T F 0 1 0 2 (Attack, Bool base, int resource point, infrantry , heavy infrantry, tank, artillary). Which is Attack base with 1 heavy infrantry and 2 artillary.


I have now started programming for my disertation application. Over the course of the christmas break (in between coursework) I have been designing the systems I hope to develop in more depth. Designs have been focusing on what kind of metrics to gather and their use, how the system could learn, possible actions it could partake in (such as attack, build, capture, etc..) and a series of potential problems and/or considerations to think about.

For the first week I have been working on implimenting one of the AI players, the scripted/static player. More details on its implementation will follow soon.

The application I’m using for this project is based on an RTS I’ve been making in my spare time, its development blog is availible here:

Finally below are two gnatt charts outlining my schedule for developement and writing my disertation respectively.

P.S. my proposal is availible here:

My latest idea

After much research I have discovered that my ‘new’ idea for Real time strategy game AI has already been created by Pietr Spronck (, So I have decided to refine my idea furthur to look at the commerical vialbiliy factors. Again this may change but below it my idea.

Is the use of adaptive artificial intelligence instead of a statically scripted artificial intelligence in a real-time strategy game worthwhile?


The project will look at how adaptive & static systems have been used previously in commercial games and their effectiveness. A wide range of games will be looked at to give as full a picture as possible.  Furthermore an application will be built to ascertain whether players prefer one system or the other.

Throughout the paper will be reference to the work of Spronck, critical analysis of both system’s flaws and benefits and whether it is commercial viable to implement adaptive systems to combat the associated problems of a static system.  

Thoughts on scripting

For the scripting side of things I hope to use a game I have already created (which has hardcoded AI) and adapt it to read in xml or text files. The scipted AI could simply read its commands and rulesets from a static file which it cannot change and the dynamic scipting AI could be allowed to both read existing files (containing possible strategies) and could create new files (or rules) for specific cases.

The differance between the methods will be that the static Ai must follow a pre-defined ruleset, whereas the dynamic Ai needs to determine which its rules it would best suit a situation or create a new rule for a situation is has not previously encounted, thus the dynamic Ai can ‘learn’.

Thoughts on comparison

Perhaps an alternative to using questionaires would be to play the artifical intelligence entites agaisnt one another and examine how they play? however this seems limited in what could be gained and would not be able to answer which approach would result in more challenging gameplay.