Portfolio

Squad Based Emergent Behaviour

posted on July 22, 2010

For our AI Assignments we had to pick a paper describing an AI technique to recreate, this made for a really fun module with everyone doing different things, all of which were cool.

The paper I chose can be found in AI Game Programming Wisdom; Squad Tactics: Team AI and Emergent Behaviours by William van der Sterren.

It involves squads of units that hold an internal knowledge representation of the world that is gathered both first-hand (From what they can see) and second-hand, using messages that are sent from the other squad members, this gives entities an imperfect knowledge of the world, leading to more realistic behaviour. Squad members, when moving, use a number of different weights to decide on the best spot to move to, all of which can be changed whilst the simulation is running.

The result is pretty cool, I think, although my implementation is lacking some features, the article talks about threats including grenades, however I didn’t have time to implement it, there’s also a few bugs, the entities sometimes go a bit crazy rotating a lot and sometimes they don’t face in the correct direction (Bugs that, regrettably I didn’t have time to fix) but you can still see the effect.

The assignment also requred some for of user input, so the demo includes the ability to edit levels and place units (Go easy on the number of walls and units, the line-of-sight checking is rather unoptimal)

So, after such a build-up, here’s a pic to wet your appitaite and a download link so you can try it out.

Download

Media